From 0e259393734503421a87bb6345959c7135a49dff Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Sat, 14 Dec 2013 17:40:23 +0100 Subject: [PATCH] Fix: price function not correctly used --- htdocs/comm/propal.php | 34 +++++++++++++++++----------------- htdocs/societe/soc.php | 2 +- 2 files changed, 18 insertions(+), 18 deletions(-) diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php index 6a963c23658..ef37fa534bd 100644 --- a/htdocs/comm/propal.php +++ b/htdocs/comm/propal.php @@ -701,7 +701,7 @@ else if (($action == 'addline' || $action == 'addline_predef') && $user->rights- $price_base_type = (GETPOST('price_base_type', 'alpha')?GETPOST('price_base_type', 'alpha'):'HT'); $db->begin(); - + // Ecrase $pu par celui du produit // Ecrase $desc par celui du produit // Ecrase $txtva par celui du produit @@ -861,7 +861,7 @@ else if (($action == 'addline' || $action == 'addline_predef') && $user->rights- if ($result > 0) { $db->commit(); - + if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { // Define output language @@ -903,7 +903,7 @@ else if (($action == 'addline' || $action == 'addline_predef') && $user->rights- else { $db->rollback(); - + setEventMessage($object->error, 'errors'); } } @@ -984,11 +984,11 @@ else if ($action == 'updateligne' && $user->rights->propal->creer && GETPOST('sa $error++; } } - + if (! $error) { $db->begin(); - + $result = $object->updateline( GETPOST('lineid'), $pu_ht, @@ -1015,7 +1015,7 @@ else if ($action == 'updateligne' && $user->rights->propal->creer && GETPOST('sa if ($result >= 0) { $db->commit(); - + if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) { // Define output language @@ -1046,7 +1046,7 @@ else if ($action == 'updateligne' && $user->rights->propal->creer && GETPOST('sa else { $db->rollback(); - + setEventMessage($object->error, 'errors'); } } @@ -1980,8 +1980,8 @@ else // Amount HT print ''.$langs->trans('AmountHT').''; - print ''.price($object->total_ht).''; - print ''.$langs->trans("Currency".$conf->currency).''; + print ''.price($object->total_ht,'',$langs,0,-1,-1,$conf->currency).''; + print ''; // Margin Infos if (! empty($conf->margin->enabled)) { @@ -1993,28 +1993,28 @@ else // Amount VAT print ''.$langs->trans('AmountVAT').''; - print ''.price($object->total_tva).''; - print ''.$langs->trans("Currency".$conf->currency).''; + print ''.price($object->total_tva,'',$langs,0,-1,-1,$conf->currency).''; + print ''; // Amount Local Taxes if ($mysoc->localtax1_assuj=="1") //Localtax1 { print ''.$langs->transcountry("AmountLT1",$mysoc->country_code).''; - print ''.price($object->total_localtax1).''; - print ''.$langs->trans("Currency".$conf->currency).''; + print ''.price($object->total_localtax1,'',$langs,0,-1,-1,$conf->currency).''; + print ''; } if ($mysoc->localtax2_assuj=="1") //Localtax2 { print ''.$langs->transcountry("AmountLT2",$mysoc->country_code).''; - print ''.price($object->total_localtax2).''; - print ''.$langs->trans("Currency".$conf->currency).''; + print ''.price($object->total_localtax2,'',$langs,0,-1,-1,$conf->currency).''; + print ''; } // Amount TTC print ''.$langs->trans('AmountTTC').''; - print ''.price($object->total_ttc).''; - print ''.$langs->trans("Currency".$conf->currency).''; + print ''.price($object->total_ttc,'',$langs,0,-1,-1,$conf->currency).''; + print ''; // Statut print ''.$langs->trans('Status').''.$object->getLibStatut(4).''; diff --git a/htdocs/societe/soc.php b/htdocs/societe/soc.php index b9fd30a57e4..881fce7b2b5 100644 --- a/htdocs/societe/soc.php +++ b/htdocs/societe/soc.php @@ -1737,7 +1737,7 @@ else // Capital print ''.$langs->trans('Capital').''; - if ($object->capital) print $object->capital.' '.$langs->trans("Currency".$conf->currency); + if ($object->capital) print price($object->capital,'',$langs,0,-1,-1, $conf->currency); else print ' '; print '';