Documentation >
MAC-PAC Technical Library >
Distribution >
Order Processing >
Programs >
Gross Margin Checking - Purpose >
Gross Margin Checking - Calculations
Gross Margin Checking - Calculations
Gross Margin Checking
1. The Gross Margin is calculated:
a. If the Extended Price is zero, the Gross Margin and Gross Margin Percent are set to -.99999 and -99.999.
b. If the Extended Price is not zero, the Gross Margin is calculated:
(1) (1 minus (Extended Cost divided by Extended Price)).
(2) If overflow occurs, the Gross Margin is set to all nines.
c. The Gross Margin Percent is calculated: Gross Margin times 100.
2. Exception flags and warning messages are set.
a. If the Gross Margin is less than the Minimum Gross Margin Allowed:
(1) The header and line price exception flags are set to yes.
(2) The low gross margin flag is set to yes.
(3) A warning message is written.
b. If the Gross Margin is not less than the Minimum Gross Margin Allowed, the low gross margin flag is set to no.
c. If the Gross Margin is greater than the Maximum Gross Margin Allowed:
(1) The header and line price exception flags are set to yes.
(2) The high gross margin flag is set to yes.
(3) A warning message is written.
d. If the Gross Margin is not greater than the Maximum Gross Margin Allowed, the high gross margin flag is set to no.