SalesTotals salesTotals;
SalesTable salesTable;
SalesLine salesLine;
TaxAmountCur salesAmt,taxAmount,amt1,discountAmt,totcharges,totOfOrder,contributionRatio;
Tax tax;
;
salesTable = SalesTable::find("STestSO00002");
salesLine = SalesLine::find(salesTable.SalesId);
salesTotals = SalesTotals::construct(salesTable, SalesUpdate::All);
tax = Tax::construct(NoYes::No);
salesAmt = salesTotals.totalBalance();
taxAmount = salesTotals.totalTaxAmount();
discountAmt = salesTotals.totalEndDisc();
totcharges = salesTotals.totalMarkup();
totOfOrder = salesTotals.totalAmount();
info(Strfmt("Subtotal Amount %1",salesAmt ));
info(Strfmt("The tax amount is %1",taxAmount ));
info(Strfmt("The Discount is %1",discountAmt ));
info(Strfmt("Charges/ Markup %1",totcharges ));
info(Strfmt("Invoice Amount %1",totOfOrder ));
Comments