Please can anyone tell me how I can link the General Ledger Actual table (GENERALJOURNALACCOUNTENTRY) to either the Purchase Order (PURCHTABLE) or Purchase Order Line (PURCHLINE) table so I can get the Purchase Order Number.
Many thanks
Have a look at \Classes\Originaldocuments\findFromGeneralJournal
You don’t have to go to the purchTable, you can get it from VendInvoiceJour or VendPackingSlipJour.
Thanks.
I tried to link the Voucher from Generaljournalaccountentry to VendInvoiceJour but not all vouchers are showing.
Are the vouchers related to invoices?
The invoice has not yet been generated as it is still an open order.
What does that mean? If it is not invoiced, then what vouchers would you expect to see?
Is there a field I can link [dbo].[GENERALJOURNALACCOUNTENTRY] or [dbo].[GENERALJOURNALENTRY] to [dbo].[VENDINVOICEJOUR] or [dbo].[VENDPACKINGSLIPJOUR]?
You have to find SubledgerVoucherGeneralJournalEntry related to GENERALJOURNALENTRY.
SubledgerVoucherGeneralJournalEntry will have the voucher and the accounting that you relate to
VendInvoiceJour.LedgerVoucher and invoiceDate.
For VENDPACKINGSLIPJOUR, you may need to use vendPackingSlipVersion that has voucher and accounting date information.
You can see the same information in, Classes\Originaldocuments\findFromGeneralJournal