diff --git a/htdocs/fourn/fiche.php b/htdocs/fourn/fiche.php index ef2a454d22d..ce289d69721 100644 --- a/htdocs/fourn/fiche.php +++ b/htdocs/fourn/fiche.php @@ -3,7 +3,7 @@ * Copyright (C) 2003 Eric Seigne * Copyright (C) 2004-2011 Laurent Destailleur * Copyright (C) 2005-2010 Regis Houssin - * Copyright (C) 2010 Juanjo Menent + * Copyright (C) 2010-2013 Juanjo Menent * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -153,6 +153,7 @@ if ($object->fetch($id)) print ''; // Local Taxes + //TODO: Place into a function to control showing by country or study better option if($mysoc->country_code=='ES') { if($mysoc->localtax1_assuj=="1" && $mysoc->localtax2_assuj=="1") @@ -176,6 +177,14 @@ if ($object->fetch($id)) print yn($object->localtax2_assuj); print ''; } + + if ($mysoc->localtax2_assuj!="1") + { + print ''.$langs->transcountry("LocalTax2IsUsed",$mysoc->country_code).''; + print yn($object->localtax2_assuj); + print ''; + } + } // TVA Intra diff --git a/htdocs/societe/soc.php b/htdocs/societe/soc.php index 97cd37205e1..02b93219a8e 100644 --- a/htdocs/societe/soc.php +++ b/htdocs/societe/soc.php @@ -5,7 +5,7 @@ * Copyright (C) 2005 Eric Seigne * Copyright (C) 2005-2012 Regis Houssin * Copyright (C) 2008 Patrick Raguin - * Copyright (C) 2010-2012 Juanjo Menent + * Copyright (C) 2010-2013 Juanjo Menent * * This program is free software; you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by @@ -931,7 +931,8 @@ else // Capital print ''.$langs->trans('Capital').' '.$langs->trans("Currency".$conf->currency).''; - // Local Taxes + // 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).''; @@ -953,7 +954,13 @@ else print $form->selectyesno('localtax2assuj_value',0,1); print ''; } - + + if ($mysoc->country_code=='ES' && $mysoc->localtax2_assuj!="1" && ! empty($conf->fournisseur->enabled) && (GETPOST("type")=='f' || GETPOST("type")=='') ) + { + print ''.$langs->transcountry("LocalTax2IsUsed",$mysoc->country_code).''; + print $form->selectyesno('localtax2assuj_value',0,1); + print ''; + } if (! empty($conf->global->MAIN_MULTILANGS)) { print ''.$langs->trans("DefaultLang").''."\n"; @@ -1349,6 +1356,7 @@ else 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).''; @@ -1371,6 +1379,13 @@ else print $form->selectyesno('localtax2assuj_value',$object->localtax2_assuj,1); 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 $form->selectyesno('localtax2assuj_value',0,1); + print ''; + } // Type - Size print ''.$langs->trans("ThirdPartyType").''; @@ -1665,6 +1680,7 @@ else 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).''; @@ -1686,6 +1702,13 @@ else print yn($object->localtax2_assuj); 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 ''; + } // Type + Staff $arr = $formcompany->typent_array(1);