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++;
|
$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
|
// Add record into log table
|
||||||
$sql = "INSERT INTO " . MAIN_DB_PREFIX . "product_fournisseur_price_log(";
|
$sql = "INSERT INTO " . MAIN_DB_PREFIX . "product_fournisseur_price_log(";
|
||||||
$sql .= "datec, fk_product_fournisseur,fk_user,price,quantity)";
|
$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
|
entity integer DEFAULT 1 NOT NULL, -- multi company id
|
||||||
datec datetime,
|
datec datetime,
|
||||||
fk_product integer NOT NULL,
|
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 double(24,8) DEFAULT 0,
|
||||||
price_ttc double(24,8) DEFAULT 0,
|
price_ttc double(24,8) DEFAULT 0,
|
||||||
price_min double(24,8) DEFAULT 0,
|
price_min double(24,8) DEFAULT 0,
|
||||||
|
|||||||
@ -676,15 +676,12 @@ class Productcustomerprice extends CommonObject
|
|||||||
|
|
||||||
if (! $error) {
|
if (! $error) {
|
||||||
if (! $notrigger) {
|
if (! $notrigger) {
|
||||||
// Uncomment this and change MYOBJECT to your own tag if you
|
// Call triggers
|
||||||
// want this action calls a trigger.
|
include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php';
|
||||||
|
$interface=new Interfaces($this->db);
|
||||||
// // Call triggers
|
$result=$interface->run_triggers('PRODUCT_CUSTOMER_PRICE_UPDATE',$this,$user,$langs,$conf);
|
||||||
// include_once DOL_DOCUMENT_ROOT . '/core/class/interfaces.class.php';
|
if ($result < 0) { $error++; $this->errors=$interface->errors; }
|
||||||
// $interface=new Interfaces($this->db);
|
// End call triggers
|
||||||
// $result=$interface->run_triggers('MYOBJECT_MODIFY',$this,$user,$langs,$conf);
|
|
||||||
// if ($result < 0) { $error++; $this->errors=$interface->errors; }
|
|
||||||
// // End call triggers
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user