Merge pull request #6598 from defrance/patch-1
Improved logging of sales and purchasing prices
This commit is contained in:
commit
c398450f27
@ -310,7 +310,7 @@ class ProductFournisseur extends Product
|
||||
$error++;
|
||||
}
|
||||
|
||||
if (! $error && ! empty($conf->global->PRODUCT_PRICE_SUPPLIER_NO_LOG)) {
|
||||
if (! $error && empty($conf->global->PRODUCT_PRICE_SUPPLIER_NO_LOG)) {
|
||||
// Add record into log table
|
||||
$sql = "INSERT INTO " . MAIN_DB_PREFIX . "product_fournisseur_price_log(";
|
||||
$sql .= "datec, fk_product_fournisseur,fk_user,price,quantity)";
|
||||
|
||||
@ -24,7 +24,8 @@ create table llx_product_customer_price_log
|
||||
entity integer DEFAULT 1 NOT NULL, -- multi company id
|
||||
datec datetime,
|
||||
fk_product integer NOT NULL,
|
||||
fk_soc integer NOT NULL,
|
||||
fk_soc integer DEFAULT 0 NOT NULL,
|
||||
price_level smallint NULL DEFAULT 1,
|
||||
price double(24,8) DEFAULT 0,
|
||||
price_ttc double(24,8) DEFAULT 0,
|
||||
price_min double(24,8) DEFAULT 0,
|
||||
|
||||
@ -676,15 +676,12 @@ class Productcustomerprice extends CommonObject
|
||||
|
||||
if (! $error) {
|
||||
if (! $notrigger) {
|
||||
// Uncomment this and change MYOBJECT to your own tag if you
|
||||
// want this action calls a trigger.
|
||||
|
||||
// // Call triggers
|
||||
// include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php';
|
||||
// $interface=new Interfaces($this->db);
|
||||
// $result=$interface->run_triggers('MYOBJECT_MODIFY',$this,$user,$langs,$conf);
|
||||
// if ($result < 0) { $error++; $this->errors=$interface->errors; }
|
||||
// // End call triggers
|
||||
// Call triggers
|
||||
include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php';
|
||||
$interface=new Interfaces($this->db);
|
||||
$result=$interface->run_triggers('PRODUCT_CUSTOMER_PRICE_UPDATE',$this,$user,$langs,$conf);
|
||||
if ($result < 0) { $error++; $this->errors=$interface->errors; }
|
||||
// End call triggers
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Loading…
Reference in New Issue
Block a user