Skip to main content
Answer

Help with ARTran Tax Calculation Formula and Unexpected Total

  • June 17, 2025
  • 2 replies
  • 84 views

Forum|alt.badge.img+3

Hi everyone,

I'm working on a formula in Acumatica to calculate adjusted transaction amounts based on the ARTran.CuryTranAmt and OTP-specific tax logic. Here's the formula I'm using:

=Sum( (IIF([ARTran.DrCr]='C',1,-1)) * ( [ARTran.CuryTranAmt] + IIF( NOT IsNull([CWTaxesSum.Refnbr]) AND [CWTaxesSum.TaxableAmount] <> 0 AND [ARTran.TaxCategoryID] = 'OTP', [ARTran.CuryTranAmt]/[CWTaxesSum.TaxableAmount]*[CWTaxesSum.TaxAmt], 0 ) ) )

Total

 

The issue: The total calculated using this formula is higher than expected when compared to manually summed values. Even when I remove the OTP logic, the total still seems inflated. Could this be due to duplicate records from joins or grouping issues?

Has anyone faced a similar issue or can suggest how to troubleshoot or optimize this formula to avoid duplication or over-calculation?


I need to handle NAn

 

Best answer by tahayabali

Edit: Original formula =sum((IIF([ARTran.DrCr]='C',1,-1)) * ([ARTran.CuryTranAmt] + IIF([CWTaxesSum.Refnbr]<>Null,
    IIF([ARTran.TaxCategoryID]='OTP',[ARTran.CuryTranAmt]/[CWTaxesSum.TaxableAmount]*[CWTaxesSum.TaxAmt],0),0))

2 replies

Forum|alt.badge.img+3
  • Author
  • Captain I
  • Answer
  • June 17, 2025

Edit: Original formula =sum((IIF([ARTran.DrCr]='C',1,-1)) * ([ARTran.CuryTranAmt] + IIF([CWTaxesSum.Refnbr]<>Null,
    IIF([ARTran.TaxCategoryID]='OTP',[ARTran.CuryTranAmt]/[CWTaxesSum.TaxableAmount]*[CWTaxesSum.TaxAmt],0),0))


Forum|alt.badge.img+3
  • Author
  • Captain I
  • June 21, 2025

This is solved. Thanks