From 2ecb113d30c08e2a5178f50ffbe0c8a05751b71e Mon Sep 17 00:00:00 2001 From: eldy Date: Fri, 22 Feb 2013 00:11:34 +0100 Subject: [PATCH] Fix: categories are set onto category tab --- .../canvas/actions_card_common.class.php | 2 -- htdocs/societe/class/societe.class.php | 9 ++--- htdocs/societe/soc.php | 34 ------------------- 3 files changed, 2 insertions(+), 43 deletions(-) diff --git a/htdocs/societe/canvas/actions_card_common.class.php b/htdocs/societe/canvas/actions_card_common.class.php index 0a46e2c31e2..e2752cebf90 100644 --- a/htdocs/societe/canvas/actions_card_common.class.php +++ b/htdocs/societe/canvas/actions_card_common.class.php @@ -168,7 +168,6 @@ abstract class ActionsCardCommon } $this->object->client = $_POST["client"]; $this->object->fournisseur = $_POST["fournisseur"]; - $this->object->fournisseur_categorie = $_POST["fournisseur_categorie"]; $this->object->commercial_id = $_POST["commercial_id"]; $this->object->default_lang = $_POST["default_lang"]; @@ -488,7 +487,6 @@ abstract class ActionsCardCommon $this->object->LoadSupplierCateg(); $this->tpl['suppliercategory'] = $this->object->SupplierCategories; - $this->tpl['select_suppliercategory'] = $form->selectarray("fournisseur_categorie",$this->object->SupplierCategories,$_POST["fournisseur_categorie"],1); } // Zip diff --git a/htdocs/societe/class/societe.class.php b/htdocs/societe/class/societe.class.php index 7688eec0d66..4d45d8d01f9 100644 --- a/htdocs/societe/class/societe.class.php +++ b/htdocs/societe/class/societe.class.php @@ -143,7 +143,8 @@ class Societe extends CommonObject var $array_options; var $oldcopy; - + + /** * Constructor * @@ -242,9 +243,6 @@ class Societe extends CommonObject $this->add_commercial($user, $user->id); } - // si le fournisseur est classe on l'ajoute - $this->AddFournisseurInCategory($this->fournisseur_categorie); - if ($ret >= 0) { // Appel des triggers @@ -610,9 +608,6 @@ class Societe extends CommonObject } } - // Si le fournisseur est classe on l'ajoute - $this->AddFournisseurInCategory($this->fournisseur_categorie); - // Actions on extra fields (by external module or standard code) // FIXME le hook fait double emploi avec le trigger !! $hookmanager->initHooks(array('thirdpartydao')); diff --git a/htdocs/societe/soc.php b/htdocs/societe/soc.php index cb62e16ab80..11056d4381a 100644 --- a/htdocs/societe/soc.php +++ b/htdocs/societe/soc.php @@ -162,7 +162,6 @@ if (empty($reshook)) $object->client = GETPOST('client'); $object->fournisseur = GETPOST('fournisseur'); - $object->fournisseur_categorie = GETPOST('fournisseur_categorie'); $object->commercial_id = GETPOST('commercial_id'); $object->default_lang = GETPOST('default_lang'); @@ -794,23 +793,6 @@ else print $form->textwithpicto('',$s,1); print ''; print ''; - - // Category - /* This must be set into category tab, like for customer category - if ($object->fournisseur) - { - $load = $object->LoadSupplierCateg(); - if ( $load == 0) - { - if (count($object->SupplierCategories) > 0) - { - print ''; - print ''.$langs->trans('SupplierCategory').''; - print $form->selectarray("fournisseur_categorie",$object->SupplierCategories,GETPOST('fournisseur_categorie'),1); - print ''; - } - } - }*/ } // Status @@ -1256,22 +1238,6 @@ else print ''; print ''; - - // Category - if (! empty($conf->categorie->enabled) && $object->fournisseur) - { - $load = $object->LoadSupplierCateg(); - if ( $load == 0) - { - if (count($object->SupplierCategories) > 0) - { - print ''; - print ''.$langs->trans('SupplierCategory').''; - print $form->selectarray("fournisseur_categorie",$object->SupplierCategories,'',1); - print ''; - } - } - } } // Barcode