Hi guys, im trying to add a closing year column to the trial balance report (nav 2009) so that i can have closing balance(debit , credit ) net change (debit , credit ) and opening balance (debit , credit ) my problem is how to get the debit and credit of the previous period on the report
*This post is locked for comments
Thanks and Welcome!
Happy to Help! Always...
think i got the solution to that thanks alot u saved my day
im also getting some negative values when using the first method
Where do i put the code, am totally new to navision and i will appreciate ur help
Which previous period you want the closing balance.
If date filter is like 01-01-12..31-12-12 then the Opening of 01-01-12 is closing of previous year.
if you want to get the closing of previous period the do the below by tow way:
1. Minus the Closing Balance - Net Change to get previous period closing balance as opening of period filter.
2. Write the below code (GLAccount. is rec variable of G/L Account table):
GLAcc.SETRANGE(GLAcc."Date Filter",0D,CLOSINGDATE(GETRANGEMIN("Date Filter") - 1));
GLAcc.CALCFIELDS(GLAcc."Debit Amount", GLAcc."Credit Amount");
BDebit := GLAcc."Debit Amount";
BCredit := GLAcc."Credit Amount"
User BDebit and BCredit for previous period closing and opening of filtered period...
Sohail Ahmed
2
mmv
2
Amol Salvi
2