Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Dealing with past balances
Message
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00122306
Message ID:
00122379
Views:
19
But a customer would only have one invoice. And that invoice has to have fields for the current balance, the 1-30 balance, the 30-60 balance, the 60-90 balance, and the 90+ balance.

Otherwise, if I credit, say, the 30-60 balance, where would I put the new balance?

I'm sorry if I'm sounding dense. This is really confusing.

Thanks,

-Michelle

>
>You can calculate it on the run. Something like this;
>
>
>SELECT * FROM Invoices, Customers, Payments ;
>  WHERE Invoice.CustNo = Customer.CustNo ;
>    AND Customer.CustNo = <The Customer you want> ;
>    AND Invoice.AmountDue > 0 ;
> GROUP BY Invoice.InvDate ;
> ORDER BY Invoice.InvDate ;
> INTO CURSOR InvTemp
>
>
>You now have a cursor with all invoices that have an outstanding balance for the customer you selected. You can SUM() the AmountDue for a date range to get the >90, 90, 60 stuff.
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform