MB Software Solutions <> wrote:
> I've got the following tables:
>
> * transactions
> * invoice_header
> * invoice_details
> * payment_header
> * payment_details
>
> I create invoices based on the transactions that haven't been paid.
> "Paid" is defined as follows: sum(payment_details.namount) >=
> transaction.amount , where the sum is done on matching trans_id keys.
> I've got a field called "iPaid" in the invoice_header table that is
> set to 1 (true) when all of its detail records have been paid. This
> allows me to quickly query for all of the UNPAID invoices rather than
> scanning through and comparing the SUM(payment_details.namount) to
> transaction.namount every time. Eventually I'll put a trigger into
> the payment_details table to achieve this, but for now, it'll be in
> VFP bizobj/dataobj code every time a payment is applied.
>
> My question is this: say I create an invoice ("0001") for your
> unpaid transactions, and 30 days later, when it's time to invoice
> again, you haven't paid them yet. As the application developer, do
> you create a new invoice ("0002") for the current AND past charges,
> or just create an invoice for the current charges (so that you then
> have 2 invoices in either case), or do you simply open up the
> existing invoice, tack on the current charges, and thus keep the same
> ("0001") invoice? My concern about having a 2nd invoice is due to my
> having the iPaid field in the invoice_header table, as I described
> above. 2 invoices for the same transactions would prove to be a
> problem when reconciling the payment data.
>
> How would you proceed?
>
> tia!
If they haven't paid you why not just bill them again?
Bad Steve!
Stephen Russell
DBA / .Net Developer
Memphis TN 38115
901.246-0159
"A good way to judge people is by observing how they treat those who
can do them absolutely no good." ---Unknown
http://spaces.msn.com/members/srussell/
No virus found in this outgoing message.
Checked by AVG Free Edition.
Version: 7.5.472 / Virus Database: 269.9.0/852 - Release Date: 6/17/2007
8:23 AM
_______________________________________________
Post Messages to: [email protected]
Subscription Maintenance: http://leafe.com/mailman/listinfo/profox
OT-free version of this list: http://leafe.com/mailman/listinfo/profoxtech
Searchable Archive: http://leafe.com/archives/search/profox
This message: http://leafe.com/archives/byMID/profox/[EMAIL PROTECTED]
** All postings, unless explicitly stated otherwise, are the opinions of the
author, and do not constitute legal or medical advice. This statement is added
to the messages for those lawyers who are too stupid to see the obvious.