Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop

This commit is contained in:
Laurent Destailleur 2013-01-07 00:42:02 +01:00
commit ec664aaa71
11 changed files with 98 additions and 55 deletions

View File

@ -98,7 +98,7 @@ llxHeader('','','','',0,0,'','',$morequerystring);
$fsearch.='<br>'; $fsearch.='<br>';
$fsearch.=' <input type="hidden" name="year" value="'.$year.'">'; $fsearch.=' <input type="hidden" name="year" value="'.$year.'">';
$fsearch.=' <input type="hidden" name="modetax" value="'.$modetax.'">'; $fsearch.=' <input type="hidden" name="modetax" value="'.$modetax.'">';
$fsearch.=' '.$langs->trans("SalesTurnover").' '.$langs->trans("Minimum").': '; $fsearch.=' '.$langs->trans("SalesTurnoverMinimum").': ';
$fsearch.=' <input type="text" name="min" id="min" value="'.$min.'" size="6">'; $fsearch.=' <input type="text" name="min" id="min" value="'.$min.'" size="6">';
// Affiche en-tete du rapport // Affiche en-tete du rapport

View File

@ -103,7 +103,7 @@ llxHeader('','','','',0,0,'','',$morequerystring);
$fsearch.='<br>'; $fsearch.='<br>';
$fsearch.=' <input type="hidden" name="year" value="'.$year.'">'; $fsearch.=' <input type="hidden" name="year" value="'.$year.'">';
$fsearch.=' <input type="hidden" name="modetax" value="'.$modetax.'">'; $fsearch.=' <input type="hidden" name="modetax" value="'.$modetax.'">';
$fsearch.=' '.$langs->trans("SalesTurnover").' '.$langs->trans("Minimum").': '; $fsearch.=' '.$langs->trans("SalesTurnoverMinimum").': ';
$fsearch.=' <input type="text" name="min" id="min" value="'.$min.'" size="6">'; $fsearch.=' <input type="text" name="min" id="min" value="'.$min.'" size="6">';
// Affiche en-tete du rapport // Affiche en-tete du rapport

View File

@ -118,7 +118,7 @@ $paymentfourn_static=new PaiementFourn($db);
//$fsearch.='<br>'; //$fsearch.='<br>';
$fsearch.=' <input type="hidden" name="year" value="'.$year.'">'; $fsearch.=' <input type="hidden" name="year" value="'.$year.'">';
$fsearch.=' <input type="hidden" name="modetax" value="'.$modetax.'">'; $fsearch.=' <input type="hidden" name="modetax" value="'.$modetax.'">';
//$fsearch.=' '.$langs->trans("SalesTurnover").' '.$langs->trans("Minimum").': '; //$fsearch.=' '.$langs->trans("SalesTurnoverMinimum").': ';
//$fsearch.=' <input type="text" name="min" value="'.$min.'">'; //$fsearch.=' <input type="text" name="min" value="'.$min.'">';
// Affiche en-tete du rapport // Affiche en-tete du rapport

View File

@ -1134,33 +1134,33 @@ function form_constantes($tableau)
} }
/** /**
* Show array with constants to edit * Show array with constants to edit
* *
* @param array $modules Array of all modules * @param array $modules Array of all modules
* @return string HTML string with warning * @return string HTML string with warning
*/ */
function showModulesExludedForExternal($modules) function showModulesExludedForExternal($modules)
{ {
global $conf,$langs; global $conf,$langs;
$text=$langs->trans("OnlyFollowingModulesAreOpenedToExternalUsers"); $text=$langs->trans("OnlyFollowingModulesAreOpenedToExternalUsers");
$listofmodules=explode(',',$conf->global->MAIN_MODULES_FOR_EXTERNAL); $listofmodules=explode(',',$conf->global->MAIN_MODULES_FOR_EXTERNAL);
$i=0; $i=0;
foreach($modules as $module) foreach($modules as $module)
{ {
$moduleconst=$module->const_name; $moduleconst=$module->const_name;
$modulename=strtolower($module->name); $modulename=strtolower($module->name);
//print 'modulename='.$modulename; //print 'modulename='.$modulename;
//if (empty($conf->global->$moduleconst)) continue; //if (empty($conf->global->$moduleconst)) continue;
if (! in_array($modulename,$listofmodules)) continue; if (! in_array($modulename,$listofmodules)) continue;
if ($i > 0) $text.=', '; if ($i > 0) $text.=', ';
else $text.=' '; else $text.=' ';
$i++; $i++;
$text.=$langs->trans($module->name); $text .= $langs->trans('Module'.$module->numero.'Name');
} }
return img_picto($langs->trans('InfoAdmin'), 'star').' '.$text; return img_picto($langs->trans('InfoAdmin'), 'star').' '.$text;
} }

View File

@ -236,7 +236,7 @@ elseif ($action == 'add' && $user->rights->fournisseur->facture->creer)
$action='create'; $action='create';
$error++; $error++;
} }
if ($datefacture == '') if ($datefacture == '')
{ {
$mesg='<div class="error">'.$langs->trans('ErrorFieldRequired',$langs->transnoentities('DateInvoice')).'</div>'; $mesg='<div class="error">'.$langs->trans('ErrorFieldRequired',$langs->transnoentities('DateInvoice')).'</div>';
@ -291,7 +291,7 @@ elseif ($action == 'add' && $user->rights->fournisseur->facture->creer)
if ($element == 'project') if ($element == 'project')
{ {
$element = 'projet'; $element = 'projet';
} }
$object->origin = $_POST['origin']; $object->origin = $_POST['origin'];
$object->origin_id = $_POST['originid']; $object->origin_id = $_POST['originid'];
@ -613,6 +613,8 @@ elseif ($action == 'edit' && $user->rights->fournisseur->facture->creer)
$outputlangs->setDefaultLang($_REQUEST['lang_id']); $outputlangs->setDefaultLang($_REQUEST['lang_id']);
} }
//if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) supplier_invoice_pdf_create($db, $object->id, $object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref, $hookmanager); //if (empty($conf->global->MAIN_DISABLE_PDF_AUTOUPDATE)) supplier_invoice_pdf_create($db, $object->id, $object->modelpdf, $outputlangs, $hidedetails, $hidedesc, $hideref, $hookmanager);
$action='';
} }
} }
@ -959,7 +961,7 @@ if ($action == 'create')
if ($element == 'project') if ($element == 'project')
{ {
$projectid=GETPOST('originid'); $projectid=GETPOST('originid');
$element = 'projet'; $element = 'projet';
} }
else if (in_array($element,array('order_supplier'))) else if (in_array($element,array('order_supplier')))
{ {
@ -1382,7 +1384,7 @@ else
// Local taxes // Local taxes
// TODO I use here $societe->localtax1_assuj. Before it was $mysoc->localtax1_assuj, but this is a supplier invoice, so made by supplier, so depends on supplier properties // TODO I use here $societe->localtax1_assuj. Before it was $mysoc->localtax1_assuj, but this is a supplier invoice, so made by supplier, so depends on supplier properties
if ($mysoc->country_code=='ES') if ($mysoc->country_code=='ES')
{ {
if($mysoc->localtax1_assuj=="1") $nbrows++; if($mysoc->localtax1_assuj=="1") $nbrows++;
@ -1517,7 +1519,7 @@ else
print '<td>'.$langs->trans("Currency".$conf->currency).'</td></tr>'; print '<td>'.$langs->trans("Currency".$conf->currency).'</td></tr>';
} }
} }
else else
{ {
if ($societe->localtax1_assuj=="1") //Localtax1 RE if ($societe->localtax1_assuj=="1") //Localtax1 RE
{ {
@ -1858,7 +1860,7 @@ else
print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">'; print '<input type="hidden" name="token" value="'.$_SESSION['newtoken'].'">';
print '<input type="hidden" name="socid" value="'. $object->socid .'">'; print '<input type="hidden" name="socid" value="'. $object->socid .'">';
print '<input type="hidden" name="facid" value="'.$object->id.'">'; print '<input type="hidden" name="facid" value="'.$object->id.'">';
print '<script type="text/javascript"> print '<script type="text/javascript">
jQuery(document).ready(function() { jQuery(document).ready(function() {
jQuery(\'#idprodfournprice\').change(function() { jQuery(\'#idprodfournprice\').change(function() {
@ -1866,7 +1868,7 @@ else
}); });
}); });
</script>'; </script>';
$var=! $var; $var=! $var;
print '<tr '.$bc[$var].'>'; print '<tr '.$bc[$var].'>';
print '<td colspan="4">'; print '<td colspan="4">';
@ -1908,14 +1910,19 @@ else
if ($action != 'presend') if ($action != 'presend')
{ {
/* /*
* Boutons actions * Boutons actions
*/ */
print '<div class="tabsAction">'; print '<div class="tabsAction">';
// Reopen a standard paid invoice // Modify a validated invoice with no payments
if ($object->statut == 1 && $action != 'edit' && $object->getSommePaiement() == 0 && $user->rights->fournisseur->facture->creer)
{
print '<a class="butAction" href="'.$_SERVER['PHP_SELF'].'?id='.$object->id.'&amp;action=edit">'.$langs->trans('Modify').'</a>';
}
// Reopen a standard paid invoice
if (($object->type == 0 || $object->type == 1) && ($object->statut == 2 || $object->statut == 3)) // A paid invoice (partially or completely) if (($object->type == 0 || $object->type == 1) && ($object->statut == 2 || $object->statut == 3)) // A paid invoice (partially or completely)
{ {
if (! $facidnext && $object->close_code != 'replaced') // Not replaced by another invoice if (! $facidnext && $object->close_code != 'replaced') // Not replaced by another invoice

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 Juanjo Menent <jmenent@2byte.es> * Copyright (C) 2010-2013 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
@ -153,6 +153,7 @@ 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->country_code=='ES')
{ {
if($mysoc->localtax1_assuj=="1" && $mysoc->localtax2_assuj=="1") if($mysoc->localtax1_assuj=="1" && $mysoc->localtax2_assuj=="1")
@ -176,6 +177,14 @@ if ($object->fetch($id))
print yn($object->localtax2_assuj); print yn($object->localtax2_assuj);
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

View File

@ -9,6 +9,7 @@
-- Copyright (C) 2012 Sebastian Neuwert <sebastian.neuwert@modula71.de> -- Copyright (C) 2012 Sebastian Neuwert <sebastian.neuwert@modula71.de>
-- Copyright (C) 2012 Tommaso Basilici <t.basilici@19.coop> -- Copyright (C) 2012 Tommaso Basilici <t.basilici@19.coop>
-- Copyright (C) 2012 Ricardo Schluter <info@ripasch.nl> -- Copyright (C) 2012 Ricardo Schluter <info@ripasch.nl>
-- Copyright (C) 2013 Cedric GROSS <c.gross@kreiz-it.fr>
-- --
-- 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
@ -80,8 +81,9 @@ insert into llx_c_forme_juridique (fk_pays, code, libelle) values (1,'53','Soci
insert into llx_c_forme_juridique (fk_pays, code, libelle) values (1,'54','Société à responsabilité limitée (SARL)'); insert into llx_c_forme_juridique (fk_pays, code, libelle) values (1,'54','Société à responsabilité limitée (SARL)');
insert into llx_c_forme_juridique (fk_pays, code, libelle) values (1,'55','Société anonyme à conseil d administration'); insert into llx_c_forme_juridique (fk_pays, code, libelle) values (1,'55','Société anonyme à conseil d administration');
insert into llx_c_forme_juridique (fk_pays, code, libelle) values (1,'56','Société anonyme à directoire'); insert into llx_c_forme_juridique (fk_pays, code, libelle) values (1,'56','Société anonyme à directoire');
insert into llx_c_forme_juridique (fk_pays, code, libelle) values (1,'57','Société par actions simplifiée'); insert into llx_c_forme_juridique (fk_pays, code, libelle) values (1,'57','Société par actions simplifiée (SAS)');
insert into llx_c_forme_juridique (fk_pays, code, libelle) values (1,'58','Entreprise Unipersonnelle à Responsabilité Limitée (EURL)'); insert into llx_c_forme_juridique (fk_pays, code, libelle) values (1,'58','Entreprise Unipersonnelle à Responsabilité Limitée (EURL)');
insert into llx_c_forme_juridique (fk_pays, code, libelle) values (1,'59','Société par actions simplifiée unipersonnelle (SASU)');
insert into llx_c_forme_juridique (fk_pays, code, libelle) values (1,'61','Caisse d''épargne et de prévoyance'); insert into llx_c_forme_juridique (fk_pays, code, libelle) values (1,'61','Caisse d''épargne et de prévoyance');
insert into llx_c_forme_juridique (fk_pays, code, libelle) values (1,'62','Groupement d''intérêt économique (GIE)'); insert into llx_c_forme_juridique (fk_pays, code, libelle) values (1,'62','Groupement d''intérêt économique (GIE)');
@ -131,15 +133,15 @@ insert into llx_c_forme_juridique (fk_pays, code, libelle) values (5, '507', 'Lt
insert into llx_c_forme_juridique (fk_pays, code, libelle) values (5, '508', 'OHG - Offene Handelsgesellschaft'); insert into llx_c_forme_juridique (fk_pays, code, libelle) values (5, '508', 'OHG - Offene Handelsgesellschaft');
-- Greece -- Greece
INSERT INTO `llx_c_forme_juridique` (code,fk_pays,libelle,isvatexempted,active) VALUES ('10201',102,'Ατομική επιχείρηση',0,1); INSERT INTO llx_c_forme_juridique (code,fk_pays,libelle,isvatexempted,active) VALUES ('10201',102,'Ατομική επιχείρηση',0,1);
INSERT INTO `llx_c_forme_juridique` (code,fk_pays,libelle,isvatexempted,active) VALUES ('10202',102,'Εταιρική επιχείρηση',0,1); INSERT INTO llx_c_forme_juridique (code,fk_pays,libelle,isvatexempted,active) VALUES ('10202',102,'Εταιρική επιχείρηση',0,1);
INSERT INTO `llx_c_forme_juridique` (code,fk_pays,libelle,isvatexempted,active) VALUES ('10203',102,'Ομόρρυθμη Εταιρεία Ο.Ε',0,1); INSERT INTO llx_c_forme_juridique (code,fk_pays,libelle,isvatexempted,active) VALUES ('10203',102,'Ομόρρυθμη Εταιρεία Ο.Ε',0,1);
INSERT INTO `llx_c_forme_juridique` (code,fk_pays,libelle,isvatexempted,active) VALUES ('10204',102,'Ετερόρρυθμη Εταιρεία Ε.Ε',0,1); INSERT INTO llx_c_forme_juridique (code,fk_pays,libelle,isvatexempted,active) VALUES ('10204',102,'Ετερόρρυθμη Εταιρεία Ε.Ε',0,1);
INSERT INTO `llx_c_forme_juridique` (code,fk_pays,libelle,isvatexempted,active) VALUES ('10205',102,'Εταιρεία Περιορισμένης Ευθύνης Ε.Π.Ε',0,1); INSERT INTO llx_c_forme_juridique (code,fk_pays,libelle,isvatexempted,active) VALUES ('10205',102,'Εταιρεία Περιορισμένης Ευθύνης Ε.Π.Ε',0,1);
INSERT INTO `llx_c_forme_juridique` (code,fk_pays,libelle,isvatexempted,active) VALUES ('10206',102,'Ανώνυμη Εταιρεία Α.Ε',0,1); INSERT INTO llx_c_forme_juridique (code,fk_pays,libelle,isvatexempted,active) VALUES ('10206',102,'Ανώνυμη Εταιρεία Α.Ε',0,1);
INSERT INTO `llx_c_forme_juridique` (code,fk_pays,libelle,isvatexempted,active) VALUES ('10207',102,'Ανώνυμη ναυτιλιακή εταιρεία Α.Ν.Ε',0,1); INSERT INTO llx_c_forme_juridique (code,fk_pays,libelle,isvatexempted,active) VALUES ('10207',102,'Ανώνυμη ναυτιλιακή εταιρεία Α.Ν.Ε',0,1);
INSERT INTO `llx_c_forme_juridique` (code,fk_pays,libelle,isvatexempted,active) VALUES ('10208',102,'Συνεταιρισμός',0,1); INSERT INTO llx_c_forme_juridique (code,fk_pays,libelle,isvatexempted,active) VALUES ('10208',102,'Συνεταιρισμός',0,1);
INSERT INTO `llx_c_forme_juridique` (code,fk_pays,libelle,isvatexempted,active) VALUES ('10209',102,'Συμπλοιοκτησία',0,1); INSERT INTO llx_c_forme_juridique (code,fk_pays,libelle,isvatexempted,active) VALUES ('10209',102,'Συμπλοιοκτησία',0,1);
-- Italy -- Italy
INSERT INTO llx_c_forme_juridique (code,fk_pays,libelle,isvatexempted,active) VALUES ('301',3,'Società semplice',0,1); INSERT INTO llx_c_forme_juridique (code,fk_pays,libelle,isvatexempted,active) VALUES ('301',3,'Società semplice',0,1);

View File

@ -84,7 +84,8 @@ AccountNumberShort=Account number
AccountNumber=Account number AccountNumber=Account number
NewAccount=New account NewAccount=New account
SalesTurnover=Sales turnover SalesTurnover=Sales turnover
ByThirdParties=Bu third parties SalesTurnoverMinimum=Minimum sales turnover
ByThirdParties=By third parties
ByUserAuthorOfInvoice=By invoice author ByUserAuthorOfInvoice=By invoice author
AccountancyExport=Accountancy export AccountancyExport=Accountancy export
ErrorWrongAccountancyCodeForCompany=Bad customer accountancy code for %s ErrorWrongAccountancyCodeForCompany=Bad customer accountancy code for %s

View File

@ -153,9 +153,9 @@ ProfId4DE=-
ProfId5DE=- ProfId5DE=-
ProfId6DE=- ProfId6DE=-
ProfId1ES=CIF/NIF ProfId1ES=CIF/NIF
ProfId2ES=Núm seguridad social ProfId2ES=Núm. seguridad social
ProfId3ES=CNAE ProfId3ES=CNAE
ProfId4ES=Núm colegiado ProfId4ES=Núm. colegiado
ProfId5ES=- ProfId5ES=-
ProfId6ES=- ProfId6ES=-
ProfId1FR=SIREN ProfId1FR=SIREN

View File

@ -85,6 +85,7 @@ AccountNumberShort=Nº de cuenta
AccountNumber=Número de cuenta AccountNumber=Número de cuenta
NewAccount=Nueva cuenta NewAccount=Nueva cuenta
SalesTurnover=Volumen de ventas SalesTurnover=Volumen de ventas
SalesTurnoverMinimum=Volumen de ventas mínimo
ByThirdParties=Por tercero ByThirdParties=Por tercero
ByUserAuthorOfInvoice=Por autor de la factura ByUserAuthorOfInvoice=Por autor de la factura
AccountancyExport=Exportación contabilidad AccountancyExport=Exportación contabilidad

View File

@ -5,7 +5,7 @@
* Copyright (C) 2005 Eric Seigne <eric.seigne@ryxeo.com> * Copyright (C) 2005 Eric Seigne <eric.seigne@ryxeo.com>
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com> * Copyright (C) 2005-2012 Regis Houssin <regis.houssin@capnetworks.com>
* Copyright (C) 2008 Patrick Raguin <patrick.raguin@auguria.net> * Copyright (C) 2008 Patrick Raguin <patrick.raguin@auguria.net>
* Copyright (C) 2010-2012 Juanjo Menent <jmenent@2byte.es> * Copyright (C) 2010-2013 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
@ -931,7 +931,8 @@ else
// Capital // Capital
print '<tr><td>'.$langs->trans('Capital').'</td><td colspan="3"><input type="text" name="capital" size="10" value="'.$object->capital.'"> '.$langs->trans("Currency".$conf->currency).'</td></tr>'; print '<tr><td>'.$langs->trans('Capital').'</td><td colspan="3"><input type="text" name="capital" size="10" value="'.$object->capital.'"> '.$langs->trans("Currency".$conf->currency).'</td></tr>';
// 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") if($mysoc->localtax1_assuj=="1" && $mysoc->localtax2_assuj=="1")
{ {
print '<tr><td>'.$langs->transcountry("LocalTax1IsUsed",$mysoc->country_code).'</td><td>'; print '<tr><td>'.$langs->transcountry("LocalTax1IsUsed",$mysoc->country_code).'</td><td>';
@ -953,7 +954,13 @@ else
print $form->selectyesno('localtax2assuj_value',0,1); print $form->selectyesno('localtax2assuj_value',0,1);
print '</td><tr>'; print '</td><tr>';
} }
if ($mysoc->country_code=='ES' && $mysoc->localtax2_assuj!="1" && ! empty($conf->fournisseur->enabled) && (GETPOST("type")=='f' || GETPOST("type")=='') )
{
print '<tr><td>'.$langs->transcountry("LocalTax2IsUsed",$mysoc->country_code).'</td><td colspan="3">';
print $form->selectyesno('localtax2assuj_value',0,1);
print '</td><tr>';
}
if (! empty($conf->global->MAIN_MULTILANGS)) if (! empty($conf->global->MAIN_MULTILANGS))
{ {
print '<tr><td>'.$langs->trans("DefaultLang").'</td><td colspan="3">'."\n"; print '<tr><td>'.$langs->trans("DefaultLang").'</td><td colspan="3">'."\n";
@ -1349,6 +1356,7 @@ else
print '</tr>'; print '</tr>';
// 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") if($mysoc->localtax1_assuj=="1" && $mysoc->localtax2_assuj=="1")
{ {
print '<tr><td>'.$langs->transcountry("LocalTax1IsUsed",$mysoc->country_code).'</td><td>'; print '<tr><td>'.$langs->transcountry("LocalTax1IsUsed",$mysoc->country_code).'</td><td>';
@ -1371,6 +1379,13 @@ else
print $form->selectyesno('localtax2assuj_value',$object->localtax2_assuj,1); print $form->selectyesno('localtax2assuj_value',$object->localtax2_assuj,1);
print '</td></tr>'; print '</td></tr>';
} }
if ($mysoc->country_code=='ES' && $mysoc->localtax2_assuj!="1" && ! empty($conf->fournisseur->enabled) && $object->fournisseur==1)
{
print '<tr><td>'.$langs->transcountry("LocalTax2IsUsed",$mysoc->country_code).'</td><td colspan="3">';
print $form->selectyesno('localtax2assuj_value',0,1);
print '</td><tr>';
}
// Type - Size // Type - Size
print '<tr><td>'.$langs->trans("ThirdPartyType").'</td><td>'; print '<tr><td>'.$langs->trans("ThirdPartyType").'</td><td>';
@ -1665,6 +1680,7 @@ else
print '</tr>'; print '</tr>';
// 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") if($mysoc->localtax1_assuj=="1" && $mysoc->localtax2_assuj=="1")
{ {
print '<tr><td>'.$langs->transcountry("LocalTax1IsUsed",$mysoc->country_code).'</td><td>'; print '<tr><td>'.$langs->transcountry("LocalTax1IsUsed",$mysoc->country_code).'</td><td>';
@ -1686,6 +1702,13 @@ else
print yn($object->localtax2_assuj); print yn($object->localtax2_assuj);
print '</td><tr>'; print '</td><tr>';
} }
if ($mysoc->country_code=='ES' && $mysoc->localtax2_assuj!="1" && ! empty($conf->fournisseur->enabled) && $object->fournisseur==1)
{
print '<tr><td>'.$langs->transcountry("LocalTax2IsUsed",$mysoc->country_code).'</td><td colspan="3">';
print yn($object->localtax2_assuj);
print '</td><tr>';
}
// Type + Staff // Type + Staff
$arr = $formcompany->typent_array(1); $arr = $formcompany->typent_array(1);