Step zero: Make sure you can do all the calculations on paper, first, before trying to implement logic in any computer program. Write each type of calculation down. Categorize it. You need to understand the business rules of your own system (as in where discounts should apply). That system documentation (system understanding) should also come before even thinking about doing a database system.
An important question:
Will any invoices need to list more than one item bought/sold?
If yes, you need a related line items table to list the items, their qty, unit price, line item cost, etc.
no. always purchases or sales are for 1 product
because transactions are per truck
i think im clear on the business logic. my problem is I dont know how to apply it on fm
for starters I have seen many videos but this has more difficulty since the result of weight is on another table and is used on calculations and discounts should be on other table
when building a report everything gets confusing