Hi Guys,
I created an ar aging sql with additional details, what i dont understand is why my total amount does not equal to the standard report ar aging total amount.
My query does match the customer balance in ocrd.
SELECT
T0.ShortName,
SUM(T0.BalDueDeb-T0.BalDueCred) as JournalTotal,
MAX(T2.balance) AS CustomerBalance
FROM JDT1 T0
LEFT JOIN OCRD T2 ON t2.CardCode = T0.ShortName
WHERE T2.CardType = 'C'
AND T0.BalDueDeb != T0.BalDueCred
AND T0.RefDate <= GETDATE()
AND T0.IntrnMatch = 0
GROUP BY T0.ShortName
The balance due in ar aging is smaller, for example, some do match but not at all.
Cust | Aging Balance | My SQL Total |
Cust1 | 50,102,155.00 | 62,431,892.60 |
Cust2 | 91,769,951.86 | 117,966,403.17 |
Cust3 | 26,335,850.73 | 37,457,390.12 |
Cust 3 | 8,239,008.83 | 14,765,287.05 |
the version is 9.1 pl06
I compared the documents in standard ar aging some documents refer to ContraAct, some Shortname
anyone know why my balance does not match? the demodb works fine at all
thanks in advance