FIX : 7213

This commit is contained in:
florian HENRY 2017-07-28 09:45:23 +02:00
parent bdfb0b7561
commit f5718106a6
2 changed files with 56 additions and 55 deletions

View File

@ -249,9 +249,10 @@ class ProductCombination
/** /**
* Deletes a product combination * Deletes a product combination
* *
* @param User $user
* @return int <0 KO >0 OK * @return int <0 KO >0 OK
*/ */
public function delete() public function delete(User $user)
{ {
$this->db->begin(); $this->db->begin();

View File

@ -234,7 +234,7 @@ if ($action === 'confirm_deletecombination') {
$db->begin(); $db->begin();
if ($prodcomb->delete() > 0 && $prodstatic->fetch($prodcomb->fk_product_child) > 0 && $prodstatic->delete() > 0) { if ($prodcomb->delete($user) > 0 && $prodstatic->fetch($prodcomb->fk_product_child) > 0 && $prodstatic->delete($user) > 0) {
$db->commit(); $db->commit();
setEventMessage($langs->trans('RecordSaved')); setEventMessage($langs->trans('RecordSaved'));
header('Location: '.dol_buildpath('/variants/combinations.php?id='.$object->id, 2)); header('Location: '.dol_buildpath('/variants/combinations.php?id='.$object->id, 2));