Merge pull request #19459 from frederic34/productmerge

can merge products
This commit is contained in:
Laurent Destailleur
2022-04-07 15:02:03 +02:00
committed by GitHub
19 changed files with 461 additions and 7 deletions

View File

@@ -4039,6 +4039,23 @@ class Commande extends CommonOrder
return CommonObject::commonReplaceThirdparty($db, $origin_id, $dest_id, $tables);
}
/**
* Function used to replace a product id with another one.
*
* @param DoliDB $db Database handler
* @param int $origin_id Old product id
* @param int $dest_id New product id
* @return bool
*/
public static function replaceProduct(DoliDB $db, $origin_id, $dest_id)
{
$tables = array(
'commandedet',
);
return CommonObject::commonReplaceProduct($db, $origin_id, $dest_id, $tables);
}
/**
* Is the customer order delayed?
*