Inject $user for createProductCombination

This commit is contained in:
Cédric 2019-11-17 01:25:44 +01:00 committed by GitHub
parent 40e4af234d
commit a7f42b3fdf
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -141,7 +141,7 @@ if ($_POST) {
if (!$prodcomb->fetchByProductCombination2ValuePairs($id, $sanit_features))
{
$result = $prodcomb->createProductCombination($object, $sanit_features, array(), $price_impact_percent, $price_impact, $weight_impact);
$result = $prodcomb->createProductCombination($user, $object, $sanit_features, array(), $price_impact_percent, $price_impact, $weight_impact);
if ($result > 0)
{
setEventMessages($langs->trans('RecordSaved'), null, 'mesgs');
@ -268,7 +268,7 @@ if ($action === 'confirm_deletecombination') {
if ($prodstatic->fetch('', $dest_product) > 0) {
//To prevent from copying to the same product
if ($prodstatic->ref != $object->ref) {
if ($prodcomb->copyAll($object->id, $prodstatic) > 0) {
if ($prodcomb->copyAll($user, $object->id, $prodstatic) > 0) {
header('Location: '.dol_buildpath('/variants/combinations.php?id='.$prodstatic->id, 2));
exit();
} else {