mirror of
https://github.com/Dolibarr/dolibarr.git
synced 2026-01-06 17:13:03 +01:00
Update propal.class.php
Fix IDs on created proposal lines when cloning so the hook createFrom has all the clone infos
This commit is contained in:
@@ -1264,6 +1264,10 @@ class Propal extends CommonObject
|
||||
dol_print_error($this->db);
|
||||
break;
|
||||
}
|
||||
|
||||
// Set the id on created row
|
||||
$line->id = $result;
|
||||
|
||||
// Defined the new fk_parent_line
|
||||
if ($result > 0 && $line->product_type == 9) {
|
||||
$fk_parent_line = $result;
|
||||
@@ -1397,6 +1401,9 @@ class Propal extends CommonObject
|
||||
}
|
||||
|
||||
foreach ($object->lines as $line) {
|
||||
|
||||
$line->id = 0;
|
||||
|
||||
if ($line->fk_product > 0) {
|
||||
$prod = new Product($this->db);
|
||||
$res = $prod->fetch($line->fk_product);
|
||||
|
||||
Reference in New Issue
Block a user