From 13d6664ab499ac66f036388fd8f6a7924e9876ca Mon Sep 17 00:00:00 2001 From: fappels Date: Sun, 9 Jul 2017 12:47:51 +0200 Subject: [PATCH 1/3] Fix delete product from product card --- htdocs/product/card.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/product/card.php b/htdocs/product/card.php index 3266d02f2f4..0a6c9052b91 100644 --- a/htdocs/product/card.php +++ b/htdocs/product/card.php @@ -561,7 +561,7 @@ if (empty($reshook)) { if (($object->type == Product::TYPE_PRODUCT && $user->rights->produit->supprimer) || ($object->type == Product::TYPE_SERVICE && $user->rights->service->supprimer)) { - $result = $object->delete(DolibarrApiAccess::$user); + $result = $object->delete($user); } if ($result > 0) From f85fcbd2161dedf23cfa75d710c4872418b9019b Mon Sep 17 00:00:00 2001 From: fappels Date: Mon, 10 Jul 2017 12:47:21 +0200 Subject: [PATCH 2/3] Fix categorie navigation --- htdocs/categories/class/categorie.class.php | 2 +- htdocs/categories/viewcat.php | 10 +++++----- 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/htdocs/categories/class/categorie.class.php b/htdocs/categories/class/categorie.class.php index db3364ff04d..1b292b9e470 100644 --- a/htdocs/categories/class/categorie.class.php +++ b/htdocs/categories/class/categorie.class.php @@ -133,7 +133,7 @@ class Categorie extends CommonObject ); public $element='category'; - public $table_element='categories'; + public $table_element='categorie'; public $fk_parent; public $label; diff --git a/htdocs/categories/viewcat.php b/htdocs/categories/viewcat.php index 11aff01dc99..1c6186d5df4 100644 --- a/htdocs/categories/viewcat.php +++ b/htdocs/categories/viewcat.php @@ -35,14 +35,14 @@ require_once DOL_DOCUMENT_ROOT.'/core/class/html.formother.class.php'; $langs->load("categories"); $id=GETPOST('id','int'); -$ref=GETPOST('ref'); +$label=GETPOST('label'); $type=GETPOST('type'); $action=GETPOST('action','aZ09'); $confirm=GETPOST('confirm'); $removeelem = GETPOST('removeelem','int'); $elemid=GETPOST('elemid'); -if ($id == "") +if ($id == "" && $label == "") { dol_print_error('','Missing parameter id'); exit(); @@ -52,7 +52,7 @@ if ($id == "") $result = restrictedArea($user, 'categorie', $id, '&category'); $object = new Categorie($db); -$result=$object->fetch($id); +$result=$object->fetch($id, $label); $object->fetch_optionals($id,$extralabels); if ($result <= 0) { @@ -195,7 +195,7 @@ $head = categories_prepare_head($object,$type); dol_fiche_head($head, 'card', $title, -1, 'category'); $linkback = ''.$langs->trans("BackToList").''; - +$object->next_prev_filter=" type = ".$object->type; $object->ref = $object->label; $morehtmlref='
'.$langs->trans("Root").' >> '; $ways = $object->print_all_ways(" >> ", '', 1); @@ -205,7 +205,7 @@ foreach ($ways as $way) } $morehtmlref.='
'; -dol_banner_tab($object, 'ref', $linkback, ($user->societe_id?0:1), 'ref', 'ref', $morehtmlref, '', 0, '', '', 1); +dol_banner_tab($object, 'label', $linkback, ($user->societe_id?0:1), 'label', 'label', $morehtmlref, '', 0, '', '', 1); /* From 1ab3e0c3fa03bfbfb7e998e30c43981ba11feee9 Mon Sep 17 00:00:00 2001 From: BENKE Charlene Date: Mon, 10 Jul 2017 14:00:32 +0200 Subject: [PATCH 3/3] if no suppliers selected, no subprice yet --- htdocs/supplier_proposal/class/supplier_proposal.class.php | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/htdocs/supplier_proposal/class/supplier_proposal.class.php b/htdocs/supplier_proposal/class/supplier_proposal.class.php index 0c8410213af..1d27e7c4986 100644 --- a/htdocs/supplier_proposal/class/supplier_proposal.class.php +++ b/htdocs/supplier_proposal/class/supplier_proposal.class.php @@ -2841,7 +2841,7 @@ class SupplierProposalLine extends CommonObjectLine $sql.= " ".price2num($this->localtax2_tx).","; $sql.= " '".$this->localtax1_type."',"; $sql.= " '".$this->localtax2_type."',"; - $sql.= " ".price2num($this->subprice).","; + $sql.= " ".(!empty($this->subprice)?price2num($this->subprice):"null").","; $sql.= " ".price2num($this->remise_percent).","; $sql.= " ".(isset($this->info_bits)?"'".$this->info_bits."'":"null").","; $sql.= " ".price2num($this->total_ht).",";