From 1ea905d8b36e5e248a0fb2ee5ce7bfa3ad59776c Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Thu, 7 May 2009 12:13:34 +0000 Subject: [PATCH] Look: Format price of discount --- htdocs/comm/propal.php | 4 +++- htdocs/comm/remx.php | 4 ++-- htdocs/commande/fiche.php | 8 +++++--- htdocs/compta/commande/fiche.php | 4 +++- htdocs/compta/facture.php | 2 ++ htdocs/expedition/commande.php | 4 +++- 6 files changed, 18 insertions(+), 8 deletions(-) diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php index e4d716a21f6..b31c8b638a0 100644 --- a/htdocs/comm/propal.php +++ b/htdocs/comm/propal.php @@ -997,9 +997,11 @@ if ($id > 0 || ! empty($ref)) print ''.$langs->trans('Discounts').''; if ($societe->remise_client) print $langs->trans("CompanyHasRelativeDiscount",$societe->remise_client); else print $langs->trans("CompanyHasNoRelativeDiscount"); + print '. '; $absolute_discount=$societe->getAvailableDiscounts('','fk_facture_source IS NULL'); $absolute_creditnote=$societe->getAvailableDiscounts('','fk_facture_source IS NOT NULL'); - print '. '; + $absolute_discount=price2num($absolute_discount,'MT'); + $absolute_creditnote=price2num($absolute_creditnote,'MT'); if ($absolute_discount) { if ($propal->statut > 0) diff --git a/htdocs/comm/remx.php b/htdocs/comm/remx.php index 0bc85e0cd29..da85e26f174 100644 --- a/htdocs/comm/remx.php +++ b/htdocs/comm/remx.php @@ -199,7 +199,7 @@ if ($_socid > 0) print ''; print ''; print ''; - print ''; + print ''; print ''; print ''; print ''; @@ -311,7 +311,7 @@ if ($_socid > 0) print '
'.$langs->trans("Date").''.$langs->trans("ReasonDiscount").''.$langs->trans("ReasonDiscount").''.$langs->trans("ConsumedBy").''.$langs->trans("AmountHT").''.$langs->trans("VATRate").'
'; print ''; print ''; - print ''; + print ''; print ''; print ''; print ''; diff --git a/htdocs/commande/fiche.php b/htdocs/commande/fiche.php index 533a6be3766..2d6fd033e5d 100644 --- a/htdocs/commande/fiche.php +++ b/htdocs/commande/fiche.php @@ -1316,9 +1316,11 @@ else print ''; @@ -1354,7 +1356,7 @@ else print ''; print ''; - // Date de livraison + // Delivery date print '
'.$langs->trans("Date").''.$langs->trans("ReasonDiscount").''.$langs->trans("ReasonDiscount").''.$langs->trans("ConsumedBy").''.$langs->trans("AmountHT").''.$langs->trans("VATRate").'
'.$langs->trans('Discounts').''; if ($soc->remise_client) print $langs->trans("CompanyHasRelativeDiscount",$soc->remise_client); else print $langs->trans("CompanyHasNoRelativeDiscount"); + print '. '; $absolute_discount=$soc->getAvailableDiscounts('','fk_facture_source IS NULL'); $absolute_creditnote=$soc->getAvailableDiscounts('','fk_facture_source IS NOT NULL'); - print '. '; + $absolute_discount=price2num($absolute_discount,'MT'); + $absolute_creditnote=price2num($absolute_creditnote,'MT'); if ($absolute_discount) { if ($commande->statut > 0) @@ -1335,7 +1337,7 @@ else } if ($absolute_creditnote) { - print $langs->trans("CompanyHasCreditNote",price($absolute_creditnote),$langs->transnoentities("Currency".$conf->monnaie)).'. '; + print $langs->trans("CompanyHasCreditNote",price($absolute_creditnote,1),$langs->transnoentities("Currency".$conf->monnaie)).'. '; } if (! $absolute_discount && ! $absolute_creditnote) print $langs->trans("CompanyHasNoAbsoluteDiscount").'.'; print '
'; print '
'; print $langs->trans('DeliveryDate'); diff --git a/htdocs/compta/commande/fiche.php b/htdocs/compta/commande/fiche.php index 6bbfe07b3b7..de382230e7d 100644 --- a/htdocs/compta/commande/fiche.php +++ b/htdocs/compta/commande/fiche.php @@ -183,9 +183,11 @@ if ($id > 0 || ! empty($ref)) print '
'.$langs->trans('Discounts').''; if ($soc->remise_client) print $langs->trans("CompanyHasRelativeDiscount",$soc->remise_client); else print $langs->trans("CompanyHasNoRelativeDiscount"); + print '. '; $absolute_discount=$soc->getAvailableDiscounts('','fk_facture_source IS NULL'); $absolute_creditnote=$soc->getAvailableDiscounts('','fk_facture_source IS NOT NULL'); - print '. '; + $absolute_discount=price2num($absolute_discount,'MT'); + $absolute_creditnote=price2num($absolute_creditnote,'MT'); if ($absolute_discount) { if ($commande->statut > 0) diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index 2a3c94d4837..6b0b802c558 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -1985,6 +1985,8 @@ else $absolute_discount=$soc->getAvailableDiscounts('','fk_facture_source IS NULL'); $absolute_creditnote=$soc->getAvailableDiscounts('','fk_facture_source IS NOT NULL'); + $absolute_discount=price2num($absolute_discount,'MT'); + $absolute_creditnote=price2num($absolute_creditnote,'MT'); $author = new User($db); if ($fac->user_author) diff --git a/htdocs/expedition/commande.php b/htdocs/expedition/commande.php index bea7721118a..3f9f65c1713 100644 --- a/htdocs/expedition/commande.php +++ b/htdocs/expedition/commande.php @@ -199,9 +199,11 @@ if ($id > 0 || ! empty($ref)) print '
'.$langs->trans('Discounts').''; if ($soc->remise_client) print $langs->trans("CompanyHasRelativeDiscount",$soc->remise_client); else print $langs->trans("CompanyHasNoRelativeDiscount"); + print '. '; $absolute_discount=$soc->getAvailableDiscounts('','fk_facture_source IS NULL'); $absolute_creditnote=$soc->getAvailableDiscounts('','fk_facture_source IS NOT NULL'); - print '. '; + $absolute_discount=price2num($absolute_discount,'MT'); + $absolute_creditnote=price2num($absolute_creditnote,'MT'); if ($absolute_discount) { if ($commande->statut > 0)