When we select an SKU or item name in any of these documents, much info such as invoice.line_items.rate is pulled from the item & filled into the document being worked on.
If we had another lineItem DB field (hidden) auto filled at the same time: invoice.line_items.purchase_rate then it would be a simple task to add an autoCalc column for the margin or profit achieved at the item rate entered.
This would also aid in retrieval of data through the api as we wouldn't have to call separately for each line item!
The edit [document] window could then easily display & adjust on the fly the overall margin / profit !
To ensure that invoice margins are monitored I have to pull this info through the api for each invoice produced & this can entail many calls dependent on the number of line items, with the invoice.line_items.purchase_rate pre-filled then only 1 api call would be required.
Most users would just like to see this info displayed on production of these documents without going to such extremes !
One other issue regarding sales entry is the inability to edit the item line amount, this should be allowed & auto amend the rate on edit.
Scenario: a user has sold 27 widgets @ 0.27 but had agreed to a price of 7.00 exactly.
Now you do the calcs yourself & see how much of a pain it is to calculate & enter the rate of 0.25925925925.........
Being able to edit the line amount is a no-brainer !!