From 78ec4d595b11c22317c54074d0b61a998b3b18cb Mon Sep 17 00:00:00 2001 From: Florian HENRY Date: Thu, 2 Oct 2014 15:21:49 +0200 Subject: [PATCH] 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 ''; }