No problem for the patch, i was about to do it but just wanted to know if there was a functionnal reason for such coding before.
Thanks to answer so quickly :-)

Le 20/04/2012 10:50, Laurent Destailleur (eldy) a écrit :
OK.
I know the reason:
The reason is the function is use for update but also for first creation (if line still not exist). So delete/insert solve both situation. But it is possible to fix this to do "if not exist, create, else update". It will be better.

Are you hot to develop/submit such a patch ?


Le 20/04/2012 10:33, Christophe Battarel a écrit :
I work on 3.11 but it seems to be the same in 3.2 : function update_buyprice in fourn/class/fournisseur.product.class.php


Le 20/04/2012 10:31, Laurent Destailleur (eldy) a écrit :
There was some changes into 3.2 for supplier prices management (one useless table less).
Do you speak about 3.2 or previous version ?


Le 20/04/2012 10:07, Christophe Battarel a écrit :
Hello,
I dont understand when you want to update a supplier price, you delete it then recreate it in the database.

I'm developing a module for commercial margins and i wanted to memorize the rowid of the supplier price in case it change between propale and order; but if the rowid change when you update a supplier price, my code is useless.

So my question is : do you have a reason for delete and recreate the supplier price instead of update it ?

Regards,
Christophe







--
Responsable technique
SARL altairis
www.altairis.fr
09 52 71 70 96


_______________________________________________
Dolibarr-dev mailing list
[email protected]
https://lists.nongnu.org/mailman/listinfo/dolibarr-dev

Répondre à