mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-02-07 16:41:48 +01:00
NEW #35700 : Throw an error when validating a propal, order, supplier with a product no more in sale/purchase… (#35709)
* Fix #35700 : Throw an error when validating a propal, order, supplier proposal, supplier order if some products doesn't have the good status (on sale, on buy) * Fix #35700 : Throw an error when validating a propal, order, supplier proposal, supplier order if some products doesn't have the good status (on sale, on buy) * Fix #35700 : Throw an error when validating a propal, order, supplier proposal, supplier order if some products doesn't have the good status (on sale, on buy) * Fix #35700 : Throw an error when validating a propal, order, supplier proposal, supplier order if some products doesn't have the good status (on sale, on buy) * Fix #35700 : Throw an error when validating a propal, order, supplier proposal, supplier order if some products doesn't have the good status (on sale, on buy) * Update commonobject.class.php * Refactor checkActiveProductInLines method * Fix comment formatting in commonobject.class.php * Update commonobject.class.php --------- Co-authored-by: vmaury <vmaury@vmaury-Lafite-Pro-16-AMD> Co-authored-by: Laurent Destailleur <eldy@destailleur.fr>
This commit is contained in:
@@ -529,7 +529,10 @@ class Commande extends CommonOrder
|
||||
$this->error = 'ErrorWrongParameters';
|
||||
return -1;
|
||||
}
|
||||
|
||||
if (!getDolGlobalBool('ORDER_NOCHECK_ONSALE_PRODUCTS_ONVALID') && !$this->checkActiveProductInLines()) {
|
||||
dol_syslog(get_class($this)."::valid checkActiveProductInLines ".$this->error, LOG_INFO);
|
||||
return -1;
|
||||
}
|
||||
$now = dol_now();
|
||||
|
||||
$this->db->begin();
|
||||
|
||||
Reference in New Issue
Block a user