From ae9c7ad6b6b9668dddf46e9692053049735dd3b5 Mon Sep 17 00:00:00 2001 From: atm-quentin Date: Mon, 5 Feb 2018 10:40:52 +0100 Subject: [PATCH] FIX unset categorie --- htdocs/societe/card.php | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) diff --git a/htdocs/societe/card.php b/htdocs/societe/card.php index 4807591b9f3..a5ad6f2e270 100644 --- a/htdocs/societe/card.php +++ b/htdocs/societe/card.php @@ -519,15 +519,15 @@ if (empty($reshook)) $error=$object->error; $errors=$object->errors; } } + if(!empty($user->rights->categorie->creer)){ + // Customer categories association + $custcats = GETPOST( 'custcats', 'array' ); + $object->setCategories($custcats, 'customer'); - // Customer categories association - $custcats = GETPOST( 'custcats', 'array' ); - $object->setCategories($custcats, 'customer'); - - // Supplier categories association - $suppcats = GETPOST('suppcats', 'array'); - $object->setCategories($suppcats, 'supplier'); - + // Supplier categories association + $suppcats = GETPOST('suppcats', 'array'); + $object->setCategories($suppcats, 'supplier'); + } // Logo/Photo save $dir = $conf->societe->multidir_output[$conf->entity]."/".$object->id."/logos/"; $file_OK = is_uploaded_file($_FILES['photo']['tmp_name']);