Tom73 Posted August 1, 2003 Posted August 1, 2003 Hi, I would like to see the margin in the product maintenance page. I want to enter the purchase price and the sales price and when I save the product, and go back to edit the product, that the margin has been filled in.: Purchase price (ex. vat) Sales price (ex. vat) Margin (%) I know how create the new fields in the database and in categories.php but I don't know the coding on how to calculate the margin. Regards, Tom
Tom73 Posted August 1, 2003 Author Posted August 1, 2003 Can anybody help me with this? It's probably very simple, I want to calculate margin (against purch.price) and put this in a database field. 1. I have made the margin field in the database 2. The formula is (salesprice-purchaseprice)/purchaseprice* 100 3. Now I just need to know how to code the formula and put it in the database field when the product is updated. regards, Tom
meds Posted December 9, 2003 Posted December 9, 2003 see: margin contribution :D I'm not having much luck installing it tho....
Recommended Posts
Archived
This topic is now archived and is closed to further replies.