473,395 Members | 1,629 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

Receipt/invoice database

38
I'm building a receipt/invoice database - I've started with the invoice first, then the receipt.
I have invoice = parents and sons + receipt = parents and sons tables + a customer table.
I want to issue 1 receipt with 12 payments (1 check for each month of the year) and then, everytime a check comes to delivery, the invoice is printed out with the receipt number.

What would be the relation between the receipt/invoice tables and how do I make the relevant receipt number for each invoice please?

Thanks.
Jan 1 '08 #1
14 10445
missinglinq
3,532 Expert 2GB
Perhaps my brain is addled (although I didn't celebrate last nite!) but

"I have invoice = parents and sons + receipt = parents and sons tables + a customer table"

makes absolutely no sense to me! I think you're really going to have to do a better job of describing what you already have in place. Posting of meta data info should be something on the order of:

Table1
FirstFieldName (DataType)
SecondFieldName (DataType)
ThirdFieldName (DataType)

Table2
FirstFieldName (DataType)
SecondFieldName (DataType)
ThirdFieldName (DataType)

Linq ;0)>
Jan 1 '08 #2
NeoPa
32,556 Expert Mod 16PB
Like general database work, the idea is that the more effort you put into asking a question clearly, the less problems we all have over all.
The parallel is so close to database design. Do it properly and the whole project benefits. Do it sloppily and you spend most of your energy clearing up the resultant problems.
I don't want to be overly harsh, but as Linq says, your question could do with a little more thought and careful preparation.
Jan 2 '08 #3
eyalco
38
Thanks friends, you're right.
Here's my basic layout of the database :

TBL_CUSTOMER :
CustomerID AutoNumber primary key
Surname Text
FirstName Text
Address Text
City Text
Zip Text

Invoice table:
InvoiceID AutoNumber primary key
CustomerID Number who is to pay this invoice
InvoiceDate Date/Time when the invoice was sent
Descrip Text (or memo) what this is for
AmountEx Currency amount of this invoice, without tax.
TaxRate Number (Double) Percent tax rate to add.

Invoice_sons_tbl:
InvoiceID AutoNumber primary key
ID_Item Number who is to pay this invoice
Item_description text what this is for
price_per_unit Number what each unit worth
Discount Number
Quantity Number
Sum Number

TBL_SUB_RECEIPT :
InvoiceID Number
Payment Text
Bank Number
Branch Number
ACC Text
Payment_Date date

Receipt table:
ReceiptID AutoNumber primary key
CustomerID Number who paid this amount
ReceiptDate Date/Time when received.
Amount Currency amount received.
Comment Memo description of what for.

I joined the receipt table to the invoice table in a one to many connection, but think it might be better to join both to customer perhaps?
Thanks guys.
Jan 3 '08 #4
NeoPa
32,556 Expert Mod 16PB
That's a good first step eyalco, but as Linq says in his post (#2), your basic question is also phrased in such a way as to be very hard to understand (I didn't manage to work out what you were saying).
Perhaps you could try rewriting it carefully (remember punctuation can be your friend - especially where there is ambiguity).
I get that you want to know how best to design your table structure (a good question by the way - shows you're thinking along the right lines). What I don't get is the scenario you have to work within.
Jan 3 '08 #5
eyalco
38
Thanks.
As you said, I want to know what w'd be the best way to join the relations between the tables - will it be throug receipt ==> invoice in a 1 to many relation or is it better to join both to customer table? or any other suggestion you might have?

The 2nd thing I mentioned was that each receipt has 12 invoices (1 for every month of the year), I want to relate each monthly invoice to the relevant receipt so I can see for each invoice to which receipt it "belongs" and on the other hand, when looking at on going receipt, I can see how many invoices are related to.

I hope I'm clearer - please direct me if not.
Appreciate your help.
Jan 3 '08 #6
NeoPa
32,556 Expert Mod 16PB
I'm afraid you don't seem to have grasped the problem here. Let's try again.

First you need to describe the overview of your project clearly. Don't use any terms that have not already been defined and made clear. There's nothing more frustrating than being told you needn't worry about the urgles as they're simply offshoots of the oojimaflips.

Explain how all the parts of the project fit together. For this purpose you can ignore any parts of the project that don't pertain to your particular problem or question. We're mainly looking to pass the question on from one party to another via a web page.

Avoid making unfounded assumptions. Because you know how receipts relate to invoices in your system, don't assume that they are connected that way universally, or even that if they were, someone would know that without being told.

Pay particular attention to explaining how the particular tables that you're asking about work together logically.

If you can explain all this clearly then we can start looking at your issue and recommending the best way forward :)
Jan 4 '08 #7
eyalco
38
Well, I'll explain the project, maybe it will clear things up :
It's a kindergarten where parents come once a year and pay with 12 checks, 1 for each month. Upon payment, they receive a receipt with their 12 checks listed. Every time when a check is due, we issue an invoice.

That's it.
Hope you can help.
Thabks.
Jan 5 '08 #8
NeoPa
32,556 Expert Mod 16PB
So, if I understand you correctly :
An invoice is issued once a year (when all twelve cheques are due).
An invoice consists of twelve separate items and payment for all twelve are expected in one go. Hence this is like a single item.
Receipts are issued for each item, but the twelve separate months are included on the one recipt. Making it similar to the invoice.
What would be the relation between the receipt/invoice tables and how do I make the relevant receipt number for each invoice please?
  1. In this case you need would have a one for one relationship between Invoice and Receipt tables. Assuming the invoice is entered first, the receipt should have a foreign key field pointing to the matching invoice record.
  2. No idea. There is no information supplied for this.
Jan 5 '08 #9
eyalco
38
Few clarifications please :

So, if I understand you correctly :
An invoice is issued once a year (when all twelve cheques are due).
It's the other way around : A receipt is isuued once a year - with 12 utems, each item is a chexk(payment) details.

An invoice consists of twelve separate items and payment for all twelve are expected in one go. Hence this is like a single item.
A receipt consists of twelve separate items. Payment is seperated monthly - each month = 1 payment.


Receipts are issued for each item, but the twelve separate months are included on the one recipt
Receipts are issued for 12 items at once, only once a year.
Each receipt consists of 12 monthly payments or actualy of 12 invoices (a check/payment becomes an invoice every month when it's due.

Does that seem different then what u mentioned? will it change your answer?
Thanks.
Jan 6 '08 #10
NeoPa
32,556 Expert Mod 16PB
Let me explain what is going on here and why I'm not going to spend any more of my time on this thread - or any other where you show the same attitude to requesting free help.
Post #7 (NeoPa)
(translation)
I've tried to decipher what you've posted but it doesn't make sense. This is because you can't be bothered to formulate a question properly or clearly.
Please try again and pay particular attention to various points - including that it's written in proper English so there are no ambiguities.

Post #8 (eyalco)
(clearly ignoring almost everything I say AGAIN)
It's a kindergarten where parents come once a year and pay with 12 checks, 1 for each month. Upon payment, they receive a receipt with their 12 checks listed. Every time when a check is due, we issue an invoice.

Ambiguous. As short as possible to save YOU time and effort (which of course adds both on to my plate - thank you).
It's not even checked before posting. I ask for care and you sign off "thabks". That doesn't say any care at all to me.

Post #9 (NeoPa)
Trying to make sense out of what doesn't naturally make sense.
I offer up my interpretation of your project, knowing it's unlikely to be 100% accurate as post #8 doesn't hold together well.
I offer an answer to one of your questions from the information already posted.

Post #10 (eyalco)
It's the other way around : A receipt is isuued once a year - with 12 utems, each item is a chexk(payment) details.
Note three typos included in a single sentence even now.
This directly contradicts "It's a kindergarten where parents come once a year and pay with 12 checks".
I'm sure you meant this to be different from what you posted - but you couldn't be bothered to make it say what you meant. I've rarely seen such a simple issue so clouded by poor posting in all my time here at TSDN.

Frankly, after being requested (and told by a mod) to post your question more clearly four times, you still cannot be bothered to formulate your question clearly, or even check your post for typos before you post it (or even read it to yourself to check after posting and fix them).
I'm thoroughly shocked that you show such blatant disregard for the time and efforts that are put in by someone trying to offer you free assistance.
Jan 6 '08 #11
eyalco
38
I really am sorry if I offended you or anyone in this forum which I admire greatly.
Regarding my spell or grammar, english is not my native tongue so bad grammar or spelling isn't disrespect.

I do appreciate your time trying to help and my last post was meant to explain more of my problem and not show any kind of disrespect.

Again, my apologies
Jan 7 '08 #12
NeoPa
32,556 Expert Mod 16PB
Eyalco,

I appreciate your last response, and I will certainly bear in mind for future reference that English is not your native language. It may be worth updating your profile to show where you come from (country). This is not required (you don't HAVE to) but can sometimes help the moderators and experts to make allowance for possible communication problems (I certainly checked there first).

With regards to your question, I will look at it again for you when I can get some time free.
Jan 7 '08 #13
NeoPa
32,556 Expert Mod 16PB
An Invoice then is a logical child of the receipt, but the Receipt (presumably) must come after the Invoices.
I suggest then that each year you create a (dormant) Receipt at the start, with a link to the Customer (The Customer key should be stored as an FK (Foreign Key) in the Receipt record). Each Invoice would have a link to this Receipt record (again, Receipt key stored as an FK in Invoice record). When the Receipt is actually produced, then a flag could be changed in the Receipt record to indicate this.

PS. Sorry this has been a long time in coming - it's been a very busy week for me.
Jan 12 '08 #14
eyalco
38
Thanks for your reply.
I'll start playing with it, see where It'll take me.

Appreciate your help.
Jan 19 '08 #15

Sign in to post your reply or Sign up for a free account.

Similar topics

2
by: SusieS | last post by:
I'm trying to set up a simple relational Access database to look after customer orders for our small bookselling operation. I'm a beginner at this, teaching myself via Help files and the manual...
5
by: Chris Thunell | last post by:
I'm using the system.web.mail in vb.net to send emails out in a vb.net application. The sending of emails works great. Is there a way to have it send me back a delivery receipt or a read receipt?...
0
by: Kostadin Kostov | last post by:
Hi! I'm developing component for sending emails and want to have the ability to request delivery receipt when sending an email. I use the "Return-Receipt-To" header:...
2
by: Chris Dunaway | last post by:
I have a web service which is accessed by a windows forms application. When the application submits a unit of work (a "job"), I want to return a job receipt or tracking number back to the...
1
by: Mike | last post by:
This will consist of : Master Invoice File with a 1 to many relationship Invoice Details file - each line of Invoice will be held in here Stock File Can anyone point me to some resource or...
1
by: Declan Barry | last post by:
Hi all.. I have a query from one of our students regarding an order invoice payment database. The student can make up the order database okay where a customer picks a number of products and...
1
by: hasanainf | last post by:
Hi all and thanking you all in advance for your help My client wants to use a receipt printer. Since I have never used one before I have some questions. 1. Unlike other printers which are set...
3
by: hugz | last post by:
I'm a beginner of access.. CAn sumbdy help me in constructing my tables that connects the receipt number to the items purchased if the receipt number is set to Autonumber...pls help... i nid d...
7
by: ARC | last post by:
Hello all, What's the proper paper size setting if you want to do a receipt printer report, that's a continuous form? I don't really see an option for a continuous paper size. Thanks! Andy
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
by: ryjfgjl | last post by:
In our work, we often receive Excel tables with data in the same format. If we want to analyze these data, it can be difficult to analyze them because the data is spread across multiple Excel files...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.