Wednesday, November 30, 2016

Vendor/Customer-Opening,Closing,Transaction AmountCur,AmountMST in Summary Balance

//VendorCustomer-Opening,Closing,AmountCur,AmountMST in Summary Balance

 vendTable.openBalanceCur(fromDate,toDate,assessmentDate,_CurrencyCode); //for Acc cur Mst
 CustTable.openBalanceCur(fromDate,toDate,assessmentDate,_CurrencyCode);
static void VendCustBalanceCheck(Args _args)
{
    VendTable     vendTableSummary; 
    TmpCustVendTrans    tmpCustVendTrans;
    ;
   while select vendTableSummary
    {
        tmpCustVendTrans.setTmpData(TmpCustVendTrans::vendTransBalanceCurrency(vendTableSummary.AccountNum,True));
           
        while select tmpCustVendTrans
        {
            info(strFmt("%1,%2,%3,%4,%5",vendTableSummary.AccountNum,tmpCustVendTrans.CurrencyCode,
                                         vendTableSummary.openBalanceCur(dateNull(),today()-1,today(),tmpCustVendTrans.CurrencyCode),
                                         tmpCustVendTrans.AmountCur,
                                         (vendTableSummary.openBalanceCur(dateNull(),today()-1,today(),tmpCustVendTrans.CurrencyCode)) -
                                                tmpCustVendTrans.AmountCur));
        }
    }
}

No comments:

Post a Comment

Copy Markup charges while posting purchase invoice using X++

 Copy Markup charges while posting purchase invoice using X++ Class: Important: Code logic is just for Reference.  New class => Duplicate...