From 78ec4d595b11c22317c54074d0b61a998b3b18cb Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Thu, 2 Oct 2014 15:21:49 +0200 Subject: [PATCH 1/2] Fix trad currency --- ChangeLog | 1 + htdocs/product/composition/fiche.php | 12 ++++++++++-- 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/ChangeLog b/ChangeLog index 34448e95543..218d6aada55 100644 --- a/ChangeLog +++ b/ChangeLog @@ -23,6 +23,7 @@ For users: - Fix: Withdrawal total amount is double - Fix: [ bug #1593 ] Spanish Localtax IRPF not being calculated since 3.6.0 in supplier invoices when adding a line - Fix: Web service categorie WDSL declaration is correct +- Fix: ErrorBadValueForParamNotAString was displayed in virtual product if no base price defined ***** ChangeLog for 3.6 compared to 3.5.* ***** For users: diff --git a/htdocs/product/composition/fiche.php b/htdocs/product/composition/fiche.php index 26761a2d56b..bf89798e79f 100644 --- a/htdocs/product/composition/fiche.php +++ b/htdocs/product/composition/fiche.php @@ -34,6 +34,7 @@ require_once DOL_DOCUMENT_ROOT.'/categories/class/categorie.class.php'; $langs->load("bills"); $langs->load("products"); +$langs->load("main"); $id=GETPOST('id','int'); $ref=GETPOST('ref','alpha'); @@ -292,13 +293,17 @@ if ($id > 0 || ! empty($ref)) { // Price print ''.$langs->trans("SellingPrice").''; + if ($object->price_base_type == 'TTC') { print price($object->price_ttc).' '.$langs->trans($object->price_base_type); } else { - print price($object->price).' '.$langs->trans($object->price_base_type); + print price($object->price); + if (!empty($object->price_base_type)) { + print ' '.$langs->trans($object->price_base_type); + } } print ''; @@ -310,7 +315,10 @@ if ($id > 0 || ! empty($ref)) } else { - print price($object->price_min).' '.$langs->trans($object->price_base_type); + print price($object->price_min); + if (!empty($object->price_base_type)) { + print ' '.$langs->trans($object->price_base_type); + } } print ''; } From 4b28ff005ef29c8de594eca9b24c2ab8a54356ea Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Thu, 2 Oct 2014 15:24:40 +0200 Subject: [PATCH 2/2] Return error message on category creation failure --- ChangeLog | 1 + htdocs/categories/fiche.php | 2 ++ 2 files changed, 3 insertions(+) diff --git a/ChangeLog b/ChangeLog index 218d6aada55..fc92cfd43a9 100644 --- a/ChangeLog +++ b/ChangeLog @@ -24,6 +24,7 @@ For users: - Fix: [ bug #1593 ] Spanish Localtax IRPF not being calculated since 3.6.0 in supplier invoices when adding a line - Fix: Web service categorie WDSL declaration is correct - Fix: ErrorBadValueForParamNotAString was displayed in virtual product if no base price defined +- Fix: Category creation failed and no message output ***** ChangeLog for 3.6 compared to 3.5.* ***** For users: diff --git a/htdocs/categories/fiche.php b/htdocs/categories/fiche.php index a2f9dc54df2..208cbb38331 100644 --- a/htdocs/categories/fiche.php +++ b/htdocs/categories/fiche.php @@ -143,6 +143,8 @@ if ($action == 'add' && $user->rights->categorie->creer) { $action = 'confirmed'; $_POST["addcat"] = ''; + } else { + setEventMessage($object->error,'errors'); } } }