I need to add VAT details on the ledgerJournal report. I added 4 fields on the ledgerJournalTmp table i.e Tax group, Tax item group, tax code and Tax Amount. I modified the LedgerjournalDP class by adding these fields in the method (insertJournalTransforLedgerJournalTable) and able to get the value for three fields which are the fields of LedgerJournalTrans table but couldn’t able to fetch Tax amount as this is the method in the LedgerJournalTrans table. Please help me out in fetching the method value of a table on the report.
Which method on ledgerJournalTrans you are using to show the tax amount?
Is your journal posted? The method will find the tax only if the journal is posted (look at the code).
Yes you are right, but how to call the method value (after post) at the report which is from another table (LedgerjournalTrans) not the table (LedgerJournalTmp).
What I mean, fetching field value from LedgerJournalTrans and storing the data in LedgerJournalTmp is working fine. How will I fetch the method(taxAmountJournal) value from LedgerJournalTrans and store it in the field (TaxAmount) of LedgerJournalTmp.
Hope i’ve explained it properly.
If the user doesn’t select any ranges, then the report uses the set based operations to insert the data into temp table.
In this case you may have to write your code in updateLedgerDimensionFromPostingProfile (this uses a while)
If ranges are selected then it uses while select (using query).
In this case, you may have to write your code in insertLedgerJournalTmp
Thanks a ton it worked for posted journal after i put the above code in updateLedgerDimensionFromPostingProfile method as you said. Last thing is there a way i can get the tax value for the Unposted journal as well.
Try using \Data Dictionary\Tables\LedgerJournalTrans\Methods\totalTaxAmountSingleLine
Thanks kranthi, it worked