How to create variable to SUM Amount, Local Amt , and Amt Include Tax
1) Click on the variable icon
2) Click on where you want to create a new variable, right click on the variable created > go calculations , Insert
the Query below accordingly
3) Click on the variable created, and make sure choose it to DOUBLE.
Formula for Sub Total
Variable1.DisplayFormat := Option.GetFieldValue('AccountingValueDisplayFormat');
Value := GetAggregateValue(agSUM, Document_Detail, 'DocKey', 'Amount');
*** Refer above picture on how to Check the variable field name and replace it accordingly
Formula for Total Exclude GST (RM)
Variable2.DisplayFormat := Option.GetFieldValue('AccountingValueDisplayFormat');
Value := GetAggregateValue(agSUM, Document_Detail, 'DocKey', 'LocalAmount');
*** Refer above picture on how to Check the variable field name and replace it accordingly
Formula for Total of Tax Amt (RM)
Variable5.DisplayFormat := Option.GetFieldValue('AccountingValueDisplayFormat');
Value := GetAggregateValue(agSUM, Document_Detail, 'DocKey', 'LocalTaxAmt');
*** Refer above picture on how to Check the variable field name and replace it accordingly
Formula for Total Include GST (RM)
Variable6.DisplayFormat := Option.GetFieldValue('AccountingValueDisplayFormat');
Value := GetAggregateValue(agSUM, Document_Detail, 'DocKey', 'LocalAmountWithTax');
*** Refer above picture on how to Check the variable field name and replace it accordingly
© Copyright 2026 Paperzz