|
From: | Laurent Destailleur (eldy) |
Subject: | Re: [Dolibarr-dev] update supplier price |
Date: | Fri, 20 Apr 2012 10:50:14 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux i686; rv:11.0) Gecko/20120329 Thunderbird/11.0.1 |
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.phpLe 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
-- Eldy (Laurent Destailleur). --------------------------------------------------------------- EMail: address@hidden Web: http://www.destailleur.fr Dolibarr (Project leader): http://www.dolibarr.org To make a donation for Dolibarr project via Paypal: address@hidden AWStats (Author) : http://awstats.sourceforge.net To make a donation for AWStats project via Paypal: address@hidden AWBot (Author) : http://awbot.sourceforge.net CVSChangeLogBuilder (Author) : http://cvschangelogb.sourceforge.net
[Prev in Thread] | Current Thread | [Next in Thread] |