Using Crystal Reports - I am having trouble assigning the correct ARSAP.SALESRATE for any given shipment. For example I have a Sales Person setup as follows:
ARSAP.SALESRATE1 = 15%, from $0000 to ARSAP>SALESBASE1 = $0,999.99
ARSAP.SALESRATE2 = 10%, from $1000 to ARSAP.SALESBASE2 = $2,499.99
ARSAP.SALESRATE3 = 05%, over $2,499.99 (Accpac stores ARSAP.SALESBASE3 as 0)
Below is the formula I am trying to use for the above Sales Person. It will fail on a shipment where the total amount is greater than $2,499.99 (since $2,499.99 is not less than 0). I have been wracking my brain of how to create a simple formula to get at the correct ARSAP.SALESRATE but keep coming up blank. Any help appreciated.
IF {OESHIH.SHIITMTOT} <= {ARSAP.SALESBASE1} THEN {ARSAP.SALESRATE1} ELSE
IF {OESHIH.SHIITMTOT} <= {ARSAP.SALESBASE2} THEN {ARSAP.SALESRATE2} ELSE
IF {OESHIH.SHIITMTOT} <= {ARSAP.SALESBASE3} THEN {ARSAP.SALESRATE3} ELSE
IF {OESHIH.SHIITMTOT} <= {ARSAP.SALESBASE4} THEN {ARSAP.SALESRATE4} ELSE
IF {ARSAP.SALESBASE1} <= .01 THEN {ARSAP.SALESRATE1} ELSE
{ARSAP.SALESRATE5}
At this point I am putting blinders on to the fact that if an order is broken up into separate shipments we might be paying more commission than should be paid and to the fact that if a Salespersons rates change then historical data will be completely inacurrate. One Accpac problem at a time I guess.
ARSAP.SALESRATE1 = 15%, from $0000 to ARSAP>SALESBASE1 = $0,999.99
ARSAP.SALESRATE2 = 10%, from $1000 to ARSAP.SALESBASE2 = $2,499.99
ARSAP.SALESRATE3 = 05%, over $2,499.99 (Accpac stores ARSAP.SALESBASE3 as 0)
Below is the formula I am trying to use for the above Sales Person. It will fail on a shipment where the total amount is greater than $2,499.99 (since $2,499.99 is not less than 0). I have been wracking my brain of how to create a simple formula to get at the correct ARSAP.SALESRATE but keep coming up blank. Any help appreciated.
IF {OESHIH.SHIITMTOT} <= {ARSAP.SALESBASE1} THEN {ARSAP.SALESRATE1} ELSE
IF {OESHIH.SHIITMTOT} <= {ARSAP.SALESBASE2} THEN {ARSAP.SALESRATE2} ELSE
IF {OESHIH.SHIITMTOT} <= {ARSAP.SALESBASE3} THEN {ARSAP.SALESRATE3} ELSE
IF {OESHIH.SHIITMTOT} <= {ARSAP.SALESBASE4} THEN {ARSAP.SALESRATE4} ELSE
IF {ARSAP.SALESBASE1} <= .01 THEN {ARSAP.SALESRATE1} ELSE
{ARSAP.SALESRATE5}
At this point I am putting blinders on to the fact that if an order is broken up into separate shipments we might be paying more commission than should be paid and to the fact that if a Salespersons rates change then historical data will be completely inacurrate. One Accpac problem at a time I guess.