How to Calculate Purch Totals in purchase order's Totals Form
How to Calculate Purch Totals in purchase order's Totals Form
class KK_PurchTotals
{
/// <summary>
/// Runs the class with the specified arguments.
/// </summary>
/// <param name = "_args">The specified arguments.</param>
public static void main(Args _args)
{
PurchTotals purchTotals;
PurchTable purchTable = PurchTable::find('00000225');
DiscAmount discAmount;
purchTotals = PurchTotals::newPurchTable(purchTable);
purchTotals.calc();
discAmount = purchTotals.purchTotalAmount();
setPrefix('Purchase Order');
info(strFmt('%1 - Total Value: %2', purchTable.PurchId, discAmount));
}
}
Comments
Post a Comment