Merge pull request #8840 from all3kcis/patch-9

Add oldcopy on productlot::update()
This commit is contained in:
Laurent Destailleur 2018-05-25 10:22:18 +02:00 committed by GitHub
commit f416f9629e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -301,6 +301,13 @@ class Productlot extends CommonObject
// Check parameters // Check parameters
// Put here code to add a control on parameters values // Put here code to add a control on parameters values
if (empty($this->oldcopy))
{
$org=new self($this->db);
$org->fetch($this->id);
$this->oldcopy=$org;
}
// Update request // Update request
$sql = 'UPDATE ' . MAIN_DB_PREFIX . $this->table_element . ' SET'; $sql = 'UPDATE ' . MAIN_DB_PREFIX . $this->table_element . ' SET';
$sql .= ' entity = '.(isset($this->entity)?$this->entity:"null").','; $sql .= ' entity = '.(isset($this->entity)?$this->entity:"null").',';