Hi all,
I'm really stuck with this. I only have a rudimentary understanding of accounting procedure but my company are really breathing down my neck for me to come up with this report. I need the total payment to a given supplier along with the posting type and account name.
I'm looking at the VENDTRANS table and I need the total spend for a supplier over a given time period. I think that's as simple as the below query, which ties with with the results I get when running the supplier invoice transactions report in the system.
SELECT ACCOUNTNUM, CAST(TRANSDATE as date), VOUCHER, AMOUNTMST
FROM [FGAX62LIVE].[dbo].[VENDTRANS]
where ACCOUNTNUM = 'accno'
and TRANSDATE between '2018-01-01' and '2018-03-31'
The problem I have is that I cannot seem to tie our nominal codes against this. I can find the numbers in the MAINACCOUNT table as MAINACCOUNTID and as part of the LEDGERACCOUNT field in GENERALJOURNALENTRY table. I can't seem to link these properly to the VENDTRANS table though.
If anyone could shed some light on this it would be much appreciated!
*This post is locked for comments