diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php
index 67194b610d5..a66f53f7458 100644
--- a/htdocs/compta/facture.php
+++ b/htdocs/compta/facture.php
@@ -757,6 +757,7 @@ else if ($action == 'add' && $user->rights->facture->creer)
$object->amount = $_POST['amount'];
$object->remise_absolue = $_POST['remise_absolue'];
$object->remise_percent = $_POST['remise_percent'];
+ $object->fetch_thirdparty();
// If creation from another object of another module (Example: origin=propal, originid=1)
if ($_POST['origin'] && $_POST['originid'])
@@ -2078,17 +2079,14 @@ 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->pays_code=='ES')
+ if ($mysoc->localtax1_assuj=="1") //Localtax1 RE
{
- if ($mysoc->localtax1_assuj=="1") //Localtax1 RE
- {
- print '| '.$langs->transcountry("AmountLT1",$mysoc->pays_code).' | '.price($objectsrc->total_localtax1)." |
";
- }
+ print '| '.$langs->transcountry("AmountLT1",$mysoc->pays_code).' | '.price($objectsrc->total_localtax1)." |
";
+ }
- if ($mysoc->localtax2_assuj=="1") //Localtax2 IRPF
- {
- print '| '.$langs->transcountry("AmountLT2",$mysoc->pays_code).' | '.price($objectsrc->total_localtax2)." |
";
- }
+ if ($mysoc->localtax2_assuj=="1") //Localtax2 IRPF
+ {
+ print '| '.$langs->transcountry("AmountLT2",$mysoc->pays_code).' | '.price($objectsrc->total_localtax2)." |
";
}
print '| '.$langs->trans('TotalTTC').' | '.price($objectsrc->total_ttc)." |
";
}
@@ -2654,11 +2652,8 @@ else if ($id > 0 || ! empty($ref))
if (! empty($conf->banque->enabled)) $nbcols++;
//Local taxes
- if ($mysoc->pays_code=='ES')
- {
- if($mysoc->localtax1_assuj=="1") $nbrows++;
- if($mysoc->localtax2_assuj=="1") $nbrows++;
- }
+ if($mysoc->localtax1_assuj=="1") $nbrows++;
+ if($mysoc->localtax2_assuj=="1") $nbrows++;
print '';
|