Hi,
Correct me if I am wrong, but this is simply totalling up the invoice totals over a date range.
I need the query to also check to see if the invoice had been paid.
I must apologise my earlier example is flawed.
Let's try another example:
For example - customer C100111 has the following invoices:
INV1, dated 1/1/15 $1000
INV2, dated 1/2/15 $1000
INV3, dated 1/315 $1000
The customer makes the following payments
$1000 on 2/1/15
$1000 on 2/2/15
$1000 on 2/3/15
The user then uses the query on 1/4/15 with the date range being entered as 1/1/15 and 1/4/15.
The expected result should be $1000 as this is the highest that the A/R balance got to.
Regards
Rick