Hi guys, Today we see how to Check If sales order amount is cleared or not in D365fo.
Check below job.
static void checkAmount(Args _args)
{
CustInvoiceJour inv;
CustTrans custTrans;
Salestable salestable;
Select salestable
join inv where salestable.SalesId == inv.SalesId
&& salestable.SalesId == '000691'
&& salestable.SalesStatus == SalesStatus::Invoiced
join custTrans where custTrans.Voucher == inv.LedgerVoucher
&& custTrans.TransDate == inv.InvoiceDate
&& custTrans.AccountNum == inv.InvoiceAccount
&& custTrans.Invoice == inv.InvoiceId;
info(strFmt('%1-%2-%3-%4',custTrans.remainAmountCur(),salestableloc.CustAccount,custTrans.Voucher,custTrans.Invoice));
}
Keep Daxing!!
No comments:
Post a Comment