diff --git a/htdocs/comm/card.php b/htdocs/comm/card.php
index fb8154e76ba..301c5869502 100644
--- a/htdocs/comm/card.php
+++ b/htdocs/comm/card.php
@@ -278,29 +278,38 @@ if ($object->id > 0)
print '';
}
+ // This fields are used to know VAT to include in an invoice when the thirdparty is making a sale, so when it is a supplier.
+ // We don't need them into customer profile.
+ // Except for spain and localtax where localtax depends on buyer and not seller
+
// VAT is used
+ /*
print '
';
- print '| '.$langs->trans('VATIsUsed').' | ';
+ print '';
+ print $form->textwithpicto($langs->trans('VATIsUsed'),$langs->trans('VATIsUsedWhenSelling'));
+ print ' | ';
print '';
print yn($object->tva_assuj);
print ' | ';
print '
';
+ */
- // Local Taxes
- // TODO Move this on same record than VATIsUsed
- if ($mysoc->localtax1_assuj=="1")
+ if ($mysoc->country_code == 'ES')
{
- print '| '.$langs->transcountry("LocalTax1IsUsed", $mysoc->country_code).' | ';
- print yn($object->localtax1_assuj);
- print ' |
';
+ // Local Taxes
+ if ($mysoc->localtax1_assuj=="1")
+ {
+ print '| '.$langs->transcountry("LocalTax1IsUsed", $mysoc->country_code).' | ';
+ print yn($object->localtax1_assuj);
+ print ' |
';
+ }
+ if ($mysoc->localtax1_assuj=="1")
+ {
+ print '| '.$langs->transcountry("LocalTax2IsUsed", $mysoc->country_code).' | ';
+ print yn($object->localtax2_assuj);
+ print ' |
';
+ }
}
- if ($mysoc->localtax1_assuj=="1")
- {
- print '| '.$langs->transcountry("LocalTax2IsUsed", $mysoc->country_code).' | ';
- print yn($object->localtax2_assuj);
- print ' |
';
- }
-
// TVA Intra
print '| '.$langs->trans('VATIntra').' | ';
diff --git a/htdocs/fourn/card.php b/htdocs/fourn/card.php
index d71585b0420..239014f9142 100644
--- a/htdocs/fourn/card.php
+++ b/htdocs/fourn/card.php
@@ -194,7 +194,9 @@ if ($object->id > 0)
// Assujetti a TVA ou pas
print ' |
';
- print '| '.$langs->trans('VATIsUsed').' | ';
+ print ' | ';
+ print $form->textwithpicto($langs->trans('VATIsUsed'),$langs->trans('VATIsUsedWhenSelling'));
+ print ' | ';
print yn($object->tva_assuj);
print ' | ';
print '
';
@@ -290,7 +292,7 @@ if ($object->id > 0)
//else print $langs->trans("DiscountNone");
print '';
print '';
-
+
print '';
print '| ';
print $form->editfieldkey("OrderMinAmount",'supplier_order_min_amount',$object->supplier_order_min_amount,$object,$user->rights->societe->creer);
diff --git a/htdocs/langs/en_US/companies.lang b/htdocs/langs/en_US/companies.lang
index b4820e0fa2d..f195da762a8 100644
--- a/htdocs/langs/en_US/companies.lang
+++ b/htdocs/langs/en_US/companies.lang
@@ -77,6 +77,7 @@ Web=Web
Poste= Position
DefaultLang=Language by default
VATIsUsed=Sales tax is used
+VATIsUsedWhenSelling=This define if this thirdparty includes a sale tax or not when it makes an invoice to its own customers
VATIsNotUsed=Sales tax is not used
CopyAddressFromSoc=Fill address with third party address
ThirdpartyNotCustomerNotSupplierSoNoRef=Thirdparty neither customer nor supplier, no available refering objects
diff --git a/htdocs/societe/card.php b/htdocs/societe/card.php
index ee0e3935e0f..e515818cd3d 100644
--- a/htdocs/societe/card.php
+++ b/htdocs/societe/card.php
@@ -2177,111 +2177,113 @@ else
}
//if ($j % 2 == 1) print ' | |
';
- // VAT is used
- print '| ';
- print $langs->trans('VATIsUsed');
- print ' | ';
- print yn($object->tva_assuj);
- print ' | ';
- print '
';
+
+ // This fields are used to know VAT to include in an invoice when the thirdparty is making a sale, so when it is a supplier.
+ // We don't need them into customer profile.
+ // Except for spain and localtax where localtax depends on buyer and not seller
+
+ if ($object->fournisseur)
+ {
+ // VAT is used
+ print '| ';
+ print $form->textwithpicto($langs->trans('VATIsUsed'),$langs->trans('VATIsUsedWhenSelling'));
+ print ' | ';
+ print yn($object->tva_assuj);
+ print ' | ';
+ print '
';
+ }
// Local Taxes
- //TODO: Place into a function to control showing by country or study better option
- if($mysoc->localtax1_assuj=="1" && $mysoc->localtax2_assuj=="1")
- {
- print '| '.$langs->transcountry("LocalTax1IsUsed",$mysoc->country_code).' | ';
- print yn($object->localtax1_assuj);
- print ' |
| '.$langs->transcountry("LocalTax2IsUsed",$mysoc->country_code).' | ';
- print yn($object->localtax2_assuj);
- print ' |
';
+ if ($object->fournisseur || $mysoc->country_code=='ES')
+ {
+ if($mysoc->localtax1_assuj=="1" && $mysoc->localtax2_assuj=="1")
+ {
+ print '| '.$langs->transcountry("LocalTax1IsUsed",$mysoc->country_code).' | ';
+ print yn($object->localtax1_assuj);
+ print ' |
| '.$langs->transcountry("LocalTax2IsUsed",$mysoc->country_code).' | ';
+ print yn($object->localtax2_assuj);
+ print ' |
';
- if($object->localtax1_assuj=="1" && (! isOnlyOneLocalTax(1)))
- {
- print '';
- }
- if($object->localtax2_assuj=="1" && (! isOnlyOneLocalTax(2)))
- {
- print '';
- }
- }
- elseif($mysoc->localtax1_assuj=="1" && $mysoc->localtax2_assuj!="1")
- {
- print '| '.$langs->transcountry("LocalTax1IsUsed",$mysoc->country_code).' | ';
- print yn($object->localtax1_assuj);
- print ' |
';
- if($object->localtax1_assuj=="1" && (! isOnlyOneLocalTax(1)))
- {
- print '';
+ if($object->localtax1_assuj=="1" && (! isOnlyOneLocalTax(1)))
+ {
+ print '';
+ }
+ if($object->localtax2_assuj=="1" && (! isOnlyOneLocalTax(2)))
+ {
+ print '';
+ }
+ }
+ elseif($mysoc->localtax1_assuj=="1" && $mysoc->localtax2_assuj!="1")
+ {
+ print '| '.$langs->transcountry("LocalTax1IsUsed",$mysoc->country_code).' | ';
+ print yn($object->localtax1_assuj);
+ print ' |
';
+ if($object->localtax1_assuj=="1" && (! isOnlyOneLocalTax(1)))
+ {
+ print '';
- }
- }
- elseif($mysoc->localtax2_assuj=="1" && $mysoc->localtax1_assuj!="1")
- {
- print '| '.$langs->transcountry("LocalTax2IsUsed",$mysoc->country_code).' | ';
- print yn($object->localtax2_assuj);
- print ' |
';
- if($object->localtax2_assuj=="1" && (! isOnlyOneLocalTax(2)))
- {
+ }
+ }
+ elseif($mysoc->localtax2_assuj=="1" && $mysoc->localtax1_assuj!="1")
+ {
+ print '| '.$langs->transcountry("LocalTax2IsUsed",$mysoc->country_code).' | ';
+ print yn($object->localtax2_assuj);
+ print ' |
';
+ if($object->localtax2_assuj=="1" && (! isOnlyOneLocalTax(2)))
+ {
- print '';
+ print '';
- }
- }
- /*
- if ($mysoc->country_code=='ES' && $mysoc->localtax2_assuj!="1" && ! empty($conf->fournisseur->enabled) && $object->fournisseur==1)
- {
- print '| '.$langs->transcountry("LocalTax2IsUsed",$mysoc->country_code).' | ';
- print yn($object->localtax2_assuj);
- print ' |
';
- }
- */
+ }
+ }
+ }
// VAT Code
print '
';