diff --git a/htdocs/admin/compta.php b/htdocs/admin/compta.php
index a5213413d54..c30af26f1c0 100644
--- a/htdocs/admin/compta.php
+++ b/htdocs/admin/compta.php
@@ -107,7 +107,7 @@ print '
';
$h = 0;
$head[$h][0] = DOL_URL_ROOT."/admin/compta.php";
-$head[$h][1] = $langs->trans("Compta");
+$head[$h][1] = $langs->trans("Accountancy");
$head[$h][2] = 'Compta';
$hselected=$h;
$h++;
diff --git a/htdocs/admin/dict.php b/htdocs/admin/dict.php
index cf93f472019..39e8bbf0a2d 100644
--- a/htdocs/admin/dict.php
+++ b/htdocs/admin/dict.php
@@ -1084,15 +1084,23 @@ if ($id)
}
// Est-ce une entree du dictionnaire qui peut etre desactivee ?
- $iserasable=1; // Oui par defaut
- if (isset($obj->code) && ($obj->code == '0' || $obj->code == '' || preg_match('/unknown/i',$obj->code))) $iserasable=0;
- if (isset($obj->code) && $obj->code == 'RECEP') $iserasable=0;
- if (isset($obj->code) && $obj->code == 'EF0') $iserasable=0;
+ // True by default
+ $iserasable=1;
+
+ if (isset($obj->code))
+ {
+ if (($obj->code == '0' || $obj->code == '' || preg_match('/unknown/i',$obj->code))) $iserasable = 0;
+ else if ($obj->code == 'RECEP') $iserasable = 0;
+ else if ($obj->code == 'EF0') $iserasable = 0;
+ }
+
if (isset($obj->type) && in_array($obj->type, array('system', 'systemauto'))) $iserasable=0;
+ $url = $_SERVER["PHP_SELF"].'?'.($page?'page='.$page.'&':'').'sortfield='.$sortfield.'&sortorder='.$sortorder.'&rowid='.(! empty($obj->rowid)?$obj->rowid:(! empty($obj->code)?$obj->code:'')).'&code='.(! empty($obj->code)?$obj->code:'').'&id='.$id.'&';
+
// Active
print '
';
if (! empty($tabcond[$i]))
{
print ''.$langs->trans($tablib[$i]).'';
diff --git a/htdocs/admin/modules.php b/htdocs/admin/modules.php
index 4440d632b2e..acdf756eb86 100644
--- a/htdocs/admin/modules.php
+++ b/htdocs/admin/modules.php
@@ -194,7 +194,7 @@ asort($orders);
$nbofactivatedmodules=count($conf->modules);
$moreinfo=$langs->trans("TotalNumberOfActivatedModules",($nbofactivatedmodules-1));
-
+if ($nbofactivatedmodules <= 1) $moreinfo .= ' '.img_warning($langs->trans("YouMustEnableOneModule"));
print load_fiche_titre($langs->trans("ModulesSetup"),$moreinfo,'setup');
// Start to show page
@@ -206,7 +206,7 @@ if ($mode==='functional') print $langs->trans("ModulesJobDesc")." \n";
if ($mode==='marketplace') print $langs->trans("ModulesMarketPlaceDesc")." \n";
if ($mode==='expdev') print $langs->trans("ModuleFamilyExperimental")." \n";
-if ($nbofactivatedmodules <= 1) print ' '.img_warning($langs->trans("YouMustEnableOneModule"));
+
//print ' '."\n";
diff --git a/htdocs/compta/journal/purchasesjournal.php b/htdocs/compta/journal/purchasesjournal.php
index a37d5c240df..124ae380d09 100755
--- a/htdocs/compta/journal/purchasesjournal.php
+++ b/htdocs/compta/journal/purchasesjournal.php
@@ -4,6 +4,7 @@
* Copyright (C) 2011 Juanjo Menent
* Copyright (C) 2012 Regis Houssin
* Copyright (C) 2011-2012 Alexandre Spangaro
+ * Copyright (C) 2013 Marcos García
*
* 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
@@ -166,7 +167,6 @@ else {
/*
* Show result array
*/
-$i = 0;
print "";
print "";
///print "| ".$langs->trans("JournalNum")." | ";
@@ -177,96 +177,71 @@ print "".$langs->trans("Type")." | ".$langs->trans("Debi
print " | \n";
$var=true;
-$r='';
$invoicestatic=new FactureFournisseur($db);
$companystatic=new Fournisseur($db);
foreach ($tabfac as $key => $val)
{
- $invoicestatic->id=$key;
- $invoicestatic->ref=$val["ref"];
- $invoicestatic->type=$val["type"];
+ $invoicestatic->id = $key;
+ $invoicestatic->ref = $val["ref"];
+ $invoicestatic->type = $val["type"];
- // product
- foreach ($tabht[$key] as $k => $mt)
+ $companystatic->id = $tabcompany[$key]['id'];
+ $companystatic->name = $tabcompany[$key]['name'];
+
+ $lines = array(
+ array(
+ 'var' => $tabht[$key],
+ 'label' => $langs->trans('Products'),
+ ),
+ array(
+ 'var' => $tabtva[$key],
+ 'label' => $langs->trans('VAT')
+ ),
+ array(
+ 'var' => $tablocaltax1[$key],
+ 'label' => $langs->transcountry('LT1', $mysoc->country_code)
+ ),
+ array(
+ 'var' => $tablocaltax2[$key],
+ 'label' => $langs->transcountry('LT2', $mysoc->country_code)
+ ),
+ array(
+ 'var' => $tabttc[$key],
+ 'label' => $langs->trans('ThirdParty').' ('.$companystatic->getNomUrl(0, 'supplier', 16).')',
+ 'nomtcheck' => true,
+ 'inv' => true
+ )
+ );
+
+ foreach ($lines as $line)
{
- if ($mt)
+ foreach ($line['var'] as $k => $mt)
{
- print "";
- //print "| ".$conf->global->COMPTA_JOURNAL_BUY." | ";
- print "".$val["date"]." | ";
- print "".$invoicestatic->getNomUrl(1)." | ";
- print "".$k." | ".$langs->trans("Products")." | ";
- print ''.($mt>=0?price($mt):'')." | ";
- print ''.($mt<0?price(-$mt):'')." | ";
- print " ";
+ if (isset($line['nomtcheck']) || $mt)
+ {
+ print "";
+ //print "| ".$conf->global->COMPTA_JOURNAL_BUY." | ";
+ print "".$val["date"]." | ";
+ print "".$invoicestatic->getNomUrl(1)." | ";
+ print "".$k." | ".$line['label']." | ";
+
+ if (isset($line['inv']))
+ {
+ print ''.($mt<0?price(-$mt):'')." | ";
+ print ''.($mt>=0?price($mt):'')." | ";
+ }
+ else
+ {
+ print ''.($mt>=0?price($mt):'')." | ";
+ print ''.($mt<0?price(-$mt):'')." | ";
+ }
+
+ print " ";
+ }
}
}
- // vat
- foreach ($tabtva[$key] as $k => $mt)
- {
- if ($mt)
- {
- print "";
- //print "| ".$conf->global->COMPTA_JOURNAL_BUY." | ";
- print "".$val["date"]." | ";
- print "".$invoicestatic->getNomUrl(1)." | ";
- print "".$k." | ".$langs->trans("VAT")." | ";
- print ''.($mt>=0?price($mt):'')." | ";
- print ''.($mt<0?price(-$mt):'')." | ";
- print " ";
- }
- }
- // localtax1
- foreach ($tablocaltax1[$key] as $k => $mt)
- {
- if ($mt)
- {
- print "";
- //print "| ".$conf->global->COMPTA_JOURNAL_BUY." | ";
- print "".$val["date"]." | ";
- print "".$invoicestatic->getNomUrl(1)." | ";
- print "".$k." | ".$langs->transcountrynoentities("LT1",$mysoc->country_code)." | ";
- print "".($mt>=0?price($mt):'')." | ";
- print "".($mt<0?price(-$mt):'')." | ";
- print " ";
- }
- }
- // localtax2
- foreach ($tablocaltax2[$key] as $k => $mt)
- {
- if ($mt)
- {
- print "";
- //print "| ".$conf->global->COMPTA_JOURNAL_BUY." | ";
- print "".$val["date"]." | ";
- print "".$invoicestatic->getNomUrl(1)." | ";
- print "".$k." | ".$langs->transcountrynoentities("LT2",$mysoc->country_code)." | ";
- print "".($mt>=0?price($mt):'')." | ";
- print "".($mt<0?price(-$mt):'')." | ";
- print " ";
- }
- }
- print "";
- // third party
- //print "| ".$conf->global->COMPTA_JOURNAL_BUY." | ";
- print "".$val["date"]." | ";
- print "".$invoicestatic->getNomUrl(1)." | ";
-
- foreach ($tabttc[$key] as $k => $mt)
- {
- $companystatic->id=$tabcompany[$key]['id'];
- $companystatic->name=$tabcompany[$key]['name'];
-
- print "".$k;
- print " | ".$langs->trans("ThirdParty");
- print ' ('.$companystatic->getNomUrl(0,'supplier',16).')';
- print " | ";
- print ''.($mt<0?price(-$mt):'')." | ";
- print ''.($mt>=0?price($mt):'')." | ";
- }
- print " ";
$var = !$var;
}
diff --git a/htdocs/compta/journal/sellsjournal.php b/htdocs/compta/journal/sellsjournal.php
index ddb12839bf4..1192248ebac 100755
--- a/htdocs/compta/journal/sellsjournal.php
+++ b/htdocs/compta/journal/sellsjournal.php
@@ -178,17 +178,15 @@ else {
*/
-$i = 0;
-print "";
-print "";
+print '';
+print '';
//print "| ".$langs->trans("JournalNum")." | ";
-print "".$langs->trans("Date")." | ".$langs->trans("Piece").' ('.$langs->trans("InvoiceRef").") | ";
-print "".$langs->trans("Account")." | ";
-print "".$langs->trans("Type")." | ".$langs->trans("Debit")." | ".$langs->trans("Credit")." | ";
+print ''.$langs->trans('Date').' | '.$langs->trans('Piece').' ('.$langs->trans('InvoiceRef').') | ';
+print ''.$langs->trans('Account').' | ';
+print ''.$langs->trans('Type').' | '.$langs->trans('Debit').' | '.$langs->trans('Credit').' | ';
print " \n";
$var=true;
-$r='';
$invoicestatic=new Facture($db);
$companystatic=new Client($db);
@@ -199,74 +197,62 @@ foreach ($tabfac as $key => $val)
$invoicestatic->ref=$val["ref"];
$invoicestatic->type=$val["type"];
- print "";
- // third party
- //print "| ".$conf->global->COMPTA_JOURNAL_SELL." | ";
- print "".$val["date"]." | ";
- print "".$invoicestatic->getNomUrl(1)." | ";
- foreach ($tabttc[$key] as $k => $mt)
+ $companystatic->id=$tabcompany[$key]['id'];
+ $companystatic->name=$tabcompany[$key]['name'];
+ $companystatic->client=$tabcompany[$key]['client'];
+
+ $lines = array(
+ array(
+ 'var' => $tabttc[$key],
+ 'label' => $langs->trans('ThirdParty').' ('.$companystatic->getNomUrl(0, 'customer', 16).')',
+ 'nomtcheck' => true,
+ 'inv' => true
+ ),
+ array(
+ 'var' => $tabht[$key],
+ 'label' => $langs->trans('Products'),
+ ),
+ array(
+ 'var' => $tabtva[$key],
+ 'label' => $langs->trans('VAT')
+ ),
+ array(
+ 'var' => $tablocaltax1[$key],
+ 'label' => $langs->transcountry('LT1', $mysoc->country_code)
+ ),
+ array(
+ 'var' => $tablocaltax2[$key],
+ 'label' => $langs->transcountry('LT2', $mysoc->country_code)
+ )
+ );
+
+ foreach ($lines as $line)
{
- $companystatic->id=$tabcompany[$key]['id'];
- $companystatic->name=$tabcompany[$key]['name'];
- $companystatic->client=$tabcompany[$key]['client'];
- print "".$k;
- print " | ".$langs->trans("ThirdParty");
- print ' ('.$companystatic->getNomUrl(0,'customer',16).')';
- print " | ".($mt>=0?price($mt):'')." | ".($mt<0?price(-$mt):'')." | ";
- }
- print " ";
- // product
- foreach ($tabht[$key] as $k => $mt)
- {
- if ($mt)
+ foreach ($line['var'] as $k => $mt)
{
- print "";
- //print "| ".$conf->global->COMPTA_JOURNAL_SELL." | ";
- print "".$val["date"]." | ";
- print "".$invoicestatic->getNomUrl(1)." | ";
- print "".$k;
- print " | ".$langs->trans("Products")." | ".($mt<0?price(-$mt):'')." | ".($mt>=0?price($mt):'')." | ";
+ if (isset($line['nomtcheck']) || $mt)
+ {
+ print "";
+ //print "| ".$conf->global->COMPTA_JOURNAL_SELL." | ";
+ print "".$val["date"]." | ";
+ print "".$invoicestatic->getNomUrl(1)." | ";
+ print "".$k." | ".$line['label']." | ";
+
+ if (isset($line['inv']))
+ {
+ print ''.($mt>=0?price($mt):'')." | ";
+ print ''.($mt<0?price(-$mt):'')." | ";
+ }
+ else
+ {
+ print ''.($mt<0?price(-$mt):'')." | ";
+ print ''.($mt>=0?price($mt):'')." | ";
+ }
+
+ print " ";
+ }
}
}
- // vat
- foreach ($tabtva[$key] as $k => $mt)
- {
- if ($mt)
- {
- print "";
- //print "| ".$conf->global->COMPTA_JOURNAL_SELL." | ";
- print "".$val["date"]." | ";
- print "".$invoicestatic->getNomUrl(1)." | ";
- print "".$k;
- print " | ".$langs->trans("VAT")." | ".($mt<0?price(-$mt):'')." | ".($mt>=0?price($mt):'')." | ";
- }
- }
- // localtax1
- foreach ($tablocaltax1[$key] as $k => $mt)
- {
- if ($mt)
- {
- print "";
- //print "| ".$conf->global->COMPTA_JOURNAL_SELL." | ";
- print "".$val["date"]." | ";
- print "".$invoicestatic->getNomUrl(1)." | ";
- print "".$k;
- print " | ".$langs->transcountrynoentities("LT1",$mysoc->country_code)." | ".($mt<0?price(-$mt):'')." | ".($mt>=0?price($mt):'')." | ";
- }
- }
- // localtax2
- foreach ($tablocaltax2[$key] as $k => $mt)
- {
- if ($mt)
- {
- print "";
- //print "| ".$conf->global->COMPTA_JOURNAL_SELL." | ";
- print "".$val["date"]." | ";
- print "".$invoicestatic->getNomUrl(1)." | ";
- print "".$k;
- print " | ".$langs->transcountrynoentities("LT2",$mysoc->country_code)." | ".($mt<0?price(-$mt):'')." | ".($mt>=0?price($mt):'')." | ";
- }
- }
$var = !$var;
}
diff --git a/htdocs/holiday/admin/holiday.php b/htdocs/holiday/admin/holiday.php
index 583ab228c9a..6e7216332ea 100644
--- a/htdocs/holiday/admin/holiday.php
+++ b/htdocs/holiday/admin/holiday.php
@@ -278,7 +278,7 @@ $var=true;
/*$var=!$var;
print ''."\n";
-print '| '.$langs->trans('GroupToValidateCP').' | '."\n";
+print ''.$langs->trans('GroupToValidateCP').' | '."\n";
print ''.$cp->selectUserGroup('userGroup').' | '."\n";
print ' '."\n";
*/
diff --git a/htdocs/langs/es_ES/admin.lang b/htdocs/langs/es_ES/admin.lang
index c42a026c87f..ec45e7eb6a9 100644
--- a/htdocs/langs/es_ES/admin.lang
+++ b/htdocs/langs/es_ES/admin.lang
@@ -336,7 +336,7 @@ EnterRefToBuildUrl=Introduzca la referencia del objeto %s
GetSecuredUrl=Obtener la URL calculada
ButtonHideUnauthorized=Ocultar los botones de acciones no autorizadas en vez de mostrarlos atenuados
TotalNumberOfActivatedModules=Número total de módulos activados: %s
-YouMustEnableOneModule=Debe activar al menos 1 módulo.
+YouMustEnableOneModule=Debe activar al menos un módulo.
ProductVatMassChange=Modificar IVA en masa
ProductVatMassChangeDesc=Esta página le permite cambiar el tipo de IVA definido en los productos o servicios de un valor a otro. Tenga en cuenta que el cambio se lleva a cabo en masa sobre toda la base de datos.
OldVATRates=Tasa de IVA antigua
|