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

Search hierarchy for a match (TableALLGroup) X++

  Table1 ppt;  select firstonly ppt  order ItemCode, ItemRelation, AccountCode, AccountRelation where      (ppt.ItemCode == TableGroupAll::T...