diff --git a/htdocs/comm/fiche.php b/htdocs/comm/fiche.php index 3fd907b29f9fc..f33ae4adc8316 100644 --- a/htdocs/comm/fiche.php +++ b/htdocs/comm/fiche.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2013 Laurent Destailleur + * Copyright (C) 2004-2014 Laurent Destailleur * Copyright (C) 2004 Eric Seigne * Copyright (C) 2006 Andre Cianfarani * Copyright (C) 2005-2012 Regis Houssin @@ -187,9 +187,6 @@ dol_print_error($db,$object->error); } - /* - * Affichage onglets - */ $head = societe_prepare_head($object); @@ -397,7 +394,6 @@ print ''; } - // Multiprice level if (! empty($conf->global->PRODUIT_MULTIPRICES)) { @@ -410,7 +406,11 @@ print ''.img_edit($langs->trans("Modify")).''; } print ''; - print ''.$object->price_level.""; + print ''; + print $object->price_level; + $keyforlabel='PRODUIT_MULTIPRICES_LABEL'.$object->price_level; + if (! empty($conf->global->$keyforlabel)) print ' - '.$langs->trans($conf->global->$keyforlabel); + print ""; print ''; } @@ -887,11 +887,9 @@ } print ''; - print "
\n"; if (! empty($conf->global->MAIN_REPEATCONTACTONEACHTAB)) { - print '
'; // List of contacts show_contacts($conf,$langs,$db,$object,$_SERVER["PHP_SELF"].'?socid='.$object->id); } diff --git a/htdocs/product/price.php b/htdocs/product/price.php index 3970047a59fbf..19c18be82b428 100644 --- a/htdocs/product/price.php +++ b/htdocs/product/price.php @@ -1,6 +1,6 @@ - * Copyright (C) 2004-2012 Laurent Destailleur + * Copyright (C) 2004-2014 Laurent Destailleur * Copyright (C) 2005 Eric Seigne * Copyright (C) 2005-2013 Regis Houssin * Copyright (C) 2006 Andre Cianfarani @@ -59,14 +59,17 @@ $result = $object->fetch($id); // MultiPrix - if (! empty($conf->global->PRODUIT_MULTIPRICES)) { + if (! empty($conf->global->PRODUIT_MULTIPRICES)) + { $newprice = ''; $newprice_min = ''; $newpricebase = ''; $newvat = ''; - for($i = 1; $i <= $conf->global->PRODUIT_MULTIPRICES_LIMIT; $i ++) { - if (isset($_POST ["price_" . $i])) { + for ($i = 1; $i <= $conf->global->PRODUIT_MULTIPRICES_LIMIT; $i ++) + { + if (isset($_POST ["price_" . $i])) + { $level = $i; $newprice = price2num($_POST ["price_" . $i], 'MU'); $newprice_min = price2num($_POST ["price_min_" . $i], 'MU'); @@ -129,8 +132,8 @@ // $newminprice=price2num(GETPOST("price_min"),'MU'); // TODO : Add min price management $quantity = GETPOST('quantity'); $remise_percent = price2num(GETPOST('remise_percent')); - $remise = 0; // TODO : allow dicsount by amount when available on documents - + $remise = 0; // TODO : allow discount by amount when available on documents + if (empty($quantity)) { $error ++; $mesg = '
' . $langs->trans("ErrorFieldRequired", $langs->transnoentities("Qty")) . '
'; @@ -327,15 +330,24 @@ // TVA print '' . $langs->trans("VATRate") . '' . vatrate($object->multiprices_tva_tx ["$soc->price_level"], true) . ''; - } else { - for($i = 1; $i <= $conf->global->PRODUIT_MULTIPRICES_LIMIT; $i ++) { + } + else + { + for($i = 1; $i <= $conf->global->PRODUIT_MULTIPRICES_LIMIT; $i ++) + { // TVA if ($i == 1) // We show only price for level 1 { print '' . $langs->trans("VATRate") . '' . vatrate($object->multiprices_tva_tx [1], true) . ''; } - print '' . $langs->trans("SellingPrice") . ' ' . $i . ''; + print ''; + + // Label of price + print '' . $langs->trans("SellingPrice") . ' ' . $i; + $keyforlabel='PRODUIT_MULTIPRICES_LABEL'.$i; + if (! empty($conf->global->$keyforlabel)) print ' - '.$langs->trans($conf->global->$keyforlabel); + print ''; if ($object->multiprices_base_type ["$i"] == 'TTC') { print '' . price($object->multiprices_ttc ["$i"]);