I have a complex database that in one area calculates an order and figures the sales tax if applicable. In this case the 7.75% tax is calculated, and a total is shown.
Apparently the customer paid the total, and there is shown a zero balance, but they are still showing up on a recievables aging report because they still owe 0.0025 or 0.0033 etc. This only shows up when you click in the field on the underlying query. The report shows zero since it is in currency format.
I used the following formula to calculate the tax =
[LineTotal]+(CLng([LineTotal]*[SalesTaxRate]*100)/100)+[FreightCharge]
Trouble is I also used [LineTotal]*(1+[SalesTaxRate])+[FreightCharge]-nz([Total Payments]in the aging report and apparently these do different things.
I dont know which to set it to at this point. Although it only affected a small number of orders...its a pain.
I dont really understand the difference between the two ways of calculating I used as I took them from a couple of different examples.
I also used this formula in my recievables aging report for the >90 day column:
91+ Days: Sum(IIf((Date()-[ShipDate])>90,[LineTotal]+(CLng([LineTotal]*[SalesTaxRate]*100)/100)+[FreightCharge]-nz([Total Payments]),0))
This works....but in my "BALANCE" column it wont let me do it that way....it only works like this:
Balance: Sum([LineTotal]*(1+[SalesTaxRate])+[FreightCharge]-nz([Total Payments]))
If I substitute the : [LineTotal]+(CLng([LineTotal]*[SalesTaxRate]*100)/100)+[FreightCharge]
it says invalid use of null.
Can I mix them? Again my original form that calculates the sales tax and figures the total uses this for the sales tax field....=CLng([Order Subtotal]*[SalesTaxRate]*100)/100
This is the culprit I think. Should I change THAT to : [Order Subtotal]*(1+[SalesTaxRate]?
This is driving me nuts???? THANKS IN ADVANCE
Apparently the customer paid the total, and there is shown a zero balance, but they are still showing up on a recievables aging report because they still owe 0.0025 or 0.0033 etc. This only shows up when you click in the field on the underlying query. The report shows zero since it is in currency format.
I used the following formula to calculate the tax =
[LineTotal]+(CLng([LineTotal]*[SalesTaxRate]*100)/100)+[FreightCharge]
Trouble is I also used [LineTotal]*(1+[SalesTaxRate])+[FreightCharge]-nz([Total Payments]in the aging report and apparently these do different things.
I dont know which to set it to at this point. Although it only affected a small number of orders...its a pain.
I dont really understand the difference between the two ways of calculating I used as I took them from a couple of different examples.
I also used this formula in my recievables aging report for the >90 day column:
91+ Days: Sum(IIf((Date()-[ShipDate])>90,[LineTotal]+(CLng([LineTotal]*[SalesTaxRate]*100)/100)+[FreightCharge]-nz([Total Payments]),0))
This works....but in my "BALANCE" column it wont let me do it that way....it only works like this:
Balance: Sum([LineTotal]*(1+[SalesTaxRate])+[FreightCharge]-nz([Total Payments]))
If I substitute the : [LineTotal]+(CLng([LineTotal]*[SalesTaxRate]*100)/100)+[FreightCharge]
it says invalid use of null.
Can I mix them? Again my original form that calculates the sales tax and figures the total uses this for the sales tax field....=CLng([Order Subtotal]*[SalesTaxRate]*100)/100
This is the culprit I think. Should I change THAT to : [Order Subtotal]*(1+[SalesTaxRate]?
This is driving me nuts???? THANKS IN ADVANCE