diff --git a/htdocs/comm/propal.php b/htdocs/comm/propal.php index a7cf0850a277dc750443aeb9aa89bda716e07bf7..39f7ccc3ffcc183cd25512577dd763b8cf32abd1 100644 --- a/htdocs/comm/propal.php +++ b/htdocs/comm/propal.php @@ -5,6 +5,7 @@ * Copyright (C) 2005 Marc Barilley / Ocebo <marc@ocebo.com> * Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr> * Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr> + * Copyright (C) 2010 Juanjo Menent <jmenent@2byte.es> * * 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 @@ -1186,7 +1187,14 @@ if ($id > 0 || ! empty($ref)) if ($conf->projet->enabled) $rowspan++; if ($conf->global->PROPALE_ADD_DELIVERY_ADDRESS) $rowspan++; - + + //Local taxes + if ($mysoc->pays_code=='ES' && $conf->global->MAIN_FEATURES_LEVEL >= 1) + { + if($mysoc->localtax1_assuj=="1") $rowspan++; + if($mysoc->localtax2_assuj=="1") $rowspan++; + } + // Notes print '<td valign="top" colspan="2" width="50%" rowspan="'.$rowspan.'">'.$langs->trans('NotePublic').' :<br>'. nl2br($propal->note_public).'</td>'; print '</tr>'; @@ -1361,7 +1369,24 @@ if ($id > 0 || ! empty($ref)) print '<tr><td height="10">'.$langs->trans('AmountVAT').'</td>'; print '<td align="right" colspan="2" nowrap>'.price($propal->total_tva).'</td>'; print '<td>'.$langs->trans("Currency".$conf->monnaie).'</td></tr>'; - + + // Amount Local Taxes + if ($mysoc->pays_code=='ES' && $conf->global->MAIN_FEATURES_LEVEL >= 1) + { + if ($mysoc->localtax1_assuj=="1") //Localtax1 RE + { + print '<tr><td height="10">'.$langs->transcountry("AmountLT1",$mysoc->pays_code).'</td>'; + print '<td align="right" colspan="2" nowrap>'.price($propal->total_localtax1).'</td>'; + print '<td>'.$langs->trans("Currency".$conf->monnaie).'</td></tr>'; + } + if ($mysoc->localtax2_assuj=="1") //Localtax2 IRPF + { + print '<tr><td height="10">'.$langs->transcountry("AmountLT2",$mysoc->pays_code).'</td>'; + print '<td align="right" colspan="2" nowrap>'.price($propal->total_localtax2).'</td>'; + print '<td>'.$langs->trans("Currency".$conf->monnaie).'</td></tr>'; + } + } + // Amount TTC print '<tr><td height="10">'.$langs->trans('AmountTTC').'</td>'; print '<td align="right" colspan="2" nowrap>'.price($propal->total_ttc).'</td>'; diff --git a/htdocs/commande/fiche.php b/htdocs/commande/fiche.php index b05a943ced845c063cf212d3b43226207cbfffd6..c959ab15d27f7886e53a878c2c28b8bcef0481f5 100644 --- a/htdocs/commande/fiche.php +++ b/htdocs/commande/fiche.php @@ -4,6 +4,7 @@ * Copyright (C) 2005 Marc Barilley / Ocebo <marc@ocebo.com> * Copyright (C) 2005-2010 Regis Houssin <regis@dolibarr.fr> * Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr> + * Copyright (C) 2010 Juanjo Menent <jmenent@2byte.es> * * 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 @@ -1422,6 +1423,13 @@ else */ $nbrow=7; if ($conf->projet->enabled) $nbrow++; + + //Local taxes + if ($mysoc->pays_code=='ES' && $conf->global->MAIN_FEATURES_LEVEL >= 1) + { + if($mysoc->localtax1_assuj=="1") $nbrow++; + if($mysoc->localtax2_assuj=="1") $nbrow++; + } print '<table class="border" width="100%">'; @@ -1650,6 +1658,23 @@ else print '<tr><td>'.$langs->trans('AmountVAT').'</td><td align="right">'.price($commande->total_tva).'</td>'; print '<td>'.$langs->trans('Currency'.$conf->monnaie).'</td></tr>'; + // Amount Local Taxes + if ($mysoc->pays_code=='ES' && $conf->global->MAIN_FEATURES_LEVEL >= 1) + { + if ($mysoc->localtax1_assuj=="1") //Localtax1 RE + { + print '<tr><td>'.$langs->transcountry("AmountLT1",$mysoc->pays_code).'</td>'; + print '<td align="right">'.price($propal->total_localtax1).'</td>'; + print '<td>'.$langs->trans("Currency".$conf->monnaie).'</td></tr>'; + } + if ($mysoc->localtax2_assuj=="1") //Localtax2 IRPF + { + print '<tr><td>'.$langs->transcountry("AmountLT2",$mysoc->pays_code).'</td>'; + print '<td align="right">'.price($propal->total_localtax2).'</td>'; + print '<td>'.$langs->trans("Currency".$conf->monnaie).'</td></tr>'; + } + } + // Total TTC print '<tr><td>'.$langs->trans('AmountTTC').'</td><td align="right">'.price($commande->total_ttc).'</td>'; print '<td>'.$langs->trans('Currency'.$conf->monnaie).'</td></tr>'; diff --git a/htdocs/compta/commande/fiche.php b/htdocs/compta/commande/fiche.php index 7f843169924220e9b31b05cd4277b5cc71e6665d..bd8c346e8c784add453716f51594fd169a8778c9 100644 --- a/htdocs/compta/commande/fiche.php +++ b/htdocs/compta/commande/fiche.php @@ -2,6 +2,7 @@ /* Copyright (C) 2003-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org> * Copyright (C) 2004-2009 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2005-2010 Regis Houssin <regis@dolibarr.fr> + * Copyright (C) 2010 Juanjo Menent <jmenent@2byte.es> * * 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 @@ -147,8 +148,15 @@ if ($id > 0 || ! empty($ref)) /* * Commande */ - $nbrow=8; + $nbrow=7; if ($conf->projet->enabled) $nbrow++; + + //Local taxes + if ($mysoc->pays_code=='ES' && $conf->global->MAIN_FEATURES_LEVEL >= 1) + { + if($mysoc->localtax1_assuj=="1") $nbrow++; + if($mysoc->localtax2_assuj=="1") $nbrow++; + } print '<table class="border" width="100%">'; @@ -352,6 +360,23 @@ if ($id > 0 || ! empty($ref)) print '<tr><td>'.$langs->trans('AmountVAT').'</td><td align="right">'.price($commande->total_tva).'</td>'; print '<td>'.$langs->trans('Currency'.$conf->monnaie).'</td></tr>'; + // Amount Local Taxes + if ($mysoc->pays_code=='ES' && $conf->global->MAIN_FEATURES_LEVEL >= 1) + { + if ($mysoc->localtax1_assuj=="1") //Localtax1 RE + { + print '<tr><td>'.$langs->transcountry("AmountLT1",$mysoc->pays_code).'</td>'; + print '<td align="right">'.price($propal->total_localtax1).'</td>'; + print '<td>'.$langs->trans("Currency".$conf->monnaie).'</td></tr>'; + } + if ($mysoc->localtax2_assuj=="1") //Localtax2 IRPF + { + print '<tr><td>'.$langs->transcountry("AmountLT2",$mysoc->pays_code).'</td>'; + print '<td align="right">'.price($propal->total_localtax2).'</td>'; + print '<td>'.$langs->trans("Currency".$conf->monnaie).'</td></tr>'; + } + } + // Total TTC print '<tr><td>'.$langs->trans('AmountTTC').'</td><td align="right">'.price($commande->total_ttc).'</td>'; print '<td>'.$langs->trans('Currency'.$conf->monnaie).'</td></tr>'; diff --git a/htdocs/compta/facture.php b/htdocs/compta/facture.php index 9007e0413b15efd02f1ed291bc009a126e9fccae..c4798cde04d71644e49d2dc3f7de70424f6149a0 100644 --- a/htdocs/compta/facture.php +++ b/htdocs/compta/facture.php @@ -5,6 +5,7 @@ * Copyright (C) 2005 Marc Barilley / Ocebo <marc@ocebo.com> * Copyright (C) 2005-2010 Regis Houssin <regis@dolibarr.fr> * Copyright (C) 2006 Andre Cianfarani <acianfa@free.fr> + * Copyright (C) 2010 Juanjo Menent <jmenent@2byte.es> * * 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 @@ -2474,6 +2475,13 @@ else $nbrows=8; if ($conf->global->FAC_USE_CUSTOMER_ORDER_REF) $nbrows++; if ($conf->projet->enabled) $nbrows++; + + //Local taxes + if ($mysoc->pays_code=='ES' && $conf->global->MAIN_FEATURES_LEVEL >= 1) + { + if($mysoc->localtax1_assuj=="1") $nbrows++; + if($mysoc->localtax2_assuj=="1") $nbrows++; + } print '<td rowspan="'.$nbrows.'" colspan="2" valign="top">'; @@ -2798,6 +2806,24 @@ else print '<td>'.$langs->trans('Currency'.$conf->monnaie).'</td></tr>'; print '<tr><td>'.$langs->trans('AmountVAT').'</td><td align="right" colspan="2" nowrap>'.price($fac->total_tva).'</td>'; print '<td>'.$langs->trans('Currency'.$conf->monnaie).'</td></tr>'; + + // Amount Local Taxes + if ($mysoc->pays_code=='ES' && $conf->global->MAIN_FEATURES_LEVEL >= 1) + { + if ($mysoc->localtax1_assuj=="1") //Localtax1 RE + { + print '<tr><td>'.$langs->transcountry("AmountLT1",$mysoc->pays_code).'</td>'; + print '<td align="right" colspan="2" nowrap>'.price($propal->total_localtax1).'</td>'; + print '<td>'.$langs->trans("Currency".$conf->monnaie).'</td></tr>'; + } + if ($mysoc->localtax2_assuj=="1") //Localtax2 IRPF + { + print '<tr><td>'.$langs->transcountry("AmountLT2",$mysoc->pays_code).'</td>'; + print '<td align="right" colspan="2" nowrap>'.price($propal->total_localtax2).'</td>'; + print '<td>'.$langs->trans("Currency".$conf->monnaie).'</td></tr>'; + } + } + print '<tr><td>'.$langs->trans('AmountTTC').'</td><td align="right" colspan="2" nowrap>'.price($fac->total_ttc).'</td>'; print '<td>'.$langs->trans('Currency'.$conf->monnaie).'</td></tr>'; diff --git a/htdocs/compta/propal.php b/htdocs/compta/propal.php index 1566b55908aa6851448c48edca209db9a7eab7f9..d31ad73fd85fd7327eedeca6d969082d59fb5e7c 100644 --- a/htdocs/compta/propal.php +++ b/htdocs/compta/propal.php @@ -4,6 +4,7 @@ * Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com> * Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr> * Copyright (C) 2008 Raphael Bertrand (Resultic) <raphael.bertrand@resultic.fr> + * Copyright (C) 2010 Juanjo Menent <jmenent@2byte.es> * * 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 @@ -196,6 +197,13 @@ if ($id > 0 || ! empty($ref)) print '</td>'; if ($conf->projet->enabled) $rowspan++; + + //Local taxes + if ($mysoc->pays_code=='ES' && $conf->global->MAIN_FEATURES_LEVEL >= 1) + { + if($mysoc->localtax1_assuj=="1") $rowspan++; + if($mysoc->localtax2_assuj=="1") $rowspan++; + } // Note print '<td valign="top" colspan="2" width="50%" rowspan="'.$rowspan.'">'.$langs->trans('NotePublic').' :<br>'. nl2br($propal->note_public).'</td>'; @@ -303,6 +311,25 @@ if ($id > 0 || ! empty($ref)) print '<tr><td height="10">'.$langs->trans('AmountVAT').'</td><td align="right" colspan="2">'.price($propal->total_tva).'</td>'; print '<td>'.$langs->trans("Currency".$conf->monnaie).'</td></tr>'; + + // Amount Local Taxes + if ($mysoc->pays_code=='ES' && $conf->global->MAIN_FEATURES_LEVEL >= 1) + { + if ($mysoc->localtax1_assuj=="1") //Localtax1 RE + { + print '<tr><td>'.$langs->transcountry("AmountLT1",$mysoc->pays_code).'</td>'; + print '<td align="right" colspan="2">'.price($propal->total_localtax1).'</td>'; + print '<td>'.$langs->trans("Currency".$conf->monnaie).'</td></tr>'; + } + if ($mysoc->localtax2_assuj=="1") //Localtax2 IRPF + { + print '<tr><td>'.$langs->transcountry("AmountLT2",$mysoc->pays_code).'</td>'; + print '<td align="right" colspan="2">'.price($propal->total_localtax2).'</td>'; + print '<td>'.$langs->trans("Currency".$conf->monnaie).'</td></tr>'; + } + } + + print '<tr><td height="10">'.$langs->trans('AmountTTC').'</td><td align="right" colspan="2">'.price($propal->total_ttc).'</td>'; print '<td>'.$langs->trans("Currency".$conf->monnaie).'</td></tr>'; diff --git a/htdocs/fourn/commande/fiche.php b/htdocs/fourn/commande/fiche.php index 7d14261173917c91c7c4082494258c076738ebf3..72923db8276e0f93a64d4b073ec1cb56494460fa 100644 --- a/htdocs/fourn/commande/fiche.php +++ b/htdocs/fourn/commande/fiche.php @@ -3,6 +3,7 @@ * Copyright (C) 2004-2010 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2005 Eric Seigne <eric.seigne@ryxeo.com> * Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr> + * Copyright (C) 2010 Juanjo Menent <jmenent@2byte.es> * * 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 @@ -636,6 +637,14 @@ if ($id > 0 || ! empty($ref)) */ $nbrow=8; if ($conf->projet->enabled) $nbrow++; + + //Local taxes + if ($mysoc->pays_code=='ES' && $conf->global->MAIN_FEATURES_LEVEL >= 1) + { + if($mysoc->localtax1_assuj=="1") $nbrow++; + if($mysoc->localtax2_assuj=="1") $nbrow++; + } + print '<table class="border" width="100%">'; // Ref @@ -714,6 +723,22 @@ if ($id > 0 || ! empty($ref)) print '<tr><td>'.$langs->trans("AmountVAT").'</td><td align="right">'.price($commande->total_tva).'</td>'; print '<td>'.$langs->trans("Currency".$conf->monnaie).'</td></tr>'; + // Amount Local Taxes + if ($mysoc->pays_code=='ES' && $conf->global->MAIN_FEATURES_LEVEL >= 1) + { + if ($mysoc->localtax1_assuj=="1") //Localtax1 RE + { + print '<tr><td>'.$langs->transcountry("AmountLT1",$mysoc->pays_code).'</td>'; + print '<td align="right">'.price($propal->total_localtax1).'</td>'; + print '<td>'.$langs->trans("Currency".$conf->monnaie).'</td></tr>'; + } + if ($mysoc->localtax2_assuj=="1") //Localtax2 IRPF + { + print '<tr><td>'.$langs->transcountry("AmountLT2",$mysoc->pays_code).'</td>'; + print '<td align="right">'.price($propal->total_localtax2).'</td>'; + print '<td>'.$langs->trans("Currency".$conf->monnaie).'</td></tr>'; + } + } print '<tr><td>'.$langs->trans("AmountTTC").'</td><td align="right">'.price($commande->total_ttc).'</td>'; print '<td>'.$langs->trans("Currency".$conf->monnaie).'</td></tr>'; diff --git a/htdocs/fourn/facture/fiche.php b/htdocs/fourn/facture/fiche.php index 3c3da65807fe0d952ed68cec5ef6013c4707865b..a87305a72f2dc1513dc318ac74edaa28b5712a6c 100644 --- a/htdocs/fourn/facture/fiche.php +++ b/htdocs/fourn/facture/fiche.php @@ -4,6 +4,7 @@ * Copyright (C) 2004 Christophe Combelles <ccomb@free.fr> * Copyright (C) 2005 Marc Barilley / Ocebo <marc@ocebo.fr> * Copyright (C) 2005-2009 Regis Houssin <regis@dolibarr.fr> + * Copyright (C) 2010 Juanjo Menent <jmenent@2byte.es> * * 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 @@ -788,6 +789,13 @@ else */ $nbrows=7; if ($conf->projet->enabled) $nbrows++; + + // Local taxes + if ($mysoc->pays_code=='ES' && $conf->global->MAIN_FEATURES_LEVEL >= 1) + { + if($mysoc->localtax1_assuj=="1") $nbrow++; + if($mysoc->localtax2_assuj=="1") $nbrow++; + } print '<td rowspan="'.$nbrows.'" valign="top">'; $sql = 'SELECT datep as dp, pf.amount,'; @@ -874,9 +882,26 @@ else $alreadypaid=$fac->getSommePaiement(); print '<tr><td>'.$langs->trans('Status').'</td><td colspan="3">'.$fac->getLibStatut(4,$alreadypaid).'</td></tr>'; - print '<tr><td>'.$langs->trans('AmountHT').'</td><td><b>'.price($fac->total_ht).'</b></td><td colspan="2" align="left">'.$langs->trans('Currency'.$conf->monnaie).'</td></tr>'; - print '<tr><td>'.$langs->trans('AmountVAT').'</td><td>'.price($fac->total_tva).'</td><td colspan="2" align="left">'.$langs->trans('Currency'.$conf->monnaie).'</td></tr>'; - print '<tr><td>'.$langs->trans('AmountTTC').'</td><td>'.price($fac->total_ttc).'</td><td colspan="2" align="left">'.$langs->trans('Currency'.$conf->monnaie).'</td></tr>'; + print '<tr><td>'.$langs->trans('AmountHT').'</td><td align="right">'.price($fac->total_ht).'</td><td colspan="2" align="left">'.$langs->trans('Currency'.$conf->monnaie).'</td></tr>'; + print '<tr><td>'.$langs->trans('AmountVAT').'</td><td align="right">'.price($fac->total_tva).'</td><td colspan="2" align="left">'.$langs->trans('Currency'.$conf->monnaie).'</td></tr>'; + + // Amount Local Taxes + if ($mysoc->pays_code=='ES' && $conf->global->MAIN_FEATURES_LEVEL >= 1) + { + if ($mysoc->localtax1_assuj=="1") //Localtax1 RE + { + print '<tr><td>'.$langs->transcountry("AmountLT1",$mysoc->pays_code).'</td>'; + print '<td align="right">'.price($propal->total_localtax1).'</td>'; + print '<td>'.$langs->trans("Currency".$conf->monnaie).'</td></tr>'; + } + if ($mysoc->localtax2_assuj=="1") //Localtax2 IRPF + { + print '<tr><td>'.$langs->transcountry("AmountLT2",$mysoc->pays_code).'</td>'; + print '<td align="right">'.price($propal->total_localtax2).'</td>'; + print '<td>'.$langs->trans("Currency".$conf->monnaie).'</td></tr>'; + } + } + print '<tr><td>'.$langs->trans('AmountTTC').'</td><td align="right">'.price($fac->total_ttc).'</td><td colspan="2" align="left">'.$langs->trans('Currency'.$conf->monnaie).'</td></tr>'; // Project if ($conf->projet->enabled)