If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Database Server Software > MySQL > Invoice table: Send fees and Receive Fees

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 06-13-11, 07:02
StrikePower StrikePower is offline
Registered User
 
Join Date: Jun 2011
Posts: 1
Invoice table: Send fees and Receive Fees

I am creating an invoice table for the customers. Sometime they will have to send me the commission fees or sometime I send them fees (account balance). How to design a invoice table in this situation?

I have came up with this solution, im not sure if this is correct or what is the alternative way?

Code:
tbl_invoice
- invoice_id (PK)
- order_id (FK)
- invoice_date
- amount (copy the price from tbl_order.total table)
- status (Invoice Sent, Cancelled, Amount Received, Amount Sent)


tbl_Payments
 - invoice_id (FK)
 - amount_received (recieved commission fees from customer)
 - amount_sent (sent fees to customer)
 - date_received
 - date_sent
if the tbl_invoice.amount is -30.00 that mean customer will send me the fees.

if the tbl_invoice.amount is 30.00 then I will send the customer the fees.

Do I need tbl_invoice.amount field?
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On