If the invoice.amount is 50.00, it mean I need to send the company the fees. If the invoice.amount is -50.00 (minus), it mean company will need to send me the fees amount. From the result example invoice.amount is 55.00 because it has been calculated from pany_id = 2 table Invoices will be generated every 2 weeks. This is where I am quite stuck on invoice tables design. | id | company_id | invoice_no | invoice_date | amount | status_id | Invoice table mysql> select * from invoice List of products what customers have ordered. | id | order_id | product_id | product_name | cost | Orders_products table mysql> select * from orders_products I know the orders fields is not enough, just simplified for you. Two customers have ordered the products from Company B ( pany_id = 2). | id | user_id | company_id | total_cost | order_date | status_id | Orders table mysql> select * from orders Here is the database design I have came up with:Ĭompany table mysql> select * from company Ĭustomers can select a company from my website.
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |