Calculate SalesTotal class and related information in X++

Hi, static void SalesTotalAlfasith(Args _args){    SalesTotals   salesTotals;    SalesTable   salesTable;    container   displayFields;    str    totalTax, amountWithoutTax, amountInclTax;     salesTable = salesTable::find(‘SO-101269’);    salesTotals  =  SalesTotals::construct(salesTable, salesUpdate::All);    salesTotals.calc();    displayFields =  salesTotals.displayFieldsCurrency(salesTotals.currencyCode());     print   conpeek(displayFields, TradeTotals::posBalance());    print   conpeek(displayFields, TradeTotals::posEndDisc());    print   conpeek(displayFields,TradeTotals::posTaxTotal());    […]

Calculate PurchTotal class and its related information in X++

Hi, static void PurchTotalAlfasith(Args _args){    PurchTotals   purchTotals;    PurchTable   purchTable;    container   displayFields;    PurchtotalsForm         totalsForm;    purchTable = PurchTable::find(‘000396’);              totalsForm   = PurchtotalsForm::newPurchTotalsForm(purchTable, 1);    totalsForm.calctotals();    print ” Total quantity = %1″, totalsForm.qtyValue();    print ” Total Discount = […]