[ task #1063 ] Allow edit localtaxes rate for thirds. Remove country

condition
This commit is contained in:
Juanjo Menent 2014-07-04 13:37:25 +02:00
parent 9fa44e6221
commit 466086dca3
2 changed files with 41 additions and 55 deletions

View File

@ -5,7 +5,7 @@
* Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr> * Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr>
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com> * Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr> * Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr>
* Copyright (C) 2010-2013 Juanjo Menent <jmenent@2byte.es> * Copyright (C) 2010-2014 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2013 Alexandre Spangaro <alexandre.spangaro@gmail.com> * Copyright (C) 2013 Alexandre Spangaro <alexandre.spangaro@gmail.com>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
@ -288,8 +288,6 @@ if ($id > 0)
print '</tr>'; print '</tr>';
// Local Taxes // Local Taxes
if($mysoc->country_code=='ES')
{
if($mysoc->localtax1_assuj=="1" && $mysoc->localtax2_assuj=="1") if($mysoc->localtax1_assuj=="1" && $mysoc->localtax2_assuj=="1")
{ {
print '<tr><td class="nowrap">'.$langs->trans('LocalTax1IsUsedES').'</td><td colspan="3">'; print '<tr><td class="nowrap">'.$langs->trans('LocalTax1IsUsedES').'</td><td colspan="3">';
@ -311,7 +309,7 @@ if ($id > 0)
print yn($object->localtax2_assuj); print yn($object->localtax2_assuj);
print '</td></tr>'; print '</td></tr>';
} }
}
// TVA Intra // TVA Intra
print '<tr><td class="nowrap">'.$langs->trans('VATIntra').'</td><td colspan="3">'; print '<tr><td class="nowrap">'.$langs->trans('VATIntra').'</td><td colspan="3">';

View File

@ -3,7 +3,7 @@
* Copyright (C) 2003 Eric Seigne <erics@rycks.com> * Copyright (C) 2003 Eric Seigne <erics@rycks.com>
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2010 Regis Houssin <regis.houssin@capnetworks.com> * Copyright (C) 2005-2010 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2010-2013 Juanjo Menent <jmenent@2byte.es> * Copyright (C) 2010-2014 Juanjo Menent <jmenent@2byte.es>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
@ -166,9 +166,6 @@ if ($object->fetch($id))
print '</tr>'; print '</tr>';
// Local Taxes // 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") if($mysoc->localtax1_assuj=="1" && $mysoc->localtax2_assuj=="1")
{ {
print '<tr><td class="nowrap">'.$langs->trans('LocalTax1IsUsedES').'</td><td colspan="3">'; print '<tr><td class="nowrap">'.$langs->trans('LocalTax1IsUsedES').'</td><td colspan="3">';
@ -191,15 +188,6 @@ if ($object->fetch($id))
print '</td></tr>'; print '</td></tr>';
} }
if ($mysoc->localtax2_assuj!="1")
{
print '<tr><td>'.$langs->transcountry("LocalTax2IsUsed",$mysoc->country_code).'</td><td colspan="3">';
print yn($object->localtax2_assuj);
print '</td><tr>';
}
}
// TVA Intra // TVA Intra
print '<tr><td class="nowrap">'.$langs->trans('VATIntra').'</td><td colspan="3">'; print '<tr><td class="nowrap">'.$langs->trans('VATIntra').'</td><td colspan="3">';
print $object->tva_intra; print $object->tva_intra;