Dolibarr ERP & CRM » Tasks and Feature requests » task #645
Remove field fk_product_fournisseur_price from all "->addline" and "->updateline" method. Remove fields from details tables.Dernières modifications
Répondre
État Détails |
Submitted on: | 19/12/2012 15:57 | | Submitted by: | Laurent Destailleur (eldy) |
Last Modified On: | 05/06/2013 22:34 | |
Summary: | Remove field fk_product_fournisseur_price from all "->addline" and "->updateline" method. Remove fields from details tables. |
Description: | Remove field fk_product_fournisseur_price from all addline method and details tables.
This field is useless, because the pa_ht is used instead for margin calculation. |
Priority: | 9 - Highest | | Open to Any Developer: | No |
Subproject: | Aucun | | Assigned to (multiple): | Aucun |
Etat |
Start Date: | - | | End Date: | - |
Completion (0-100%): | 0 | | Status: | Open |
Commentaires- Christophe Battarel 06/06/2013 14:21
- i persist to think that margin calculation must be made at invoice time, so the buying price must be the one at invoice time.
if a customer orders a 10 euros product that costs me 5 euros at this time, but when i do the invoice it costs 6 euros, the margin is 10 - 6, and not 10 - 5.
other solution, we should maybe use an average price (PMP in french) but it can only be done with stocked products. - Laurent Destailleur 05/06/2013 22:34
- Price used when order is defined must be saved into pa_ht.
So price can change after, it is not a problem since value used was saved during order creation. There is no reason to have a link to a table that is a view at t time, so a value useless for calculation since what we need is value when element was created. - address@hidden 19/12/2012 22:34
- This field is used in case supplier price change between order and invoice
- Laurent Destailleur 19/12/2012 17:42
- Remove field fk_product_fournisseur_price from all "->addline" and "->updateline" method.
Remove fields from details tables.
Remove also field label that are duplicate fields and create conflicts.
|
|
if a customer orders a 10 euros product that costs me 5 euros at this time, but when i do the invoice it costs 6 euros, the margin is 10 - 6, and not 10 - 5.
other solution, we should maybe use an average price (PMP in french) but it can only be done with stocked products.