BorlandTalk.com Forum Index BorlandTalk.com
Borland discussion newsgroups
 
Archives   FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

need help on designing invoicing system

 
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder Databases (SQL Servers)
View previous topic :: View next topic  
Author Message
Tim Chemaly
Guest





PostPosted: Sun May 23, 2004 2:39 pm    Post subject: need help on designing invoicing system Reply with quote



Hi
I'm busy designing an invoicing system but need some help with the logic
I have a CustomerTable, InvoiceTable and InvoiceItemsTable
My problem is the PaymentTable does it point to the InvoiceTable or the
CustomerTable?
For instance:
If somepays pay their bill using an invoice it makes sense pointing the
PaymentTable to the InvoiceTable

But what if he pays two invoices using one payment (such as a cheque) in
this case which Invoice should the payment point to? here it makes more
sense having the
PaymentTable point to the CustomerTable?

But now I'm losing the detailed info on which invoice the payment was for!
This can be a bad thing because there may be some dispute with a particular
invoice in which case the customer doesn't actually want to pay THAT invoice
but is willing to pay the others. Having PaymentTable point to CustomerTable
mean its impossible to handle such a scenario!

An suggestions ?



Regards

---------------------------------------------------------
Tim Chemaly



Back to top
Yahia El-Qasem
Guest





PostPosted: Sun May 23, 2004 3:20 pm    Post subject: Re: need help on designing invoicing system Reply with quote



just an idea :

create a PaymentItemTable which points to InvoiceTable... let PaymentTable
point to CustomerTable...

this should solve all mentioned scenarios...

HTH

Yahia


Back to top
Tim Chemaly
Guest





PostPosted: Mon May 24, 2004 8:26 am    Post subject: Re: need help on designing invoicing system Reply with quote



Hi Yahia
I assume PaymentItemTable should point to PaymentTable as well? If not,
wouldn't it be better to rename the tables to InvoicePaymentTable (that
points to InvoiceTable ) and CustomerPaymentTable that points to
CustomerTable?

--



Regards

---------------------------------------------------------
Tim Chemaly

"Yahia El-Qasem" <Yahia.El-Qasem (AT) mgh (DOT) metro-ag.de> wrote

Quote:
just an idea :

create a PaymentItemTable which points to InvoiceTable... let PaymentTable
point to CustomerTable...

this should solve all mentioned scenarios...

HTH

Yahia





Back to top
Yahia El-Qasem
Guest





PostPosted: Mon May 24, 2004 4:13 pm    Post subject: Re: need help on designing invoicing system Reply with quote

"Tim Chemaly" <tim (AT) brettonwoods (DOT) biz> schrieb im Newsbeitrag
news:40b1b1b6 (AT) newsgroups (DOT) borland.com...
Quote:
Hi Yahia
I assume PaymentItemTable should point to PaymentTable as well?

Yes :-)

Yahia



Back to top
Display posts from previous:   
Post new topic   Reply to topic    BorlandTalk.com Forum Index -> C++ Builder Databases (SQL Servers) All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum


Powered by phpBB © 2001, 2006 phpBB Group
SEO toolkit © 2004-2006 webmedic.