Relation between Sales Order and General Ledger

Hi,

I want to create a report from General Ledger (Trial Balance) for Sales Orders. How to join General Ledger table with Customer Invoice Journal Table?

Report should have Sales ID, Item ID,Amount, voucher number.

D

Hello ,

you will get all this details in custTrans table only

I want to join GeneralJournalAccountEntry with CustInvTrans table. In CustInvTable there is Sales ID,Item ID, voucher number. Its many to many relationship between two tables. How to find the relations to join these two table?

check orinigalDocument class , findfromGeneralJoural method

Hi,
The best way to get what you need is to take a look at form LedgerTransVoucher and see how it is initialized when called form CustTrans form by clicking on Voucher button. In your case you need to use SubledgerVoucherGeneralJournalEntry and filter it by Voucher and TransDate of your CustTrans. Then you can join this to get all the subledger postings

Hi ,
I’m not sure with this…
Refer custinvoicejour->Voucher and GeneralJournalentry->Subledgervoucher…
Thank You…

custinvoicejour.ledgervoucher == generaljournalentry.subledgervoucher

You should also consider the AccountingDate and voucher DataAreaId.