I'm using Peachtree 2011 which uses Pervasive SQL as the database engine and Crystal Reports 2008.
I created a report to show the commission for each sales person.
I created a formula to calculate the commission:
{@Commission} =
IF {Employee.Type} = "STR" THEN {@COMMISSIONSTR}
ELSE IF {Employee.Type} = "SAE" THEN {@COMMISSIONSAE}
ELSE IF {Employee.Type} = "SAP" THEN {@COMMISSIONSAP}
({@COMMISSIONSTR}, {@COMMISSIONSTR}, {@COMMISSIONSAP} is another formula that applies the commission rate depending on what the sales person sold the product for (called the Price Level))
{@Commission} is placed in the Details section and then a summary is inserted for each group (Group 1 = Sales Person, Group 2 = Sales Order)
There are two exceptions to the commission:
If the sales person sells the item "XXX" then the Price Level is 9 and the amount on the sales order is subtracted from the commission on the sales order.
If the sales person sells the item "ZZZ" then the Price Level is 10 and the commission for the sales order is reduced by 50%.
I created another formula to handle the exceptions:
{@CommissionSO-2} =
EvaluateAfter ({@COMMISSION});
NumberVar CommissionSO2:= (((Sum ({@COMMISSION}, {JrnlHdr.Reference}) * {@P10}) + {#P9 SO}));
CommissionSO2;
{@P10} =
WhilePrintingRecords;
NumberVar P10 := (If {@Price Levels} = "Price Level 10" then -.50 else 1.00);
P10;
The report display:
REP SO P1 P2 P3 P4 P5 P6 P7 P8 P9 P10 Comm
JOE AMT
1034 22.00 12 10 0.00
1055 28.62 2.64 25.00 -.5 -24.87
The commission for sales order 1034 should show 2.12.
I placed {@CommissionSO-2} in the Group 2 Footer-Sales Order.
The problem is if the sales order doesn't have a unit price that falls into Price Level 9, then the commission is 0.00.
Does anyone know how to fix my variable so that commission is calculated for every price level?
I created a report to show the commission for each sales person.
I created a formula to calculate the commission:
{@Commission} =
IF {Employee.Type} = "STR" THEN {@COMMISSIONSTR}
ELSE IF {Employee.Type} = "SAE" THEN {@COMMISSIONSAE}
ELSE IF {Employee.Type} = "SAP" THEN {@COMMISSIONSAP}
({@COMMISSIONSTR}, {@COMMISSIONSTR}, {@COMMISSIONSAP} is another formula that applies the commission rate depending on what the sales person sold the product for (called the Price Level))
{@Commission} is placed in the Details section and then a summary is inserted for each group (Group 1 = Sales Person, Group 2 = Sales Order)
There are two exceptions to the commission:
If the sales person sells the item "XXX" then the Price Level is 9 and the amount on the sales order is subtracted from the commission on the sales order.
If the sales person sells the item "ZZZ" then the Price Level is 10 and the commission for the sales order is reduced by 50%.
I created another formula to handle the exceptions:
{@CommissionSO-2} =
EvaluateAfter ({@COMMISSION});
NumberVar CommissionSO2:= (((Sum ({@COMMISSION}, {JrnlHdr.Reference}) * {@P10}) + {#P9 SO}));
CommissionSO2;
{@P10} =
WhilePrintingRecords;
NumberVar P10 := (If {@Price Levels} = "Price Level 10" then -.50 else 1.00);
P10;
The report display:
REP SO P1 P2 P3 P4 P5 P6 P7 P8 P9 P10 Comm
JOE AMT
1034 22.00 12 10 0.00
1055 28.62 2.64 25.00 -.5 -24.87
The commission for sales order 1034 should show 2.12.
I placed {@CommissionSO-2} in the Group 2 Footer-Sales Order.
The problem is if the sales order doesn't have a unit price that falls into Price Level 9, then the commission is 0.00.
Does anyone know how to fix my variable so that commission is calculated for every price level?