Please start any new threads on our new site at https://forums.sqlteam.com. We've got lots of great SQL Server experts to answer whatever question you can come up with.

 All Forums
 SQL Server 2000 Forums
 SQL Server Development (2000)
 Invoices and Payments

Author  Topic 

steve_c
Yak Posting Veteran

54 Posts

Posted - 2007-09-24 : 11:29:41
Hi all - just want to get your views on this application design.

It is a despatch and accounts app. I have to deal with payments which will settle any number of outstanding invoices for a particular client. I also have to deal with overpayments.

I have an invoice and invoiceline table. I was thinking of adding a payments table with amount and clientid. I would then add a invoicepayment table with the following fields:

invoicepayments
invoicepaymentid
paymentid
clientid
invoiceid
amount

Any overpayments would simply be an entry into the invoicepayments table with no invoiceid and so I would know that this is money which is credit to the client.

Anyone have any views on this? Or is there an already established way of doing this?

Thanks,

Stephen.

Kristen
Test

22859 Posts

Posted - 2007-09-24 : 11:59:07
"Any overpayments would simply be an entry into the invoicepayments table with no invoiceid and so I would know that this is money which is credit to the client."

How do you then "allocate" that overpayment transaction, or part of it, against an invoice subsequently?

The systems I am used to generally allow:

Post an amount against an invoice. It might be all, or part, of an invoice. I haven't seen one that lets you over-post against an invoice, even if that's what the payer thought they wanted to have happen so any left-over goes to Unallocated.

Re-post amount. So without receiving any additional money, reduce, perhaps to zero, the payment on one, or more, invoices and reallocate to other invoices (in part, or in full), possibly with some "left over" going into Unallocated.

At some point "closing" the allocations, after which changes cannot be made. This is usually the end of a period. Money on Unallocated can still be allocated, but invoices that are fully allocated at the point the period is closed are then "locked" and cannot be changed. (If they need to be credit notes and new invoices and all sorts of money-making-for-auditors actions come into play!)

Kristen
Go to Top of Page

steve_c
Yak Posting Veteran

54 Posts

Posted - 2007-09-25 : 06:14:39
Thanks for the reply :)

The allocation of the overpayment would be done systematically through the payments page of my asp.net app.

I suppose it's a bit of a hash way to do it but I'm really stuggling on the architecture...

Any other thoughts appreciated!

Steve.
Go to Top of Page
   

- Advertisement -