Refactor + es_ES translations improvement + minor stetic change
This commit is contained in:
parent
62c104e3b6
commit
651b1ae7ce
@ -107,7 +107,7 @@ print '<br>';
|
||||
$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++;
|
||||
|
||||
@ -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 '<td align="center" nowrap="nowrap">';
|
||||
if ($iserasable) print '<a href="'.$_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.'&action='.$acts[$obj->active].'">'.$actl[$obj->active].'</a>';
|
||||
if ($iserasable) print '<a href="'.$url.'action='.$acts[$obj->active].'">'.$actl[$obj->active].'</a>';
|
||||
else
|
||||
{
|
||||
if (isset($obj->type) && in_array($obj->type, array('system', 'systemauto')) && empty($obj->active)) print $langs->trans("Deprecated");
|
||||
@ -1101,11 +1109,11 @@ if ($id)
|
||||
print "</td>";
|
||||
|
||||
// Modify link
|
||||
if ($iserasable) print '<td align="center"><a href="'.$_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.'&action=edit#'.(! empty($obj->rowid)?$obj->rowid:(! empty($obj->code)?$obj->code:'')).'">'.img_edit().'</a></td>';
|
||||
if ($iserasable) print '<td align="center"><a href="'.$url.'action=edit#'.(! empty($obj->rowid)?$obj->rowid:(! empty($obj->code)?$obj->code:'')).'">'.img_edit().'</a></td>';
|
||||
else print '<td> </td>';
|
||||
|
||||
// Delete link
|
||||
if ($iserasable) print '<td align="center"><a href="'.$_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.'&action=delete">'.img_delete().'</a></td>';
|
||||
if ($iserasable) print '<td align="center"><a href="'.$url.'action=delete">'.img_delete().'</a></td>';
|
||||
else print '<td> </td>';
|
||||
|
||||
print "</tr>\n";
|
||||
@ -1153,7 +1161,7 @@ else
|
||||
|
||||
$var=!$var;
|
||||
$value=$tabname[$i];
|
||||
print '<tr '.$bc[$var].'><td width="30%">';
|
||||
print '<tr '.$bc[$var].'><td width="50%">';
|
||||
if (! empty($tabcond[$i]))
|
||||
{
|
||||
print '<a href="'.$_SERVER["PHP_SELF"].'?id='.$i.'">'.$langs->trans($tablib[$i]).'</a>';
|
||||
|
||||
@ -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")."<br>\n";
|
||||
if ($mode==='marketplace') print $langs->trans("ModulesMarketPlaceDesc")."<br>\n";
|
||||
if ($mode==='expdev') print $langs->trans("ModuleFamilyExperimental")."<br>\n";
|
||||
|
||||
if ($nbofactivatedmodules <= 1) print ' '.img_warning($langs->trans("YouMustEnableOneModule"));
|
||||
|
||||
//print '<br>'."\n";
|
||||
|
||||
|
||||
|
||||
@ -4,6 +4,7 @@
|
||||
* Copyright (C) 2011 Juanjo Menent <jmenent@2byte.es>
|
||||
* Copyright (C) 2012 Regis Houssin <regis.houssin@capnetworks.com>
|
||||
* Copyright (C) 2011-2012 Alexandre Spangaro <alexandre.spangaro@gmail.com>
|
||||
* Copyright (C) 2013 Marcos García <marcosgdf@gmail.com>
|
||||
*
|
||||
* 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 "<table class=\"noborder\" width=\"100%\">";
|
||||
print "<tr class=\"liste_titre\">";
|
||||
///print "<td>".$langs->trans("JournalNum")."</td>";
|
||||
@ -177,96 +177,71 @@ print "<td>".$langs->trans("Type")."</td><td align='right'>".$langs->trans("Debi
|
||||
print "</tr>\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 "<tr ".$bc[$var]." >";
|
||||
//print "<td>".$conf->global->COMPTA_JOURNAL_BUY."</td>";
|
||||
print "<td>".$val["date"]."</td>";
|
||||
print "<td>".$invoicestatic->getNomUrl(1)."</td>";
|
||||
print "<td>".$k."</td><td>".$langs->trans("Products")."</td>";
|
||||
print '<td align="right">'.($mt>=0?price($mt):'')."</td>";
|
||||
print '<td align="right">'.($mt<0?price(-$mt):'')."</td>";
|
||||
print "</tr>";
|
||||
if (isset($line['nomtcheck']) || $mt)
|
||||
{
|
||||
print "<tr ".$bc[$var]." >";
|
||||
//print "<td>".$conf->global->COMPTA_JOURNAL_BUY."</td>";
|
||||
print "<td>".$val["date"]."</td>";
|
||||
print "<td>".$invoicestatic->getNomUrl(1)."</td>";
|
||||
print "<td>".$k."</td><td>".$line['label']."</td>";
|
||||
|
||||
if (isset($line['inv']))
|
||||
{
|
||||
print '<td align="right">'.($mt<0?price(-$mt):'')."</td>";
|
||||
print '<td align="right">'.($mt>=0?price($mt):'')."</td>";
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<td align="right">'.($mt>=0?price($mt):'')."</td>";
|
||||
print '<td align="right">'.($mt<0?price(-$mt):'')."</td>";
|
||||
}
|
||||
|
||||
print "</tr>";
|
||||
}
|
||||
}
|
||||
}
|
||||
// vat
|
||||
foreach ($tabtva[$key] as $k => $mt)
|
||||
{
|
||||
if ($mt)
|
||||
{
|
||||
print "<tr ".$bc[$var]." >";
|
||||
//print "<td>".$conf->global->COMPTA_JOURNAL_BUY."</td>";
|
||||
print "<td>".$val["date"]."</td>";
|
||||
print "<td>".$invoicestatic->getNomUrl(1)."</td>";
|
||||
print "<td>".$k."</td><td>".$langs->trans("VAT")."</td>";
|
||||
print '<td align="right">'.($mt>=0?price($mt):'')."</td>";
|
||||
print '<td align="right">'.($mt<0?price(-$mt):'')."</td>";
|
||||
print "</tr>";
|
||||
}
|
||||
}
|
||||
// localtax1
|
||||
foreach ($tablocaltax1[$key] as $k => $mt)
|
||||
{
|
||||
if ($mt)
|
||||
{
|
||||
print "<tr ".$bc[$var].">";
|
||||
//print "<td>".$conf->global->COMPTA_JOURNAL_BUY."</td>";
|
||||
print "<td>".$val["date"]."</td>";
|
||||
print "<td>".$invoicestatic->getNomUrl(1)."</td>";
|
||||
print "<td>".$k."</td><td>".$langs->transcountrynoentities("LT1",$mysoc->country_code)."</td>";
|
||||
print "<td align='right'>".($mt>=0?price($mt):'')."</td>";
|
||||
print "<td align='right'>".($mt<0?price(-$mt):'')."</td>";
|
||||
print "</tr>";
|
||||
}
|
||||
}
|
||||
// localtax2
|
||||
foreach ($tablocaltax2[$key] as $k => $mt)
|
||||
{
|
||||
if ($mt)
|
||||
{
|
||||
print "<tr ".$bc[$var].">";
|
||||
//print "<td>".$conf->global->COMPTA_JOURNAL_BUY."</td>";
|
||||
print "<td>".$val["date"]."</td>";
|
||||
print "<td>".$invoicestatic->getNomUrl(1)."</td>";
|
||||
print "<td>".$k."</td><td>".$langs->transcountrynoentities("LT2",$mysoc->country_code)."</td>";
|
||||
print "<td align='right'>".($mt>=0?price($mt):'')."</td>";
|
||||
print "<td align='right'>".($mt<0?price(-$mt):'')."</td>";
|
||||
print "</tr>";
|
||||
}
|
||||
}
|
||||
print "<tr ".$bc[$var].">";
|
||||
// third party
|
||||
//print "<td>".$conf->global->COMPTA_JOURNAL_BUY."</td>";
|
||||
print "<td>".$val["date"]."</td>";
|
||||
print "<td>".$invoicestatic->getNomUrl(1)."</td>";
|
||||
|
||||
foreach ($tabttc[$key] as $k => $mt)
|
||||
{
|
||||
$companystatic->id=$tabcompany[$key]['id'];
|
||||
$companystatic->name=$tabcompany[$key]['name'];
|
||||
|
||||
print "<td>".$k;
|
||||
print "</td><td>".$langs->trans("ThirdParty");
|
||||
print ' ('.$companystatic->getNomUrl(0,'supplier',16).')';
|
||||
print "</td>";
|
||||
print '<td align="right">'.($mt<0?price(-$mt):'')."</td>";
|
||||
print '<td align="right">'.($mt>=0?price($mt):'')."</td>";
|
||||
}
|
||||
print "</tr>";
|
||||
|
||||
$var = !$var;
|
||||
}
|
||||
|
||||
@ -178,17 +178,15 @@ else {
|
||||
*/
|
||||
|
||||
|
||||
$i = 0;
|
||||
print "<table class=\"noborder\" width=\"100%\">";
|
||||
print "<tr class=\"liste_titre\">";
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
//print "<td>".$langs->trans("JournalNum")."</td>";
|
||||
print "<td>".$langs->trans("Date")."</td><td>".$langs->trans("Piece").' ('.$langs->trans("InvoiceRef").")</td>";
|
||||
print "<td>".$langs->trans("Account")."</td>";
|
||||
print "<td>".$langs->trans("Type")."</td><td align='right'>".$langs->trans("Debit")."</td><td align='right'>".$langs->trans("Credit")."</td>";
|
||||
print '<td>'.$langs->trans('Date').'</td><td>'.$langs->trans('Piece').' ('.$langs->trans('InvoiceRef').')</td>';
|
||||
print '<td>'.$langs->trans('Account').'</td>';
|
||||
print '<td>'.$langs->trans('Type').'</td><td align="right">'.$langs->trans('Debit').'</td><td align="right">'.$langs->trans('Credit').'</td>';
|
||||
print "</tr>\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 "<tr ".$bc[$var].">";
|
||||
// third party
|
||||
//print "<td>".$conf->global->COMPTA_JOURNAL_SELL."</td>";
|
||||
print "<td>".$val["date"]."</td>";
|
||||
print "<td>".$invoicestatic->getNomUrl(1)."</td>";
|
||||
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 "<td>".$k;
|
||||
print "</td><td>".$langs->trans("ThirdParty");
|
||||
print ' ('.$companystatic->getNomUrl(0,'customer',16).')';
|
||||
print "</td><td align='right'>".($mt>=0?price($mt):'')."</td><td align='right'>".($mt<0?price(-$mt):'')."</td>";
|
||||
}
|
||||
print "</tr>";
|
||||
// product
|
||||
foreach ($tabht[$key] as $k => $mt)
|
||||
{
|
||||
if ($mt)
|
||||
foreach ($line['var'] as $k => $mt)
|
||||
{
|
||||
print "<tr ".$bc[$var].">";
|
||||
//print "<td>".$conf->global->COMPTA_JOURNAL_SELL."</td>";
|
||||
print "<td>".$val["date"]."</td>";
|
||||
print "<td>".$invoicestatic->getNomUrl(1)."</td>";
|
||||
print "<td>".$k;
|
||||
print "</td><td>".$langs->trans("Products")."</td><td align='right'>".($mt<0?price(-$mt):'')."</td><td align='right'>".($mt>=0?price($mt):'')."</td></tr>";
|
||||
if (isset($line['nomtcheck']) || $mt)
|
||||
{
|
||||
print "<tr ".$bc[$var]." >";
|
||||
//print "<td>".$conf->global->COMPTA_JOURNAL_SELL."</td>";
|
||||
print "<td>".$val["date"]."</td>";
|
||||
print "<td>".$invoicestatic->getNomUrl(1)."</td>";
|
||||
print "<td>".$k."</td><td>".$line['label']."</td>";
|
||||
|
||||
if (isset($line['inv']))
|
||||
{
|
||||
print '<td align="right">'.($mt>=0?price($mt):'')."</td>";
|
||||
print '<td align="right">'.($mt<0?price(-$mt):'')."</td>";
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<td align="right">'.($mt<0?price(-$mt):'')."</td>";
|
||||
print '<td align="right">'.($mt>=0?price($mt):'')."</td>";
|
||||
}
|
||||
|
||||
print "</tr>";
|
||||
}
|
||||
}
|
||||
}
|
||||
// vat
|
||||
foreach ($tabtva[$key] as $k => $mt)
|
||||
{
|
||||
if ($mt)
|
||||
{
|
||||
print "<tr ".$bc[$var].">";
|
||||
//print "<td>".$conf->global->COMPTA_JOURNAL_SELL."</td>";
|
||||
print "<td>".$val["date"]."</td>";
|
||||
print "<td>".$invoicestatic->getNomUrl(1)."</td>";
|
||||
print "<td>".$k;
|
||||
print "</td><td>".$langs->trans("VAT")."</td><td align='right'>".($mt<0?price(-$mt):'')."</td><td align='right'>".($mt>=0?price($mt):'')."</td></tr>";
|
||||
}
|
||||
}
|
||||
// localtax1
|
||||
foreach ($tablocaltax1[$key] as $k => $mt)
|
||||
{
|
||||
if ($mt)
|
||||
{
|
||||
print "<tr ".$bc[$var].">";
|
||||
//print "<td>".$conf->global->COMPTA_JOURNAL_SELL."</td>";
|
||||
print "<td>".$val["date"]."</td>";
|
||||
print "<td>".$invoicestatic->getNomUrl(1)."</td>";
|
||||
print "<td>".$k;
|
||||
print "</td><td>".$langs->transcountrynoentities("LT1",$mysoc->country_code)."</td><td align='right'>".($mt<0?price(-$mt):'')."</td><td align='right'>".($mt>=0?price($mt):'')."</td></tr>";
|
||||
}
|
||||
}
|
||||
// localtax2
|
||||
foreach ($tablocaltax2[$key] as $k => $mt)
|
||||
{
|
||||
if ($mt)
|
||||
{
|
||||
print "<tr ".$bc[$var].">";
|
||||
//print "<td>".$conf->global->COMPTA_JOURNAL_SELL."</td>";
|
||||
print "<td>".$val["date"]."</td>";
|
||||
print "<td>".$invoicestatic->getNomUrl(1)."</td>";
|
||||
print "<td>".$k;
|
||||
print "</td><td>".$langs->transcountrynoentities("LT2",$mysoc->country_code)."</td><td align='right'>".($mt<0?price(-$mt):'')."</td><td align='right'>".($mt>=0?price($mt):'')."</td></tr>";
|
||||
}
|
||||
}
|
||||
|
||||
$var = !$var;
|
||||
}
|
||||
|
||||
@ -278,7 +278,7 @@ $var=true;
|
||||
|
||||
/*$var=!$var;
|
||||
print '<tr '.$bc[$var].'>'."\n";
|
||||
print '<td style="padding:5px; width: 40%;">'.$langs->trans('GroupToValidateCP').'</td>'."\n";
|
||||
print '<td style="padding:5px;">'.$langs->trans('GroupToValidateCP').'</td>'."\n";
|
||||
print '<td style="padding:5px;">'.$cp->selectUserGroup('userGroup').'</td>'."\n";
|
||||
print '</tr>'."\n";
|
||||
*/
|
||||
|
||||
@ -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: <b>%s</b>
|
||||
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
|
||||
|
||||
Loading…
Reference in New Issue
Block a user