Skip to main content

Posts

Showing posts with the label ledgertrans

Cross Check Ledger balances from tables data for trial balance checking in MSD axapta

If you are facing any amount mismatch problem in trial balance report then you can cross check data with ledgertrans and ledgerbalancedimtrans table. You can check amount dimension wise. You can get hints from below query. select Sum(AmountMST) from _LedgerTrans group by AccountNum,transdate,Dimension[1],Dimension[2] ; select sum(DebitMst),Sum(CreditMst) from _LedgerBalancesDimTrans where LedgerBalancesDimTrans.AccountNum ==_LedgerTrans.AccountNum && _LedgerBalancesDimTrans.transdate==_LedgerTrans.transdate && _LedgerBalancesDimTrans.Dimension[1]==_LedgerTrans.Dimension[1] && _LedgerBalancesDimTrans.Dimension[2]==_LedgerTrans.Dimension[2]; amt= _LedgerBalancesDimTrans.DebitMST + _LedgerBalancesDimTrans.CreditMST

Fetch Method to make Trial balance quickly

This is simple Fetch Method to make Trial balance quickly. Some times standard trial balance does not match due to wrong customization of application so there may be data problem in ledger balance table then you can make trial balance by using LedgerTrans table. Performance of report will be slow but it can give accurate result. public boolean fetch() { Query q = new Query(); QueryBuildDataSource qbds; ; q= this.query(); qbds = q.dataSourceTable(tablenum(LedgerTrans)); qbds.addSortField(fieldnum(LedgerTrans,AccountNum)); rangeTransDate =qbds.findRange(fieldnum(LedgerTrans,TransDate)); purpose1 = qbds.findRange(FieldId2Ext(FieldNum(LedgerTrans, Dimension),3)); if(!rangeTransDate.value()) { rangeTransDate.value(queryRange(dateMin,dateMax)); fromdate= dateMin; todate =dateMax; } else { value=rangeTransDate.value(); if(strfind(value,".",1,11) != 0) { mindate1 =strdel(value,strfind(value,".",1,11),strle...