Supplier Tracker payable totals : what fields are they combined of?

,

Hello all,

I am a bit confused of how the YTD and Last year purchases are calculated.

The Supplier Tracker tabs Links/Invoices/Aging

Show on the bottom the Accounts payables totals YTD and Last Year totals.

My query finds the correct number of invoices, but I cannot calculate the same numbers as what the form show.

My question is (if anyone knows): What fields of the APInvHed table (or any table) are used to achieve the totals shown under the Purchased section of the last year totals and YTD totals.?

Or I am missing something? Is it from another table?

My goal is to provide the same numbers in my query…

Thanks

Pierre

Here is my query:

select 
	[APInvHed].[InvoiceNum] as [APInvHed_InvoiceNum],
	[APInvHed].[InvoiceDate] as [APInvHed_InvoiceDate],
	[APInvHed].[FiscalYear] as [APInvHed_FiscalYear],
	[APInvHed].[InvoiceAmt] as [APInvHed_InvoiceAmt],
	[APInvHed].[DocInvoiceAmt] as [APInvHed_DocInvoiceAmt],
	[APInvHed].[CurrencyCode] as [APInvHed_CurrencyCode]
from Erp.APInvHed as APInvHed
inner join Erp.Vendor as Vendor on 
	APInvHed.Company = Vendor.Company
	and APInvHed.VendorNum = Vendor.VendorNum
	and ( Vendor.VendorID = 'STYRO'  )

Is it a little way off, or a long way? Some of our AP Invoices attract early payment discounts - perhaps you have the same for some of your invoices?

Perhaps it’s adding up something different? For instance, Payments rather than Invoices, or Purchase Orders (this one is less likely).