From 0a4d040e9d38f866f01632bd1ae26105d42f4476 Mon Sep 17 00:00:00 2001 From: Laurent Destailleur <eldy@destailleur.fr> Date: Tue, 7 Oct 2014 21:15:14 +0200 Subject: [PATCH] Fix: Warning sur traduction --- build.xml | 2 +- htdocs/product/price.php | 29 ++++++++++++++++------------- 2 files changed, 17 insertions(+), 14 deletions(-) diff --git a/build.xml b/build.xml index fc267bf196e..570821a7c7b 100644 --- a/build.xml +++ b/build.xml @@ -1,6 +1,6 @@ <?xml version="1.0" encoding="UTF-8"?> <project name="dolibarr" default="hudson" basedir="."> - +fdfds <!-- Exclude/ignore paths --> <property name="ignorepaths" value="${basedir}/htdocs/conf,${basedir}/htdocs/core/filemanagerdol,${basedir}/htdocs/includes" /> <property name="ignoreregexp" value="**/PEAR/*,**/NET/*,**/HTTP/*,**/zendgdata/*,**/reportico/*" /> diff --git a/htdocs/product/price.php b/htdocs/product/price.php index 6971a5bb125..801573a316f 100644 --- a/htdocs/product/price.php +++ b/htdocs/product/price.php @@ -341,21 +341,23 @@ if ($isphoto) { print '</tr>'; // MultiPrix -if (! empty($conf->global->PRODUIT_MULTIPRICES)) { - if (! empty($socid)) { +if (! empty($conf->global->PRODUIT_MULTIPRICES)) +{ + if (! empty($socid)) + { $soc = new Societe($db); $soc->id = $socid; $soc->fetch($socid); print '<tr><td>' . $langs->trans("SellingPrice") . '</td>'; - if ($object->multiprices_base_type ["$soc->price_level"] == 'TTC') { + if ($object->multiprices_base_type["$soc->price_level"] == 'TTC') { print '<td>' . price($object->multiprices_ttc ["$soc->price_level"]); } else { print '<td>' . price($object->multiprices ["$soc->price_level"]); } - if ($object->multiprices_base_type ["$soc->price_level"]) { + if ($object->multiprices_base_type["$soc->price_level"]) { print ' ' . $langs->trans($object->multiprices_base_type ["$soc->price_level"]); } else { print ' ' . $langs->trans($object->price_base_type); @@ -364,15 +366,16 @@ if (! empty($conf->global->PRODUIT_MULTIPRICES)) { // Prix mini print '<tr><td>' . $langs->trans("MinPrice") . '</td><td>'; - if ($object->multiprices_base_type ["$soc->price_level"] == 'TTC') { - print price($object->multiprices_min_ttc ["$soc->price_level"]) . ' ' . $langs->trans($object->multiprices_base_type ["$soc->price_level"]); + if ($object->multiprices_base_type["$soc->price_level"] == 'TTC') + { + print price($object->multiprices_min_ttc["$soc->price_level"]) . ' ' . $langs->trans($object->multiprices_base_type["$soc->price_level"]); } else { - print price($object->multiprices_min ["$soc->price_level"]) . ' ' . $langs->trans($object->multiprices_base_type ["$soc->price_level"]); + print price($object->multiprices_min["$soc->price_level"]) . ' ' . $langs->trans(empty($object->multiprices_base_type["$soc->price_level"])?'HT':$object->multiprices_base_type["$soc->price_level"]); } print '</td></tr>'; // TVA - print '<tr><td>' . $langs->trans("VATRate") . '</td><td>' . vatrate($object->multiprices_tva_tx ["$soc->price_level"], true) . '</td></tr>'; + print '<tr><td>' . $langs->trans("VATRate") . '</td><td>' . vatrate($object->multiprices_tva_tx["$soc->price_level"], true) . '</td></tr>'; } else { @@ -393,12 +396,12 @@ if (! empty($conf->global->PRODUIT_MULTIPRICES)) { print '</td>'; if ($object->multiprices_base_type ["$i"] == 'TTC') { - print '<td>' . price($object->multiprices_ttc ["$i"]); + print '<td>' . price($object->multiprices_ttc["$i"]); } else { - print '<td>' . price($object->multiprices ["$i"]); + print '<td>' . price($object->multiprices["$i"]); } - if ($object->multiprices_base_type ["$i"]) { + if ($object->multiprices_base_type["$i"]) { print ' ' . $langs->trans($object->multiprices_base_type ["$i"]); } else { print ' ' . $langs->trans($object->price_base_type); @@ -408,9 +411,9 @@ if (! empty($conf->global->PRODUIT_MULTIPRICES)) { // Prix mini print '<tr><td>' . $langs->trans("MinPrice") . ' ' . $i . '</td><td>'; if ($object->multiprices_base_type ["$i"] == 'TTC') { - print price($object->multiprices_min_ttc ["$i"]) . ' ' . $langs->trans($object->multiprices_base_type ["$i"]); + print price($object->multiprices_min_ttc["$i"]) . ' ' . $langs->trans($object->multiprices_base_type["$i"]); } else { - print price($object->multiprices_min ["$i"]) . ' ' . $langs->trans($object->multiprices_base_type ["$i"]); + print price($object->multiprices_min["$i"]) . ' ' . $langs->trans(empty($object->multiprices_base_type["$i"])?'HT':$object->multiprices_base_type["$i"]); } print '</td></tr>'; -- GitLab