diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php index a687e1dff5b..059af63b708 100644 --- a/htdocs/comm/propal.php +++ b/htdocs/comm/propal.php @@ -1463,12 +1463,12 @@ if ($action == 'create') { print '' . $langs->trans($newclassname) . '' . $objectsrc->getNomUrl(1) . ''; print '' . $langs->trans('TotalHT') . '' . price($objectsrc->total_ht) . ''; print '' . $langs->trans('TotalVAT') . '' . price($objectsrc->total_tva) . ""; - if ($mysoc->localtax1_assuj == "1") // Localtax1 + if ($mysoc->localtax1_assuj == "1" || $objectsrc->total_localtax1 != 0 ) // Localtax1 { print '' . $langs->transcountry("AmountLT1", $mysoc->country_code) . '' . price($objectsrc->total_localtax1) . ""; } - if ($mysoc->localtax2_assuj == "1") // Localtax2 + if ($mysoc->localtax2_assuj == "1" || $objectsrc->total_localtax2 != 0) // Localtax2 { print '' . $langs->transcountry("AmountLT2", $mysoc->country_code) . '' . price($objectsrc->total_localtax2) . ""; } @@ -1985,13 +1985,13 @@ if ($action == 'create') { print ''; // Amount Local Taxes - if ($mysoc->localtax1_assuj == "1") // Localtax1 + if ($mysoc->localtax1_assuj == "1" || $object->total_localtax1 != 0) // Localtax1 { print '' . $langs->transcountry("AmountLT1", $mysoc->country_code) . ''; print '' . price($object->total_localtax1, '', $langs, 0, - 1, - 1, $conf->currency) . ''; print ''; } - if ($mysoc->localtax2_assuj == "1") // Localtax2 + if ($mysoc->localtax2_assuj == "1" || $object->total_localtax2 != 0) // Localtax2 { print '' . $langs->transcountry("AmountLT2", $mysoc->country_code) . ''; print '' . price($object->total_localtax2, '', $langs, 0, - 1, - 1, $conf->currency) . ''; diff --git a/htdocs/commande/fiche.php b/htdocs/commande/fiche.php index 8e8fb94c0c7..8b1d6ec9ae3 100644 --- a/htdocs/commande/fiche.php +++ b/htdocs/commande/fiche.php @@ -1589,12 +1589,12 @@ if ($action == 'create' && $user->rights->commande->creer) { print '' . $langs->trans($newclassname) . '' . $objectsrc->getNomUrl(1) . ''; print '' . $langs->trans('TotalHT') . '' . price($objectsrc->total_ht) . ''; print '' . $langs->trans('TotalVAT') . '' . price($objectsrc->total_tva) . ""; - if ($mysoc->localtax1_assuj == "1") // Localtax1 RE + if ($mysoc->localtax1_assuj == "1" || $objectsrc->total_localtax1 != 0) // Localtax1 RE { print '' . $langs->transcountry("AmountLT1", $mysoc->country_code) . '' . price($objectsrc->total_localtax1) . ""; } - if ($mysoc->localtax2_assuj == "1") // Localtax2 IRPF + if ($mysoc->localtax2_assuj == "1" || $objectsrc->total_localtax2 != 0) // Localtax2 IRPF { print '' . $langs->transcountry("AmountLT2", $mysoc->country_code) . '' . price($objectsrc->total_localtax2) . ""; } @@ -1840,9 +1840,9 @@ if ($action == 'create' && $user->rights->commande->creer) { $nbrow ++; // Local taxes - if ($mysoc->localtax1_assuj == "1") + if ($mysoc->localtax1_assuj == "1" || $object->total_localtax1 != 0) $nbrow ++; - if ($mysoc->localtax2_assuj == "1") + if ($mysoc->localtax2_assuj == "1" || $object->total_localtax2 != 0 ) $nbrow ++; print ''; @@ -2115,9 +2115,9 @@ if ($action == 'create' && $user->rights->commande->creer) { } $rowspan = 4; - if ($mysoc->localtax1_assuj == "1") + if ($mysoc->localtax1_assuj == "1" || $object->total_localtax1 != 0) $rowspan ++; - if ($mysoc->localtax2_assuj == "1") + if ($mysoc->localtax2_assuj == "1" || $object->total_localtax2 != 0) $rowspan ++; // Total HT @@ -2138,12 +2138,12 @@ if ($action == 'create' && $user->rights->commande->creer) { print ''; // Amount Local Taxes - if ($mysoc->localtax1_assuj == "1") // Localtax1 RE + if ($mysoc->localtax1_assuj == "1" || $object->total_localtax1 != 0) // Localtax1 { print ''; print ''; } - if ($mysoc->localtax2_assuj == "1") // Localtax2 IRPF + if ($mysoc->localtax2_assuj == "1" || $object->total_localtax2 != 0) // Localtax2 IRPF { print ''; print ''; diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index 555640a50ce..e20173bf30c 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -2302,12 +2302,12 @@ if ($action == 'create') print ''; print ''; print '"; - if ($mysoc->localtax1_assuj == "1") // Localtax1 RE + if ($mysoc->localtax1_assuj == "1" || $objectsrc->total_localtax1 != 0) // Localtax1 { print '"; } - if ($mysoc->localtax2_assuj == "1") // Localtax2 IRPF + if ($mysoc->localtax2_assuj == "1" || $objectsrc->total_localtax2 != 0) // Localtax2 { print '"; } @@ -2907,9 +2907,9 @@ if ($action == 'create') if (! empty($conf->banque->enabled)) $nbcols ++; // if (! empty($soc->outstandingbill)) $nbrows++; - if ($mysoc->localtax1_assuj == "1") + if ($mysoc->localtax1_assuj == "1" || $object->total_localtax1 != 0) $nbrows ++; - if ($mysoc->localtax2_assuj == "1") + if ($mysoc->localtax2_assuj == "1" || $object->total_localtax2 != 0) $nbrows ++; if ($selleruserevenustamp) $nbrows ++; @@ -3173,12 +3173,12 @@ if ($action == 'create') print ''; // Amount Local Taxes - if ($mysoc->localtax1_assuj == "1" && $mysoc->useLocalTax(1)) // Localtax1 (example RE) + if (($mysoc->localtax1_assuj == "1" && $mysoc->useLocalTax(1)) || $object->total_localtax1 != 0) // Localtax1 { print ''; print ''; } - if ($mysoc->localtax2_assuj == "1" && $mysoc->useLocalTax(2)) // Localtax2 (example IRPF) + if (($mysoc->localtax2_assuj == "1" && $mysoc->useLocalTax(2)) || $object->total_localtax2 != 0) // Localtax2 { print ''; print ''; diff --git a/htdocs/fourn/commande/fiche.php b/htdocs/fourn/commande/fiche.php index 26e84aa0d55..05e2fe8822f 100644 --- a/htdocs/fourn/commande/fiche.php +++ b/htdocs/fourn/commande/fiche.php @@ -1506,13 +1506,13 @@ elseif (! empty($object->id)) print ''; // Amount Local Taxes - if ($mysoc->localtax1_assuj=="1") //Localtax1 + if ($mysoc->localtax1_assuj=="1" || $object->total_localtax1 != 0) //Localtax1 { print ''; print ''; print ''; } - if ($mysoc->localtax2_assuj=="1") //Localtax2 + if ($mysoc->localtax2_assuj=="1" || $object->total_localtax2 != 0) //Localtax2 { print ''; print ''; diff --git a/htdocs/fourn/facture/fiche.php b/htdocs/fourn/facture/fiche.php index 9d5670771cd..9cd11bd58bf 100644 --- a/htdocs/fourn/facture/fiche.php +++ b/htdocs/fourn/facture/fiche.php @@ -1368,12 +1368,12 @@ if ($action == 'create') print '"; if ($mysoc->country_code=='ES') { - if ($mysoc->localtax1_assuj=="1") //Localtax1 RE + if ($mysoc->localtax1_assuj=="1" || $object->total_localtax1 != 0) //Localtax1 { print '"; } - if ($mysoc->localtax2_assuj=="1") //Localtax2 IRPF + if ($mysoc->localtax2_assuj=="1" || $object->total_localtax2 != 0) //Localtax2 { print '"; } diff --git a/htdocs/langs/es_ES/companies.lang b/htdocs/langs/es_ES/companies.lang index 51b72ba0f51..89517bd8578 100644 --- a/htdocs/langs/es_ES/companies.lang +++ b/htdocs/langs/es_ES/companies.lang @@ -91,9 +91,6 @@ LocalTax2IsUsedES= Sujeto a IRPF LocalTax2IsNotUsedES= No sujeto a IRPF LocalTax1ES=RE LocalTax2ES=IRPF -TypeLocaltax1ES= Tipo RE -TypeLocaltax2ES= Tipo IRPF -TypeES= Tipo ThirdPartyEMail=%s WrongCustomerCode=Código cliente incorrecto WrongSupplierCode=Código proveedor incorrecto
' . $langs->trans('AmountVAT') . '' . price($object->total_tva, 1, '', 1, - 1, - 1, $conf->currency) . '
' . $langs->transcountry("AmountLT1", $mysoc->country_code) . '' . price($object->total_localtax1, 1, '', 1, - 1, - 1, $conf->currency) . '
' . $langs->transcountry("AmountLT2", $mysoc->country_code) . '' . price($object->total_localtax2, 1, '', 1, - 1, - 1, $conf->currency) . '
' . $langs->trans($newclassname) . '' . $objectsrc->getNomUrl(1) . '
' . $langs->trans('TotalHT') . '' . price($objectsrc->total_ht) . '
' . $langs->trans('TotalVAT') . '' . price($objectsrc->total_tva) . "
' . $langs->transcountry("AmountLT1", $mysoc->country_code) . '' . price($objectsrc->total_localtax1) . "
' . $langs->transcountry("AmountLT2", $mysoc->country_code) . '' . price($objectsrc->total_localtax2) . "
' . $langs->transcountry("AmountLT1", $mysoc->country_code) . '' . price($object->total_localtax1, 1, '', 1, - 1, - 1, $conf->currency) . '
' . $langs->transcountry("AmountLT2", $mysoc->country_code) . '' . price($object->total_localtax2, 1, '', 1, - 1, - 1, $conf->currency) . '
'.$langs->trans("Currency".$conf->currency).'
'.$langs->transcountry("AmountLT1",$mysoc->country_code).''.price($object->total_localtax1).''.$langs->trans("Currency".$conf->currency).'
'.$langs->transcountry("AmountLT2",$mysoc->country_code).''.price($object->total_localtax2).'
'.$langs->trans('TotalVAT').''.price($objectsrc->total_tva)."
'.$langs->transcountry("AmountLT1",$mysoc->country_code).''.price($objectsrc->total_localtax1)."
'.$langs->transcountry("AmountLT2",$mysoc->country_code).''.price($objectsrc->total_localtax2)."