commit
4f0b35874d
@ -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();
|
||||||
|
|
||||||
|
|||||||
@ -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));
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user