From eeafc3c630d37964bc4d90b4ca4a9e43432d280f Mon Sep 17 00:00:00 2001 From: Laurent Destailleur Date: Wed, 13 Mar 2019 14:10:36 +0100 Subject: [PATCH] Standardize translation of amount --- htdocs/comm/propal/card.php | 13 ++++++++++--- htdocs/commande/card.php | 12 ++++++------ htdocs/compta/facture/card.php | 6 +++--- htdocs/fichinter/card.php | 12 ++++++------ htdocs/fourn/commande/card.php | 12 ++++++------ htdocs/fourn/facture/card.php | 12 ++++++------ htdocs/supplier_proposal/card.php | 12 ++++++------ 7 files changed, 43 insertions(+), 36 deletions(-) diff --git a/htdocs/comm/propal/card.php b/htdocs/comm/propal/card.php index eb8ba5f0520..44c05629744 100644 --- a/htdocs/comm/propal/card.php +++ b/htdocs/comm/propal/card.php @@ -1764,8 +1764,8 @@ if ($action == 'create') $newclassname = 'Intervention'; print '' . $langs->trans($newclassname) . '' . $objectsrc->getNomUrl(1) . ''; - print '' . $langs->trans('TotalHT') . '' . price($objectsrc->total_ht, 0, $langs, 1, -1, -1, $conf->currency) . ''; - print '' . $langs->trans('TotalVAT') . '' . price($objectsrc->total_tva, 0, $langs, 1, -1, -1, $conf->currency) . ""; + print '' . $langs->trans('AmountHT') . '' . price($objectsrc->total_ht, 0, $langs, 1, -1, -1, $conf->currency) . ''; + print '' . $langs->trans('AmountVAT') . '' . price($objectsrc->total_tva, 0, $langs, 1, -1, -1, $conf->currency) . ""; if ($mysoc->localtax1_assuj == "1" || $objectsrc->total_localtax1 != 0 ) // Localtax1 { print '' . $langs->transcountry("AmountLT1", $mysoc->country_code) . '' . price($objectsrc->total_localtax1, 0, $langs, 1, -1, -1, $conf->currency) . ""; @@ -1775,7 +1775,14 @@ if ($action == 'create') { print '' . $langs->transcountry("AmountLT2", $mysoc->country_code) . '' . price($objectsrc->total_localtax2, 0, $langs, 1, -1, -1, $conf->currency) . ""; } - print '' . $langs->trans('TotalTTC') . '' . price($objectsrc->total_ttc, 0, $langs, 1, -1, -1, $conf->currency) . ""; + print '' . $langs->trans('AmountTTC') . '' . price($objectsrc->total_ttc, 0, $langs, 1, -1, -1, $conf->currency) . ""; + + if (!empty($conf->multicurrency->enabled)) + { + print '' . $langs->trans('MulticurrencyAmountHT') . '' . price($objectsrc->multicurrency_total_ht) . ''; + print '' . $langs->trans('MulticurrencyAmountVAT') . '' . price($objectsrc->multicurrency_total_tva) . ""; + print '' . $langs->trans('MulticurrencyAmountTTC') . '' . price($objectsrc->multicurrency_total_ttc) . ""; + } } print "\n"; diff --git a/htdocs/commande/card.php b/htdocs/commande/card.php index 33dc913fe45..65dba5049f4 100644 --- a/htdocs/commande/card.php +++ b/htdocs/commande/card.php @@ -1836,8 +1836,8 @@ if ($action == 'create' && $user->rights->commande->creer) print '' . $langs->trans($newclassname) . '' . $objectsrc->getNomUrl(1) . ''; // Amount - print '' . $langs->trans('TotalHT') . '' . price($objectsrc->total_ht) . ''; - print '' . $langs->trans('TotalVAT') . '' . price($objectsrc->total_tva) . ""; + print '' . $langs->trans('AmountHT') . '' . price($objectsrc->total_ht) . ''; + print '' . $langs->trans('AmountVAT') . '' . price($objectsrc->total_tva) . ""; if ($mysoc->localtax1_assuj == "1" || $objectsrc->total_localtax1 != 0) // Localtax1 RE { print '' . $langs->transcountry("AmountLT1", $mysoc->country_code) . '' . price($objectsrc->total_localtax1) . ""; @@ -1848,13 +1848,13 @@ if ($action == 'create' && $user->rights->commande->creer) print '' . $langs->transcountry("AmountLT2", $mysoc->country_code) . '' . price($objectsrc->total_localtax2) . ""; } - print '' . $langs->trans('TotalTTC') . '' . price($objectsrc->total_ttc) . ""; + print '' . $langs->trans('AmountTTC') . '' . price($objectsrc->total_ttc) . ""; if (!empty($conf->multicurrency->enabled)) { - print '' . $langs->trans('MulticurrencyTotalHT') . '' . price($objectsrc->multicurrency_total_ht) . ''; - print '' . $langs->trans('MulticurrencyTotalVAT') . '' . price($objectsrc->multicurrency_total_tva) . ""; - print '' . $langs->trans('MulticurrencyTotalTTC') . '' . price($objectsrc->multicurrency_total_ttc) . ""; + print '' . $langs->trans('MulticurrencyAmountHT') . '' . price($objectsrc->multicurrency_total_ht) . ''; + print '' . $langs->trans('MulticurrencyAmountVAT') . '' . price($objectsrc->multicurrency_total_tva) . ""; + print '' . $langs->trans('MulticurrencyAmountTTC') . '' . price($objectsrc->multicurrency_total_ttc) . ""; } } diff --git a/htdocs/compta/facture/card.php b/htdocs/compta/facture/card.php index ecd776ea75f..e3fea0200dc 100644 --- a/htdocs/compta/facture/card.php +++ b/htdocs/compta/facture/card.php @@ -3245,8 +3245,8 @@ if ($action == 'create') echo ' ('.$langs->trans('LatestRelatedBill').end($objectsrc->linkedObjects['facture'])->getNomUrl(1).')'; } echo ''; - print '' . $langs->trans('TotalHT') . '' . price($objectsrc->total_ht) . ''; - print '' . $langs->trans('TotalVAT') . '' . price($objectsrc->total_tva) . ""; + print '' . $langs->trans('AmountHT') . '' . price($objectsrc->total_ht) . ''; + print '' . $langs->trans('AmountVAT') . '' . price($objectsrc->total_tva) . ""; if ($mysoc->localtax1_assuj == "1" || $objectsrc->total_localtax1 != 0) // Localtax1 { print '' . $langs->transcountry("AmountLT1", $mysoc->country_code) . '' . price($objectsrc->total_localtax1) . ""; @@ -3256,7 +3256,7 @@ if ($action == 'create') { print '' . $langs->transcountry("AmountLT2", $mysoc->country_code) . '' . price($objectsrc->total_localtax2) . ""; } - print '' . $langs->trans('TotalTTC') . '' . price($objectsrc->total_ttc) . ""; + print '' . $langs->trans('AmountTTC') . '' . price($objectsrc->total_ttc) . ""; if (!empty($conf->multicurrency->enabled)) { diff --git a/htdocs/fichinter/card.php b/htdocs/fichinter/card.php index 485a04b6a02..d9434d018c3 100644 --- a/htdocs/fichinter/card.php +++ b/htdocs/fichinter/card.php @@ -1013,8 +1013,8 @@ if ($action == 'create') // Amount /* Hide amount because we only copy services so amount may differ than source - print '' . $langs->trans('TotalHT') . '' . price($objectsrc->total_ht) . ''; - print '' . $langs->trans('TotalVAT') . '' . price($objectsrc->total_tva) . ""; + print '' . $langs->trans('AmountHT') . '' . price($objectsrc->total_ht) . ''; + print '' . $langs->trans('AmountVAT') . '' . price($objectsrc->total_tva) . ""; if ($mysoc->localtax1_assuj == "1" || $objectsrc->total_localtax1 != 0) // Localtax1 RE { print '' . $langs->transcountry("AmountLT1", $mysoc->country_code) . '' . price($objectsrc->total_localtax1) . ""; @@ -1025,13 +1025,13 @@ if ($action == 'create') print '' . $langs->transcountry("AmountLT2", $mysoc->country_code) . '' . price($objectsrc->total_localtax2) . ""; } - print '' . $langs->trans('TotalTTC') . '' . price($objectsrc->total_ttc) . ""; + print '' . $langs->trans('AmountTTC') . '' . price($objectsrc->total_ttc) . ""; if (!empty($conf->multicurrency->enabled)) { - print '' . $langs->trans('MulticurrencyTotalHT') . '' . price($objectsrc->multicurrency_total_ht) . ''; - print '' . $langs->trans('MulticurrencyTotalVAT') . '' . price($objectsrc->multicurrency_total_tva) . ""; - print '' . $langs->trans('MulticurrencyTotalTTC') . '' . price($objectsrc->multicurrency_total_ttc) . ""; + print '' . $langs->trans('MulticurrencyAmountHT') . '' . price($objectsrc->multicurrency_total_ht) . ''; + print '' . $langs->trans('MulticurrencyAmountVAT') . '' . price($objectsrc->multicurrency_total_tva) . ""; + print '' . $langs->trans('MulticurrencyAmountTTC') . '' . price($objectsrc->multicurrency_total_ttc) . ""; } */ } diff --git a/htdocs/fourn/commande/card.php b/htdocs/fourn/commande/card.php index 971c745886f..7c4b09a6f6c 100644 --- a/htdocs/fourn/commande/card.php +++ b/htdocs/fourn/commande/card.php @@ -1611,8 +1611,8 @@ if ($action=='create') $newclassname = $classname; print '' . $langs->trans($newclassname) . '' . $objectsrc->getNomUrl(1) . ''; - print '' . $langs->trans('TotalHT') . '' . price($objectsrc->total_ht) . ''; - print '' . $langs->trans('TotalVAT') . '' . price($objectsrc->total_tva) . ""; + print '' . $langs->trans('AmountHT') . '' . price($objectsrc->total_ht) . ''; + print '' . $langs->trans('AmountVAT') . '' . price($objectsrc->total_tva) . ""; if ($mysoc->localtax1_assuj == "1" || $objectsrc->total_localtax1 != 0) // Localtax1 RE { print '' . $langs->transcountry("AmountLT1", $mysoc->country_code) . '' . price($objectsrc->total_localtax1) . ""; @@ -1623,13 +1623,13 @@ if ($action=='create') print '' . $langs->transcountry("AmountLT2", $mysoc->country_code) . '' . price($objectsrc->total_localtax2) . ""; } - print '' . $langs->trans('TotalTTC') . '' . price($objectsrc->total_ttc) . ""; + print '' . $langs->trans('AmountTTC') . '' . price($objectsrc->total_ttc) . ""; if (!empty($conf->multicurrency->enabled)) { - print '' . $langs->trans('MulticurrencyTotalHT') . '' . price($objectsrc->multicurrency_total_ht) . ''; - print '' . $langs->trans('MulticurrencyTotalVAT') . '' . price($objectsrc->multicurrency_total_tva) . ''; - print '' . $langs->trans('MulticurrencyTotalTTC') . '' . price($objectsrc->multicurrency_total_ttc) . ''; + print '' . $langs->trans('MulticurrencyAmountHT') . '' . price($objectsrc->multicurrency_total_ht) . ''; + print '' . $langs->trans('MulticurrencyAmountVAT') . '' . price($objectsrc->multicurrency_total_tva) . ''; + print '' . $langs->trans('MulticurrencyAmountTTC') . '' . price($objectsrc->multicurrency_total_ttc) . ''; } } diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php index b6e971bd4f5..2fc36516bc6 100644 --- a/htdocs/fourn/facture/card.php +++ b/htdocs/fourn/facture/card.php @@ -2093,8 +2093,8 @@ if ($action == 'create') echo ' ('.$langs->trans('LatestRelatedBill').end($objectsrc->linkedObjects['invoice_supplier'])->getNomUrl(1).')'; } echo ''; - print ''.$langs->trans('TotalHT').''.price($objectsrc->total_ht).''; - print ''.$langs->trans('TotalVAT').''.price($objectsrc->total_tva).""; + print ''.$langs->trans('AmountHT').''.price($objectsrc->total_ht).''; + print ''.$langs->trans('AmountVAT').''.price($objectsrc->total_tva).""; if ($mysoc->localtax1_assuj=="1" || $object->total_localtax1 != 0) //Localtax1 { print ''.$langs->transcountry("AmountLT1", $mysoc->country_code).''.price($objectsrc->total_localtax1).""; @@ -2104,13 +2104,13 @@ if ($action == 'create') { print ''.$langs->transcountry("AmountLT2", $mysoc->country_code).''.price($objectsrc->total_localtax2).""; } - print ''.$langs->trans('TotalTTC').''.price($objectsrc->total_ttc).""; + print ''.$langs->trans('AmountTTC').''.price($objectsrc->total_ttc).""; if (!empty($conf->multicurrency->enabled)) { - print '' . $langs->trans('MulticurrencyTotalHT') . '' . price($objectsrc->multicurrency_total_ht) . ''; - print '' . $langs->trans('MulticurrencyTotalVAT') . '' . price($objectsrc->multicurrency_total_tva) . ""; - print '' . $langs->trans('MulticurrencyTotalTTC') . '' . price($objectsrc->multicurrency_total_ttc) . ""; + print '' . $langs->trans('MulticurrencyAmountHT') . '' . price($objectsrc->multicurrency_total_ht) . ''; + print '' . $langs->trans('MulticurrencyAmountVAT') . '' . price($objectsrc->multicurrency_total_tva) . ""; + print '' . $langs->trans('MulticurrencyAmountTTC') . '' . price($objectsrc->multicurrency_total_ttc) . ""; } } diff --git a/htdocs/supplier_proposal/card.php b/htdocs/supplier_proposal/card.php index d60175e3639..d5370a7361e 100644 --- a/htdocs/supplier_proposal/card.php +++ b/htdocs/supplier_proposal/card.php @@ -1209,8 +1209,8 @@ if ($action == 'create') print ''; print '' . $langs->trans('CommRequest') . '' . $objectsrc->getNomUrl(1) . ''; - print '' . $langs->trans('TotalHT') . '' . price($objectsrc->total_ht) . ''; - print '' . $langs->trans('TotalVAT') . '' . price($objectsrc->total_tva) . ""; + print '' . $langs->trans('AmountHT') . '' . price($objectsrc->total_ht) . ''; + print '' . $langs->trans('AmountVAT') . '' . price($objectsrc->total_tva) . ""; if ($mysoc->localtax1_assuj == "1" || $objectsrc->total_localtax1 != 0 ) // Localtax1 { print '' . $langs->transcountry("AmountLT1", $mysoc->country_code) . '' . price($objectsrc->total_localtax1) . ""; @@ -1220,13 +1220,13 @@ if ($action == 'create') { print '' . $langs->transcountry("AmountLT2", $mysoc->country_code) . '' . price($objectsrc->total_localtax2) . ""; } - print '' . $langs->trans('TotalTTC') . '' . price($objectsrc->total_ttc) . ""; + print '' . $langs->trans('AmountTTC') . '' . price($objectsrc->total_ttc) . ""; if (!empty($conf->multicurrency->enabled)) { - print '' . $langs->trans('MulticurrencyTotalHT') . '' . price($objectsrc->multicurrency_total_ht) . ''; - print '' . $langs->trans('MulticurrencyTotalVAT') . '' . price($objectsrc->multicurrency_total_tva) . ""; - print '' . $langs->trans('MulticurrencyTotalTTC') . '' . price($objectsrc->multicurrency_total_ttc) . ""; + print '' . $langs->trans('MulticurrencyAmountHT') . '' . price($objectsrc->multicurrency_total_ht) . ''; + print '' . $langs->trans('MulticurrencyAmountVAT') . '' . price($objectsrc->multicurrency_total_tva) . ""; + print '' . $langs->trans('MulticurrencyAmountTTC') . '' . price($objectsrc->multicurrency_total_ttc) . ""; } }