Below is the code snippet to get sales totals of open order and invoiced sales orders Open order Sales Orders: container displayFields = S alesTotals::displayFieldsServer (salesTable, SalesUpdate::All, ""); real totalAmountIncTax = conpeek(displayFields, TradeTotals::posTotalAmount()); real totalAmountExcTax = conPeek(displayFields, TradeTotals::posBalance()); real totalAmountTax = conpeek(displayFields, TradeTotals::posTaxTotal()); Invoiced Sales Orders: SalesQty qty; Amount totalAmountIncTax,totalAmountTax,totalAmountExcTax; [totalAmountIncTax,totalAmountTax,totalAmountExcTax,qty] = ANI_SalesEventHandlers::getSalesInvoiceAmountAndTax(salesTable); real totalAmountExcTax = totalAmountExcTax; real totalAmountIncTax = totalAmountIncTax; real totalAmountTax = totalAmountTax; /// <summary> /// Get Invoiced Sales Order Amount, tax,...