diff --git a/htdocs/fourn/facture/card.php b/htdocs/fourn/facture/card.php index bae6ef596e9..8de28ec70d9 100644 --- a/htdocs/fourn/facture/card.php +++ b/htdocs/fourn/facture/card.php @@ -3372,31 +3372,17 @@ if ($action == 'create') { print '
| '.$form->editfieldkey('MulticurrencyAmountHT', 'multicurrency_total_ht', '', $object, 0).' | '; - print ''.price($object->multicurrency_total_ht, '', $langs, 0, - 1, - 1, (!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency)).' | '; - print '||
| '.$form->editfieldkey('MulticurrencyAmountVAT', 'multicurrency_total_tva', '', $object, 0).' | '; - print ''.price($object->multicurrency_total_tva, '', $langs, 0, - 1, - 1, (!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency)).' | '; - print '||
| '.$form->editfieldkey('MulticurrencyAmountTTC', 'multicurrency_total_ttc', '', $object, 0).' | '; - print ''.price($object->multicurrency_total_ttc, '', $langs, 0, - 1, - 1, (!empty($object->multicurrency_code) ? $object->multicurrency_code : $conf->currency)).' | '; - print '||
| ' . $langs->trans('AmountHT') . ' | '; + print '' . price($object->total_ht, '', $langs, 0, -1, -1, $conf->currency) . ' | '; + if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) { + print '' . price($object->multicurrency_total_ht, '', $langs, 0, -1, -1, $object->multicurrency_code) . ' | '; } - - // Amount - print '|
| '.$langs->trans('AmountHT').' | '; - print ''.price($object->total_ht, 1, $langs, 0, -1, -1, $conf->currency).' | '; print '||
| '.$langs->trans('AmountVAT').' | '; - print ''; + print ' | ||
| ' . $langs->trans('AmountVAT') . ' | '; + print '';
if (GETPOST('calculationrule')) {
$calculationrule = GETPOST('calculationrule', 'alpha');
} else {
@@ -3409,32 +3395,41 @@ if ($action == 'create') {
}
// Show link for "recalculate"
if ($object->getVentilExportCompta() == 0) {
- $s = ''.$langs->trans("ReCalculate").' ';
- $s .= 'id.'&action=calculate&calculationrule=totalofround">'.$langs->trans("Mode1").'';
+ $s = '' . $langs->trans("ReCalculate") . ' ';
+ $s .= 'id . '&action=calculate&calculationrule=totalofround">' . $langs->trans("Mode1") . '';
$s .= ' / ';
- $s .= 'id.'&action=calculate&calculationrule=roundoftotal">'.$langs->trans("Mode2").'';
+ $s .= 'id . '&action=calculate&calculationrule=roundoftotal">' . $langs->trans("Mode2") . '';
print ' ';
- print $form->textwithtooltip($s, $langs->trans("CalculationRuleDesc", $calculationrulenum).' ';
}
print price($object->total_tva, 1, $langs, 0, -1, -1, $conf->currency);
- print ''.$langs->trans("CalculationRuleDescSupplier"), 2, 1, img_picto('', 'help'), '', 3, '', 0, 'recalculate'); + print $form->textwithtooltip($s, $langs->trans("CalculationRuleDesc", $calculationrulenum) . ' ' . $langs->trans("CalculationRuleDescSupplier"), 2, 1, img_picto('', 'help'), '', 3, '', 0, 'recalculate'); print ' '; print ' | ' . price($object->multicurrency_total_tva, '', $langs, 0, -1, -1, $object->multicurrency_code) . ' | '; + } + print ''; - // Amount Local Taxes - //TODO: Place into a function to control showing by country or study better option if ($societe->localtax1_assuj == "1") { //Localtax1 - print '|
| '.$langs->transcountry("AmountLT1", $societe->country_code).' | '; - print ''.price($object->total_localtax1, 1, $langs, 0, -1, -1, $conf->currency).' | '; + print '||
| ' . $langs->transcountry("AmountLT1", $societe->country_code) . ' | '; + print '' . price($object->total_localtax1, 1, $langs, 0, -1, -1, $conf->currency) . ' | '; print '||
| '.$langs->transcountry("AmountLT2", $societe->country_code).' | '; - print ''.price($object->total_localtax2, 1, $langs, 0, -1, -1, $conf->currency).' | '; + print '||
| ' . $langs->transcountry("AmountLT2", $societe->country_code) . ' | '; + print '' . price($object->total_localtax2, 1, $langs, 0, -1, -1, $conf->currency) . ' | '; print '||
| '.$langs->trans('AmountTTC').' | '; - print ''.price($object->total_ttc, 1, $langs, 0, -1, -1, $conf->currency).' | '; + + print '||
| ' . $langs->trans('AmountTTC') . ' | '; + print '' . price($object->total_ttc, '', $langs, 0, -1, -1, $conf->currency) . ' | '; + if (isModEnabled("multicurrency") && ($object->multicurrency_code && $object->multicurrency_code != $conf->currency)) { + print '' . price($object->multicurrency_total_ttc, '', $langs, 0, -1, -1, $object->multicurrency_code) . ' | '; + } print '|