Merge branch '17.0' of git@github.com:Dolibarr/dolibarr.git into 17.0
This commit is contained in:
commit
3966eea1e1
@ -744,12 +744,22 @@ if (empty($reshook)) {
|
||||
|
||||
$fk_unit = GETPOST('unit', 'alpha');
|
||||
|
||||
// update price_ht with discount
|
||||
// TODO Use object->updateline instead objedtline->update
|
||||
|
||||
$price_ht = price2num(GETPOST('elprice'), 'MU');
|
||||
$remise_percent = price2num(GETPOST('elremise_percent'), 2);
|
||||
if ($remise_percent > 0) {
|
||||
$remise = round(($price_ht * $remise_percent / 100), 2);
|
||||
$price_ht = ($price_ht - $remise);
|
||||
}
|
||||
|
||||
$objectline->fk_product = GETPOST('idprod', 'int');
|
||||
$objectline->description = GETPOST('product_desc', 'restricthtml');
|
||||
$objectline->price_ht = price2num(GETPOST('elprice'), 'MU');
|
||||
$objectline->price_ht = $price_ht;
|
||||
$objectline->subprice = price2num(GETPOST('elprice'), 'MU');
|
||||
$objectline->qty = price2num(GETPOST('elqty'), 'MS');
|
||||
$objectline->remise_percent = price2num(GETPOST('elremise_percent'), 2);
|
||||
$objectline->remise_percent = $remise_percent;
|
||||
$objectline->tva_tx = ($txtva ? $txtva : 0); // Field may be disabled, so we use vat rate 0
|
||||
$objectline->vat_src_code = $vat_src_code;
|
||||
$objectline->localtax1_tx = is_numeric($localtax1_tx) ? $localtax1_tx : 0;
|
||||
|
||||
@ -119,7 +119,7 @@ class modMrp extends DolibarrModules
|
||||
$this->hidden = false;
|
||||
// List of module class names as string that must be enabled if this module is enabled. Example: array('always1'=>'modModuleToEnable1','always2'=>'modModuleToEnable2', 'FR1'=>'modModuleToEnableFR'...)
|
||||
$this->depends = array('modBom');
|
||||
$this->requiredby = array(); // List of module class names as string to disable if this one is disabled. Example: array('modModuleToDisable1', ...)
|
||||
$this->requiredby = array('modWorkstation'); // List of module class names as string to disable if this one is disabled. Example: array('modModuleToDisable1', ...)
|
||||
$this->conflictwith = array(); // List of module class names as string this module is in conflict with. Example: array('modModuleToDisable1', ...)
|
||||
$this->langfiles = array("mrp");
|
||||
$this->phpmin = array(7, 0); // Minimum version of PHP required by module
|
||||
|
||||
@ -120,7 +120,7 @@ class modWorkstation extends DolibarrModules
|
||||
// A condition to hide module
|
||||
$this->hidden = false;
|
||||
// List of module class names as string that must be enabled if this module is enabled. Example: array('always1'=>'modModuleToEnable1','always2'=>'modModuleToEnable2', 'FR1'=>'modModuleToEnableFR'...)
|
||||
$this->depends = array();
|
||||
$this->depends = array('modMrp');
|
||||
$this->requiredby = array(); // List of module class names as string to disable if this one is disabled. Example: array('modModuleToDisable1', ...)
|
||||
$this->conflictwith = array(); // List of module class names as string this module is in conflict with. Example: array('modModuleToDisable1', ...)
|
||||
$this->langfiles = array("mrp");
|
||||
|
||||
Loading…
Reference in New Issue
Block a user