By using this website, you agree to our Terms of Use (click here)
Hello,
I am looking to understand exactly how the field [ARTran.NetSalesAmount] is calculated. I need to know which fields it is using to add and subtract to get to the total amount listed if that is something that you could help me with.
Specifically, I am looking at report AR675000, where the sum of ARTran.NetSalesAmount is a different total of the total sales by customer if I were to run a Sales Order Details by Customer report (SO611000).
Thank you in advance.
[PXDBCalced(typeof(Mult<Switch<Case<Where<ARTran.drCr, Equal<DrCr.debit>>, Minus<decimal1>>, decimal1>, Sub<Sub<Sub<ARTran.grossSalesAmount, ARTran.discAmt>, ARTran.groupDiscountAmount>, ARTran.documentDiscountAmount>>), typeof(Decimal))]
From ARTran DAC.
Looks like it's Sales Amount less discount amount, group discount amount and document discount amount.
Search for "source" and it should match Source Code.
On Find in Files tab, search for NetSalesAmount - first match is the DAC, expand the
#region NetSalesAmount by clicking it and there's the code!

