Trad: Text easier to understand

This commit is contained in:
Laurent Destailleur 2009-04-09 20:22:51 +00:00
parent 02d4fb1e6d
commit 6b155c359a
10 changed files with 129 additions and 106 deletions

View File

@ -1,7 +1,7 @@
<?php
/* Copyright (C) 2002-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
* Copyright (C) 2004-2008 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004-2009 Laurent Destailleur <eldy@users.sourceforge.net>
*
* 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
@ -112,7 +112,7 @@ if ($_POST["action"] == "builddoc" && $user->rights->facture->lire)
}
else
{
$mesg='<div class="error">'.$langs->trans('UnpayedNotChecked').'</div>' ;
$mesg='<div class="error">'.$langs->trans('InvoiceNotChecked').'</div>' ;
}
}
@ -264,7 +264,6 @@ if ($result)
print '<tr class="liste_titre">';
print_liste_field_titre($langs->trans("Ref"),$_SERVER["PHP_SELF"],"f.facnumber","",$param,"",$sortfield,$sortorder);
print_liste_field_titre($langs->trans("Generate"),$_SERVER["PHP_SELF"],"","",$param,'align="center"',$sortfield,$sortorder);
print_liste_field_titre($langs->trans("Date"),$_SERVER["PHP_SELF"],"f.datef","",$param,'align="center"',$sortfield,$sortorder);
print_liste_field_titre($langs->trans("DateDue"),$_SERVER["PHP_SELF"],"f.date_lim_reglement","",$param,'align="center"',$sortfield,$sortorder);
print_liste_field_titre($langs->trans("Company"),$_SERVER["PHP_SELF"],"s.nom","",$param,"",$sortfield,$sortorder);
@ -272,18 +271,19 @@ if ($result)
print_liste_field_titre($langs->trans("AmountTTC"),$_SERVER["PHP_SELF"],"f.total_ttc","",$param,'align="right"',$sortfield,$sortorder);
print_liste_field_titre($langs->trans("Received"),$_SERVER["PHP_SELF"],"am","",$param,'align="right"',$sortfield,$sortorder);
print_liste_field_titre($langs->trans("Status"),$_SERVER["PHP_SELF"],"fk_statut,paye,am","",$param,'align="right"',$sortfield,$sortorder);
print_liste_field_titre($langs->trans("Merge"),$_SERVER["PHP_SELF"],"","",$param,'align="center"',$sortfield,$sortorder);
print "</tr>\n";
// Lignes des champs de filtre
print '<form method="get" action="'.$_SERVER["PHP_SELF"].'">';
print '<tr class="liste_titre">';
// Ref
print '<td class="liste_titre">';
print '<input class="flat" size="10" type="text" name="search_ref" value="'.$_REQUEST["search_ref"].'"></td>';
print '<td class="liste_titre" align="center"><input type="checkbox" onclick="checkall(this.checked);"></td>';
print '<td class="liste_titre">&nbsp;</td>';
print '<td class="liste_titre">&nbsp;</td>';
print '<td class="liste_titre" align="left">';
print '<input class="flat" type="text" name="search_societe" value="'.$_REQUEST["search_societe"].'">';
print '<input class="flat" type="text" size="12" name="search_societe" value="'.$_REQUEST["search_societe"].'">';
print '</td><td class="liste_titre" align="right">';
print '<input class="flat" type="text" size="10" name="search_montant_ht" value="'.$_REQUEST["search_montant_ht"].'">';
print '</td><td class="liste_titre" align="right">';
@ -291,6 +291,7 @@ if ($result)
print '</td><td class="liste_titre" colspan="2" align="right">';
print '<input type="image" class="liste_titre" name="button_search" src="'.DOL_URL_ROOT.'/theme/'.$conf->theme.'/img/search.png" alt="'.$langs->trans("Search").'">';
print '</td>';
print '<td class="liste_titre" align="center"><input type="checkbox" onclick="checkall(this.checked);"></td>';
print "</tr>\n";
print '</form>';
@ -323,33 +324,32 @@ if ($result)
$facturestatic->type=$objp->type;
print '<table class="nobordernopadding"><tr class="nocellnopadd">';
// Ref
print '<td width="90" class="nobordernopadding" nowrap="nowrap">';
print $facturestatic->getNomUrl(1);
print '</td>';
// Warning picto
print '<td width="20" class="nobordernopadding" nowrap="nowrap">';
if ($objp->datelimite < ($now - $conf->facture->client->warning_delay) && ! $objp->paye && $objp->fk_statut == 1) print img_warning($langs->trans("Late"));
print '</td>';
// PDF Picto
print '<td width="16" align="right" class="nobordernopadding">';
$filename=sanitizeFileName($objp->facnumber);
$filedir=$conf->facture->dir_output . '/' . sanitizeFileName($objp->facnumber);
$foundpdf=$formfile->show_documents('facture',$filename,$filedir,$urlsource,'','','','','',1,$param);
print '</td></tr></table>';
print '</td>';
// Checkbox
print '<td align="center">';
if ($foundpdf) print '<input id="cb'.$objp->facid.'" type="checkbox" name="toGenerate[]" value="'.$objp->facnumber.'">';
else print '&nbsp;';
print '</td>' ;
print '</tr></table>';
print "</td>\n";
print "<td nowrap align=\"center\">".dol_print_date($objp->df)."</td>\n";
print "<td nowrap align=\"center\">".dol_print_date($objp->datelimite)."</td>\n";
print "<td nowrap align=\"center\">".dol_print_date($objp->df,'day')."</td>\n";
print "<td nowrap align=\"center\">".dol_print_date($objp->datelimite,'day')."</td>\n";
print '<td><a href="'.DOL_URL_ROOT.'/compta/fiche.php?socid='.$objp->socid.'">'.img_object($langs->trans("ShowCompany"),"company").' '.dol_trunc($objp->nom,32).'</a></td>';
print '<td><a href="'.DOL_URL_ROOT.'/compta/fiche.php?socid='.$objp->socid.'">'.img_object($langs->trans("ShowCompany"),"company").' '.dol_trunc($objp->nom,28).'</a></td>';
print "<td align=\"right\">".price($objp->total_ht)."</td>";
print "<td align=\"right\">".price($objp->total_ttc)."</td>";
@ -360,6 +360,12 @@ if ($result)
print $facturestatic->LibStatut($objp->paye,$objp->fk_statut,5,$objp->am);
print '</td>';
// Checkbox
print '<td align="center">';
if ($foundpdf) print '<input id="cb'.$objp->facid.'" type="checkbox" name="toGenerate[]" value="'.$objp->facnumber.'">';
else print '&nbsp;';
print '</td>' ;
print "</tr>\n";
$total_ht+=$objp->total_ht;
$total_ttc+=$objp->total_ttc;
@ -394,7 +400,7 @@ if ($result)
print '<br>';
print '<input type="hidden" name="option" value="'.$option.'">';
$formfile->show_documents('unpayed','',$filedir,$urlsource,$genallowed,$delallowed,'','',0,0,48,1,$param);
$formfile->show_documents('unpayed','',$filedir,$urlsource,$genallowed,$delallowed,'','',0,0,48,1,$param,'',$langs->trans("PDFMerge"));
print '</form>';
$db->free();

View File

@ -1,6 +1,6 @@
<?php
/* Copyright (C) 2001-2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2008 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004-2009 Laurent Destailleur <eldy@users.sourceforge.net>
*
* 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
@ -16,7 +16,7 @@
* along with this program; if not, write to the Free Software
* Foundation, Inc., 59 Temple Place - Suite 330, Boston, MA 02111-1307, USA.
*/
/**
* \file htdocs/compta/paiement/liste.php
* \ingroup compta
@ -50,16 +50,16 @@ llxHeader('',$langs->trans("ListPayment"));
$page=$_GET["page"];
$sortorder=$_GET["sortorder"];
$sortfield=$_GET["sortfield"];
$limit = $conf->liste_limit;
$offset = $limit * $page ;
if (! $sortorder) $sortorder="DESC";
if (! $sortfield) $sortfield="p.rowid";
$sql = "SELECT DISTINCT p.rowid,".$db->pdate("p.datep")." as dp, p.amount,";
$sql.= " p.statut, p.num_paiement,";
//$sql.= " c.libelle as paiement_type,";
$sql.= " c.code as paiement_code,";
$sql.= " c.code as paiement_code,";
$sql.= " ba.rowid as bid, ba.label,";
$sql.= " s.rowid as socid, s.nom";
//$sql.= " f.facnumber";
@ -119,12 +119,12 @@ if ($resql)
print '<form method="get" action="liste.php">';
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print_liste_field_titre($langs->trans("Ref"),"liste.php","p.rowid","",$paramlist,"",$sortfield,$sortorder);
print_liste_field_titre($langs->trans("RefPayment"),"liste.php","p.rowid","",$paramlist,"",$sortfield,$sortorder);
print_liste_field_titre($langs->trans("Date"),"liste.php","dp","",$paramlist,'align="center"',$sortfield,$sortorder);
print_liste_field_titre($langs->trans("ThirdParty"),"liste.php","c.nom","",$paramlist,"",$sortfield,$sortorder);
print_liste_field_titre($langs->trans("Type"),"liste.php","c.libelle","",$paramlist,"",$sortfield,$sortorder);
print_liste_field_titre($langs->trans("Account"),"liste.php","ba.label","",$paramlist,"",$sortfield,$sortorder);
print_liste_field_titre($langs->trans("AmountTTC"),"liste.php","p.amount","",$paramlist,'align="right"',$sortfield,$sortorder);
print_liste_field_titre($langs->trans("Amount"),"liste.php","p.amount","",$paramlist,'align="right"',$sortfield,$sortorder);
//print_liste_field_titre($langs->trans("Invoices"),"","","",$paramlist,'align="left"',$sortfield,$sortorder);
if ($conf->global->BILL_ADD_PAYMENT_VALIDATION)
{
@ -192,9 +192,9 @@ if ($resql)
if ($objp->statut == 0) print '</a>';
print '</td>';
}
print '</tr>';
$i++;
}
print "</table>\n";

View File

@ -1,7 +1,7 @@
<?php
/* Copyright (C) 2003-2005 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004 Eric Seigne <eric.seigne@ryxeo.com>
* Copyright (C) 2004-2008 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004-2009 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2004 Christophe Combelles <ccomb@free.fr>
* Copyright (C) 2005 Marc Barilley / Ocebo <marc@ocebo.com>
*
@ -117,66 +117,66 @@ if ($action == 'add_paiement')
$paiement_id = $paiement->create($user);
if ($paiement_id > 0)
{
if ($conf->banque->enabled)
{
// Insertion dans llx_bank
$label = "(SupplierInvoicePayment)";
$acc = new Account($db, $_POST['accountid']);
//paiementid contient "CHQ ou VIR par exemple"
$bank_line_id = $acc->addline($paiement->datepaye,
$paiement->paiementid,
$label,
0.0 - $paiement->total,
$paiement->num_paiement,
'',
$user);
if ($conf->banque->enabled)
{
// Insertion dans llx_bank
$label = "(SupplierInvoicePayment)";
$acc = new Account($db, $_POST['accountid']);
//paiementid contient "CHQ ou VIR par exemple"
$bank_line_id = $acc->addline($paiement->datepaye,
$paiement->paiementid,
$label,
0.0 - $paiement->total,
$paiement->num_paiement,
'',
$user);
// Mise a jour fk_bank dans llx_paiement.
// On connait ainsi le paiement qui a genere l'ecriture bancaire
if ($bank_line_id > 0)
{
$paiement->update_fk_bank($bank_line_id);
// Mise a jour liens (pour chaque facture concernees par le paiement)
foreach ($paiement->amounts as $key => $value)
{
$facid = $key;
$fac = new FactureFournisseur($db);
$fac->fetch($facid);
$fac->fetch_fournisseur();
$acc->add_url_line($bank_line_id,
$paiement_id,
DOL_URL_ROOT.'/fourn/paiement/fiche.php?id=',
'(paiement)',
'payment_supplier');
$acc->add_url_line($bank_line_id,
$fac->fournisseur->id,
DOL_URL_ROOT.'/fourn/fiche.php?socid=',
$fac->fournisseur->nom,
'company');
}
}
else
{
$error++;
}
}
// Mise a jour fk_bank dans llx_paiement.
// On connait ainsi le paiement qui a genere l'ecriture bancaire
if ($bank_line_id > 0)
{
$paiement->update_fk_bank($bank_line_id);
// Mise a jour liens (pour chaque facture concernees par le paiement)
foreach ($paiement->amounts as $key => $value)
{
$facid = $key;
$fac = new FactureFournisseur($db);
$fac->fetch($facid);
$fac->fetch_fournisseur();
$acc->add_url_line($bank_line_id,
$paiement_id,
DOL_URL_ROOT.'/fourn/paiement/fiche.php?id=',
'(paiement)',
'payment_supplier');
$acc->add_url_line($bank_line_id,
$fac->fournisseur->id,
DOL_URL_ROOT.'/fourn/fiche.php?socid=',
$fac->fournisseur->nom,
'company');
}
}
else
{
$error++;
}
}
}
else
{
$mesg = '<div class="error">'.$langs->trans($paiement->error).'</div>';
$error++;
$mesg = '<div class="error">'.$langs->trans($paiement->error).'</div>';
$error++;
}
if ($error == 0)
{
$loc = DOL_URL_ROOT.'/fourn/paiement/fiche.php?id='.$paiement_id;
$db->commit();
Header('Location: '.$loc);
exit;
$loc = DOL_URL_ROOT.'/fourn/paiement/fiche.php?id='.$paiement_id;
$db->commit();
Header('Location: '.$loc);
exit;
}
else
{
$db->rollback();
$db->rollback();
}
}
}
@ -185,6 +185,8 @@ if ($action == 'add_paiement')
* View
*/
$invoicesupplierstatic = new FactureFournisseur($db);
llxHeader();
$html=new Form($db);
@ -389,42 +391,49 @@ if (! $_GET['action'] && ! $_POST['action'])
print '<table class="noborder" width="100%">';
print '<tr class="liste_titre">';
print_liste_field_titre($langs->trans('RefPayment'),'paiement.php','rowid','','','',$sortfield,$sortorder);
print_liste_field_titre($langs->trans('Invoice'),'paiement.php','facnumber','','','',$sortfield,$sortorder);
print_liste_field_titre($langs->trans('Date'),'paiement.php','dp','','','',$sortfield,$sortorder);
print_liste_field_titre($langs->trans('Date'),'paiement.php','dp','','','align="center"',$sortfield,$sortorder);
print_liste_field_titre($langs->trans('ThirdParty'),'paiement.php','s.nom','','','',$sortfield,$sortorder);
print_liste_field_titre($langs->trans('Type'),'paiement.php','c.libelle','','','',$sortfield,$sortorder);
print_liste_field_titre($langs->trans('Account'),'paiement.php','ba.label','','','',$sortfield,$sortorder);
print_liste_field_titre($langs->trans('AmountTTC'),'paiement.php','f.amount','','','align="right"',$sortfield,$sortorder);
print '<td>&nbsp;</td>';
print_liste_field_titre($langs->trans('Amount'),'paiement.php','f.amount','','','align="right"',$sortfield,$sortorder);
//print_liste_field_titre($langs->trans('Invoice'),'paiement.php','facnumber','','','',$sortfield,$sortorder);
print "</tr>\n";
while ($i < min($num,$limit))
{
$objp = $db->fetch_object($resql);
$var=!$var;
print '<tr '.$bc[$var].'>';
$objp = $db->fetch_object($resql);
$var=!$var;
print '<tr '.$bc[$var].'>';
// Ref payment
print '<td nowrap="nowrap"><a href="'.DOL_URL_ROOT.'/fourn/paiement/fiche.php?id='.$objp->pid.'">'.img_object($langs->trans('ShowPayment'),'payment').' '.$objp->pid.'</a></td>';
// Ref payment
print '<td nowrap="nowrap"><a href="'.DOL_URL_ROOT.'/fourn/paiement/fiche.php?id='.$objp->pid.'">'.img_object($langs->trans('ShowPayment'),'payment').' '.$objp->pid.'</a></td>';
// Ref invoice
print '<td nowrap="nowrap">'.dol_trunc($objp->facnumber,12).'</td>';
// Date
print '<td nowrap="nowrap" align="center">'.dol_print_date($objp->dp,'day')."</td>\n";
// Date
print '<td nowrap="nowrap" align="center">'.dol_print_date($objp->dp,'day')."</td>\n";
print '<td>';
if ($objp->socid) print '<a href="'.DOL_URL_ROOT.'/soc.php?socid='.$objp->socid.'">'.img_object($langs->trans('ShowCompany'),'company').' '.dol_trunc($objp->nom,32).'</a>';
else print '&nbsp;';
print '</td>';
print '<td>';
if ($objp->socid) print '<a href="'.DOL_URL_ROOT.'/soc.php?socid='.$objp->socid.'">'.img_object($langs->trans('ShowCompany'),'company').' '.dol_trunc($objp->nom,32).'</a>';
else print '&nbsp;';
print '</td>';
print '<td>'.dol_trunc($objp->paiement_type.' '.$objp->num_paiement,32)."</td>\n";
print '<td>';
if ($objp->bid) print '<a href="'.DOL_URL_ROOT.'/compta/bank/account.php?account='.$objp->bid.'">'.img_object($langs->trans("ShowAccount"),'account').' '.dol_trunc($objp->label,24).'</a>';
else print '&nbsp;';
print '</td>';
print '<td align="right">'.price($objp->pamount).'</td><td>&nbsp;</td>';
print '</tr>';
$i++;
print '<td>'.dol_trunc($objp->paiement_type.' '.$objp->num_paiement,32)."</td>\n";
print '<td>';
if ($objp->bid) print '<a href="'.DOL_URL_ROOT.'/compta/bank/account.php?account='.$objp->bid.'">'.img_object($langs->trans("ShowAccount"),'account').' '.dol_trunc($objp->label,24).'</a>';
else print '&nbsp;';
print '</td>';
print '<td align="right">'.price($objp->pamount).'</td>';
// Ref invoice
/*$invoicesupplierstatic->ref=$objp->facnumber;
$invoicesupplierstatic->id=$objp->facid;
print '<td nowrap="nowrap">';
print $invoicesupplierstatic->getNomUrl(1);
print '</td>';*/
print '</tr>';
$i++;
}
print "</table>";
}

View File

@ -134,11 +134,13 @@ class FormFile
* \param maxfilenamelength Max length for filename shown
* \param noform Do not output html form start and end
* \param param More param on http links
* \param title Title to show on top of form
* \param buttonlabel Label on submit button
* \remarks Le fichier de facture detaillee est de la forme
* REFFACTURE-XXXXXX-detail.pdf ou XXXXX est une forme diverse
* \return int <0 si ko, nbre de fichiers affiches si ok
*/
function show_documents($modulepart,$filename,$filedir,$urlsource,$genallowed,$delallowed=0,$modelselected='',$modelliste=array(),$forcenomultilang=0,$iconPDF=0,$maxfilenamelength=28,$noform=0,$param='',$title='')
function show_documents($modulepart,$filename,$filedir,$urlsource,$genallowed,$delallowed=0,$modelselected='',$modelliste=array(),$forcenomultilang=0,$iconPDF=0,$maxfilenamelength=28,$noform=0,$param='',$title='',$buttonlabel='')
{
// filedir = conf->...dir_ouput."/".get_exdir(id)
include_once(DOL_DOCUMENT_ROOT.'/lib/files.lib.php');
@ -287,7 +289,8 @@ class FormFile
$headershown=1;
$html = new Form($db);
$texte=$langs->trans('Generate');
$buttonlabeltoshow=$buttonlabel;
if (empty($buttonlabel)) $buttonlabel=$langs->trans('Generate');
if (empty($noform)) print '<form action="'.$urlsource.'#builddoc" method="post">';
print '<input type="hidden" name="action" value="builddoc">';
@ -321,7 +324,7 @@ class FormFile
}
print '</td>';
print '<td align="center" colspan="'.($delallowed?'2':'1').'">';
print '<input class="button" type="submit" value="'.$texte.'">';
print '<input class="button" type="submit" value="'.$buttonlabel.'">';
print '</td></tr>';
}

View File

@ -258,7 +258,7 @@ InvoicePayed = Factura pagada
PaymentNumber = Número de pagament
RemoveDiscount = Eliminar descompte
WatermarkOnDraftBill = Marca d'aigua en factures esborrany (res si està buida)
UnpayedNotChecked = Cap factura pendent està seleccionada
InvoiceNotChecked = Cap factura pendent està seleccionada
CloneInvoice = Clonar factura
ConfirmCloneInvoice = Esteu segur de voler clonar aquesta factura?
DisabledBecauseReplacedInvoice = Acció desactivada perquè és una factura reemplaçada

View File

@ -337,6 +337,7 @@ ChequeDeposits=Cheques deposits
Cheques=Cheques
CreditNoteConvertedIntoDiscount=This credit note or deposit invoice has been converted into %s
UsBillingContactAsIncoiveRecipientIfExist=Use customer billing contact address instead of third party address as recipient for invoices
ShowUnpayedLateOnly=Show late unpayed invoice only
PaymentInvoiceRef=Payment invoice %s
# oursin PDF model
Of=du

View File

@ -503,6 +503,8 @@ Notes=Notes
AddNewLine=Add new line
FreeZone=Free text
CloneMainAttributes=Clone object with its main attributes
PDFMerge=PDF Merge
Merge=Merge
# Week day
Day1=Monday
Day2=Tuesday

View File

@ -258,7 +258,7 @@ InvoicePayed = Factura pagada
PaymentNumber = Número de pago
RemoveDiscount = Eliminar descuento
WatermarkOnDraftBill = Marca de agua en facturas borrador (nada si está vacía)
UnpayedNotChecked = Ninguna factura pendiente está seleccionada
InvoiceNotChecked = Ninguna factura está seleccionada
CloneInvoice = Clonar factura
ConfirmCloneInvoice = ¿Está seguro de querer clonar esta factura?
DisabledBecauseReplacedInvoice = Acción desactivada porque es una factura reemplazada

View File

@ -259,7 +259,7 @@ InvoicePayed=Facture payée
PaymentNumber=Numéro paiement
RemoveDiscount=Supprimer remise
WatermarkOnDraftBill=Filigrane sur les brouillons de factures (aucun si vide)
UnpayedNotChecked=Aucune facture impayées n'a été sélectionnée
InvoiceNotChecked=Aucune facture n'a été sélectionnée
CloneInvoice=Cloner facture
ConfirmCloneInvoice=Etes-vous sur de vouloir cloner cette facture <b>%s</b> ?
DisabledBecauseReplacedInvoice=Action désactivée car facture remplacée

View File

@ -503,6 +503,8 @@ Notes=Notes
AddNewLine=Ajout nouvelle ligne
FreeZone=Zone libre
CloneMainAttributes=Cloner l'objet avec ces attributs principaux
PDFMerge=Fusion PDF
Merge=Fusion
# Week day
Day1=Lundi
Day2=Mardi