Qual: Uniformisation du code. Ajout des methodes getNomUrl et GetLibStatut sur entits paiement et remisecheque
This commit is contained in:
parent
6e6434ea8f
commit
d5f06aa448
@ -28,6 +28,8 @@
|
||||
|
||||
require('./pre.inc.php');
|
||||
require_once(DOL_DOCUMENT_ROOT.'/paiement.class.php');
|
||||
require_once(DOL_DOCUMENT_ROOT.'/compta/paiement/cheque/remisecheque.class.php');
|
||||
require_once(DOL_DOCUMENT_ROOT.'/compta/bank/account.class.php');
|
||||
|
||||
$user->getrights('banque');
|
||||
|
||||
@ -131,7 +133,7 @@ if ($_GET['action'] == 'new')
|
||||
{
|
||||
$h=0;
|
||||
$head[$h][0] = DOL_URL_ROOT.'/compta/paiement/cheque/fiche.php?action=new';
|
||||
$head[$h][1] = $langs->trans("NewCheckReceipt");
|
||||
$head[$h][1] = $langs->trans("NewCheckDeposit");
|
||||
$hselected = $h;
|
||||
$h++;
|
||||
|
||||
@ -182,147 +184,165 @@ if ($mesg) print $mesg.'<br>';
|
||||
*/
|
||||
if ($_GET['action'] == 'new')
|
||||
{
|
||||
$accounts = array();
|
||||
$lines = array();
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
print '<tr><td width="30%">'.$langs->trans('Date').'</td><td width="70%">'.dolibarr_print_date(time()).'</td></tr>';
|
||||
print '</table><br />';
|
||||
|
||||
$sql = "SELECT ba.rowid as bid, ".$db->pdate("b.dateo")." as date,";
|
||||
$sql.= " b.amount, ba.label, b.emetteur, b.banque";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."bank as b ";
|
||||
$sql.= ",".MAIN_DB_PREFIX."bank_account as ba ";
|
||||
$sql.= " WHERE b.fk_type = 'CHQ' AND b.fk_account = ba.rowid";
|
||||
$sql.= " AND b.fk_bordereau = 0 AND b.amount > 0";
|
||||
$sql.= " ORDER BY b.emetteur ASC, b.rowid ASC;";
|
||||
|
||||
$resql = $db->query($sql);
|
||||
|
||||
if ($resql)
|
||||
{
|
||||
$i = 0;
|
||||
while ( $obj = $db->fetch_object($resql) )
|
||||
$accounts = array();
|
||||
$lines = array();
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
print '<tr><td width="30%">'.$langs->trans('Date').'</td><td width="70%">'.dolibarr_print_date(time()).'</td></tr>';
|
||||
print '</table><br />';
|
||||
|
||||
$sql = "SELECT ba.rowid as bid, ".$db->pdate("b.dateo")." as date,";
|
||||
$sql.= " b.amount, ba.label, b.emetteur, b.banque";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."bank as b ";
|
||||
$sql.= ",".MAIN_DB_PREFIX."bank_account as ba ";
|
||||
$sql.= " WHERE b.fk_type = 'CHQ' AND b.fk_account = ba.rowid";
|
||||
$sql.= " AND b.fk_bordereau = 0 AND b.amount > 0";
|
||||
$sql.= " ORDER BY b.emetteur ASC, b.rowid ASC;";
|
||||
|
||||
$resql = $db->query($sql);
|
||||
|
||||
if ($resql)
|
||||
{
|
||||
$accounts[$obj->bid] = $obj->label;
|
||||
$lines[$obj->bid][$i]["date"] = $obj->date;
|
||||
$lines[$obj->bid][$i]["amount"] = $obj->amount;
|
||||
$lines[$obj->bid][$i]["emetteur"] = $obj->emetteur;
|
||||
$lines[$obj->bid][$i]["banque"] = $obj->banque;
|
||||
$i++;
|
||||
$i = 0;
|
||||
while ( $obj = $db->fetch_object($resql) )
|
||||
{
|
||||
$accounts[$obj->bid] = $obj->label;
|
||||
$lines[$obj->bid][$i]["date"] = $obj->date;
|
||||
$lines[$obj->bid][$i]["amount"] = $obj->amount;
|
||||
$lines[$obj->bid][$i]["emetteur"] = $obj->emetteur;
|
||||
$lines[$obj->bid][$i]["banque"] = $obj->banque;
|
||||
$i++;
|
||||
}
|
||||
|
||||
if ($i == 0)
|
||||
{
|
||||
print $langs->trans("NoWaitingChecks").'<br>';
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
foreach ($accounts as $bid => $account_label)
|
||||
{
|
||||
$num = $db->num_rows($resql);
|
||||
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("Date")."</td>\n";
|
||||
print '<td>'.$langs->trans("CheckTransmitter")."</td>\n";
|
||||
print '<td>'.$langs->trans("Bank")."</td>\n";
|
||||
print '<td align="right">'.$langs->trans("Amount")."</td>\n";
|
||||
print "</tr>\n";
|
||||
|
||||
$var=true;
|
||||
|
||||
foreach ($lines[$bid] as $lid => $value)
|
||||
|
||||
foreach ($accounts as $bid => $account_label)
|
||||
{
|
||||
$var=!$var;
|
||||
$num = $db->num_rows($resql);
|
||||
|
||||
$account_id = $objp->bid;
|
||||
$accounts[$objp->bid] += 1;
|
||||
|
||||
print "<tr $bc[$var]>";
|
||||
print '<td width="120">'.dolibarr_print_date($value["date"]).'</td>';
|
||||
print '<td>'.stripslashes($value["emetteur"])."</td>\n";
|
||||
print '<td>'.stripslashes($value["banque"])."</td>\n";
|
||||
print '<td align="right">'.price($value["amount"]).'</td>';
|
||||
print '</tr>';
|
||||
$i++;
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td>'.$langs->trans("Date")."</td>\n";
|
||||
print '<td>'.$langs->trans("CheckTransmitter")."</td>\n";
|
||||
print '<td>'.$langs->trans("Bank")."</td>\n";
|
||||
print '<td align="right">'.$langs->trans("Amount")."</td>\n";
|
||||
print "</tr>\n";
|
||||
|
||||
$var=true;
|
||||
|
||||
foreach ($lines[$bid] as $lid => $value)
|
||||
{
|
||||
$var=!$var;
|
||||
|
||||
$account_id = $objp->bid;
|
||||
$accounts[$objp->bid] += 1;
|
||||
|
||||
print "<tr $bc[$var]>";
|
||||
print '<td width="120">'.dolibarr_print_date($value["date"]).'</td>';
|
||||
print '<td>'.$value["emetteur"]."</td>\n";
|
||||
print '<td>'.$value["banque"]."</td>\n";
|
||||
print '<td align="right">'.price($value["amount"]).'</td>';
|
||||
print '</tr>';
|
||||
$i++;
|
||||
}
|
||||
print "</table>";
|
||||
|
||||
print '<div class="tabsAction">';
|
||||
print '<a class="tabAction" href="fiche.php?action=create&accountid='.$bid.'">';
|
||||
print $langs->trans('NewCheckDepositOn',$account_label);
|
||||
print '</a>';
|
||||
print '</div><br />';
|
||||
}
|
||||
print "</table>";
|
||||
|
||||
print '<div class="tabsAction">';
|
||||
print '<a class="tabAction" href="fiche.php?action=create&accountid='.$bid.'">';
|
||||
print $langs->trans('NewCheckReceipt');
|
||||
print ' : '.stripslashes($account_label).'</a>';
|
||||
print '</div><br />';
|
||||
}
|
||||
|
||||
}
|
||||
else
|
||||
{
|
||||
$remise->load_previous_next_id();
|
||||
$previous_id = $remise->previous_id ? '<a href="'.$_SERVER["PHP_SELF"].'?id='.$remise->previous_id.'">'.img_previous().'</a>':'';
|
||||
$next_id = $remise->next_id ? '<a href="'.$_SERVER["PHP_SELF"].'?id='.$remise->next_id.'">'.img_next().'</a>':'';
|
||||
$accountstatic=new Account($db);
|
||||
|
||||
$accountstatic->id=$remise->account_id;
|
||||
$accountstatic->label=$remise->account_label;
|
||||
|
||||
print '<table class="border" width="100%">';
|
||||
print '<tr><td width="30%">'.$langs->trans('Numero').'</td><td width="50%">'.$remise->number.'</td><td width="20%" align="right">';
|
||||
print $previous_id.' '.$next_id;
|
||||
print "</td></tr>\n";
|
||||
$remise->load_previous_next_id();
|
||||
$previous_id = $remise->previous_id ? '<a href="'.$_SERVER["PHP_SELF"].'?id='.$remise->previous_id.'">'.img_previous().'</a>':'';
|
||||
$next_id = $remise->next_id ? '<a href="'.$_SERVER["PHP_SELF"].'?id='.$remise->next_id.'">'.img_next().'</a>':'';
|
||||
|
||||
print '<tr><td width="30%">'.$langs->trans('Date').'</td><td colspan="2" width="70%">'.dolibarr_print_date($remise->date_bordereau).'</td></tr>';
|
||||
print '<tr><td width="30%">'.$langs->trans('Account').'</td><td colspan="2" width="70%">';
|
||||
print '<a href="'.DOL_URL_ROOT.'/compta/bank/account.php?account='.$remise->account_id.'">'.img_object($langs->trans("ShowAccount"),'account').' '.$remise->account_label.'</a>';
|
||||
print '</td></tr>';
|
||||
print '<table class="border" width="100%">';
|
||||
print '<tr><td width="30%">'.$langs->trans('Numero').'</td><td width="50%">'.$remise->number.'</td><td width="20%" align="right">';
|
||||
print $previous_id.' '.$next_id;
|
||||
print "</td></tr>\n";
|
||||
|
||||
print '<tr><td width="30%">'.$langs->trans('Total').'</td><td colspan="2" width="70%">';
|
||||
print price($remise->amount);
|
||||
print '</td></tr>';
|
||||
print '<tr><td width="30%">'.$langs->trans('Date').'</td><td colspan="2" width="70%">'.dolibarr_print_date($remise->date_bordereau).'</td></tr>';
|
||||
|
||||
print '</table><br />';
|
||||
print '<tr><td width="30%">'.$langs->trans('Account').'</td><td colspan="2" width="70%">';
|
||||
print $accountstatic->getNomUrl(1);
|
||||
print '</td></tr>';
|
||||
|
||||
$sql = "SELECT b.amount,b.emetteur,".$db->pdate("b.dateo")." as date,b.rowid,b.banque,";
|
||||
$sql.= " ba.rowid as bid, ba.label";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."bank as b";
|
||||
$sql.= ",".MAIN_DB_PREFIX."bank_account as ba";
|
||||
$sql.= " WHERE b.fk_type= 'CHQ' AND b.fk_account = ba.rowid";
|
||||
$sql.= " AND b.fk_bordereau = ".$remise->id;
|
||||
$sql.= " ORDER BY b.emetteur ASC, b.rowid ASC";
|
||||
print '<tr><td width="30%">'.$langs->trans('Total').'</td><td colspan="2" width="70%">';
|
||||
print price($remise->amount);
|
||||
print '</td></tr>';
|
||||
|
||||
$resql = $db->query($sql);
|
||||
|
||||
if ($resql)
|
||||
{
|
||||
$num = $db->num_rows($resql);
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td>#</td>';
|
||||
print '<td>'.$langs->trans("CheckTransmitter").'</td>';
|
||||
print '<td>'.$langs->trans("Bank").'</td>';
|
||||
print '<td align="right">'.$langs->trans("Amount").'</td>';
|
||||
print "<td> </td></tr>\n";
|
||||
$i=1;
|
||||
$var=false;
|
||||
while ( $objp = $db->fetch_object($resql) )
|
||||
print '</table><br />';
|
||||
|
||||
$sql = "SELECT b.amount,b.emetteur,".$db->pdate("b.dateo")." as date,b.rowid,b.banque,";
|
||||
$sql.= " ba.rowid as bid, ba.label";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."bank as b";
|
||||
$sql.= ",".MAIN_DB_PREFIX."bank_account as ba";
|
||||
$sql.= " WHERE b.fk_type= 'CHQ' AND b.fk_account = ba.rowid";
|
||||
$sql.= " AND b.fk_bordereau = ".$remise->id;
|
||||
$sql.= " ORDER BY b.emetteur ASC, b.rowid ASC";
|
||||
|
||||
$resql = $db->query($sql);
|
||||
|
||||
if ($resql)
|
||||
{
|
||||
$account_id = $objp->bid;
|
||||
$accounts[$objp->bid] += 1;
|
||||
$num = $db->num_rows($resql);
|
||||
|
||||
print "<tr $bc[$var]><td>$i</td>";
|
||||
print '<td>'.stripslashes($objp->emetteur).'</td>';
|
||||
print '<td>'.stripslashes($objp->banque).'</td>';
|
||||
print '<td align="right">'.price($objp->amount).'</td>';
|
||||
if($remise->statut == 0)
|
||||
{
|
||||
print '<td align="right"><a href="fiche.php?id='.$remise->id.'&action=remove&lineid='.$objp->rowid.'">'.img_delete().'</a></td>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<td> </td>';
|
||||
}
|
||||
print '</tr>';
|
||||
$var=!$var;
|
||||
$i++;
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td>#</td>';
|
||||
print '<td>'.$langs->trans("CheckTransmitter").'</td>';
|
||||
print '<td>'.$langs->trans("Bank").'</td>';
|
||||
print '<td align="right">'.$langs->trans("Amount").'</td>';
|
||||
print "<td> </td></tr>\n";
|
||||
$i=1;
|
||||
$var=false;
|
||||
while ( $objp = $db->fetch_object($resql) )
|
||||
{
|
||||
$account_id = $objp->bid;
|
||||
$accounts[$objp->bid] += 1;
|
||||
|
||||
print "<tr $bc[$var]><td>$i</td>";
|
||||
print '<td>'.$objp->emetteur.'</td>';
|
||||
print '<td>'.$objp->banque.'</td>';
|
||||
print '<td align="right">'.price($objp->amount).'</td>';
|
||||
if($remise->statut == 0)
|
||||
{
|
||||
print '<td align="right"><a href="fiche.php?id='.$remise->id.'&action=remove&lineid='.$objp->rowid.'">'.img_delete().'</a></td>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<td> </td>';
|
||||
}
|
||||
print '</tr>';
|
||||
$var=!$var;
|
||||
$i++;
|
||||
}
|
||||
print "</table>";
|
||||
}
|
||||
else
|
||||
{
|
||||
dolibarr_print_error($db);
|
||||
}
|
||||
print "</table><br />";
|
||||
}
|
||||
else
|
||||
{
|
||||
dolibarr_print_error($db);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
print '</div>';
|
||||
|
||||
if ($_GET['action'] != 'new')
|
||||
{
|
||||
if ($remise->statut == 1)
|
||||
{
|
||||
//show_documents($modulepart,$filename,$filedir,$urlsource,$genallowed,$delallowed=0,$modelselected='',$modelliste=array(),$forcenomultilang=0);
|
||||
@ -332,9 +352,6 @@ else
|
||||
}
|
||||
}
|
||||
|
||||
print '</div>';
|
||||
|
||||
|
||||
/*
|
||||
* Boutons Actions
|
||||
*/
|
||||
@ -358,6 +375,7 @@ if ($user->societe_id == 0 && $remise->statut == 0 && $_GET['action'] == '')
|
||||
}
|
||||
print '</div>';
|
||||
|
||||
|
||||
$db->close();
|
||||
|
||||
llxFooter('$Date$ - $Revision$');
|
||||
|
||||
@ -27,6 +27,8 @@
|
||||
*/
|
||||
|
||||
require("./pre.inc.php");
|
||||
require_once(DOL_DOCUMENT_ROOT.'/compta/paiement/cheque/remisecheque.class.php');
|
||||
require_once(DOL_DOCUMENT_ROOT.'/compta/bank/account.class.php');
|
||||
|
||||
$langs->load("banks");
|
||||
|
||||
@ -43,15 +45,21 @@ if ($user->societe_id > 0)
|
||||
$socid = $user->societe_id;
|
||||
}
|
||||
|
||||
$checkdepositstatic=new RemiseCheque($db);
|
||||
$accountstatic=new Account($db);
|
||||
|
||||
|
||||
/*
|
||||
* Affichage
|
||||
*/
|
||||
|
||||
llxHeader('',$langs->trans("CheckReceipt"));
|
||||
|
||||
print_titre($langs->trans("CheckReceipt") );
|
||||
print_fiche_titre($langs->trans("CheckReceipt") );
|
||||
|
||||
print '<table width="100%"><tr><td width="30%" valign="top">';
|
||||
print '<table border="0" width="100%" class="notopnoleftnoright">';
|
||||
|
||||
print '<tr><td valign="top" width="30%" class="notopnoleft">';
|
||||
|
||||
$sql = "SELECT count(b.rowid)";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."bank as b";
|
||||
@ -67,12 +75,12 @@ print "</tr>\n";
|
||||
|
||||
if ($resql)
|
||||
{
|
||||
$var=true;
|
||||
$var=false;
|
||||
if ($row = $db->fetch_row($resql) )
|
||||
{
|
||||
$num = $row[0];
|
||||
}
|
||||
print "<tr $bc[$var]>";
|
||||
print "<tr ".$bc[$var].">";
|
||||
print '<td>'.$langs->trans("BankChecksToReceipt").'</td>';
|
||||
print '<td align="right">'.$num.'</td></tr>';
|
||||
print "</table>\n";
|
||||
@ -82,8 +90,9 @@ else
|
||||
dolibarr_print_error($db);
|
||||
}
|
||||
|
||||
print "</td>\n";
|
||||
print '<td width="70%" valign="top">';
|
||||
|
||||
print '</td><td valign="top" width="70%" class="notopnoleftnoright">';
|
||||
|
||||
|
||||
$sql = "SELECT bc.rowid,".$db->pdate("bc.date_bordereau")." as db, bc.amount,bc.number,";
|
||||
$sql.= " bc.statut, ba.label, ba.rowid as bid";
|
||||
@ -96,35 +105,41 @@ $resql = $db->query($sql);
|
||||
|
||||
if ($resql)
|
||||
{
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td>'.$langs->trans("Date")."</td>";
|
||||
print '<td>'.$langs->trans("Numero").'</td>';
|
||||
print '<td>'.$langs->trans("Account").'</td>';
|
||||
print '<td align="right">'.$langs->trans("Amount").'</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
$var=true;
|
||||
while ( $objp = $db->fetch_object($resql) )
|
||||
{
|
||||
$var=!$var;
|
||||
print "<tr $bc[$var]>\n";
|
||||
print '<td>';
|
||||
print '<img src="statut'.$objp->statut.'.png" alt="Statut" width="12" height="12"> ';
|
||||
print dolibarr_print_date($objp->db,'%d/%m').'</td>';
|
||||
if ($objp->statut == 1)
|
||||
print '<table class="noborder" width="100%">';
|
||||
print '<tr class="liste_titre"><td>'.$langs->trans("Date")."</td>";
|
||||
print '<td>'.$langs->trans("Numero").'</td>';
|
||||
print '<td>'.$langs->trans("Account").'</td>';
|
||||
print '<td align="right">'.$langs->trans("Amount").'</td>';
|
||||
print '<td align="right">'.$langs->trans("Status").'</td>';
|
||||
print "</tr>\n";
|
||||
|
||||
$var=true;
|
||||
while ( $objp = $db->fetch_object($resql) )
|
||||
{
|
||||
print '<td><a href="'.DOL_URL_ROOT.'/compta/paiement/cheque/fiche.php?id='.$objp->rowid.'">'.$objp->number.'</a></td>';
|
||||
$checkdepositstatic->statut=$objp->statut;
|
||||
$checkdepositstatic->rowid=$objp->rowid;
|
||||
$checkdepositstatic->number=$objp->number;
|
||||
|
||||
$accountstatic->id=$objp->bid;
|
||||
$accountstatic->label=$objp->label;
|
||||
|
||||
$var=!$var;
|
||||
print "<tr $bc[$var]>\n";
|
||||
|
||||
print '<td>'.dolibarr_print_date($objp->db,'day').'</td>';
|
||||
|
||||
print '<td>'.$checkdepositstatic->getNomUrl(1).'</td>';
|
||||
|
||||
print '<td>'.$accountstatic->getNomUrl(1).'</td>';
|
||||
|
||||
print '<td align="right">'.price($objp->amount).'</td>';
|
||||
|
||||
print '<td align="right">'.$checkdepositstatic->LibStatut($objp->statut,3).'</td>';
|
||||
|
||||
print '</tr>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print '<td><a href="'.DOL_URL_ROOT.'/compta/paiement/cheque/fiche.php?id='.$objp->rowid.'">(PROV'.$objp->rowid.')</a></td>';
|
||||
}
|
||||
print '<td><a href="'.DOL_URL_ROOT.'/compta/bank/account.php?account='.$objp->bid.'">'.img_object($langs->trans("ShowAccount"),'account').' '.$objp->label.'</a>';
|
||||
print '</td>';
|
||||
print '<td align="right">'.price($objp->amount).'</td></tr>';
|
||||
}
|
||||
print "</table>";
|
||||
$db->free($resql);
|
||||
print "</table>";
|
||||
$db->free($resql);
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2007 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
|
||||
@ -27,6 +28,8 @@
|
||||
*/
|
||||
|
||||
require("./pre.inc.php");
|
||||
require_once(DOL_DOCUMENT_ROOT.'/compta/paiement/cheque/remisecheque.class.php');
|
||||
require_once(DOL_DOCUMENT_ROOT.'/compta/bank/account.class.php');
|
||||
|
||||
$langs->load("bills");
|
||||
|
||||
@ -43,13 +46,6 @@ if ($user->societe_id > 0)
|
||||
$socid = $user->societe_id;
|
||||
}
|
||||
|
||||
|
||||
/*
|
||||
* Affichage
|
||||
*/
|
||||
|
||||
llxHeader('',$langs->trans("CheckReceipt"));
|
||||
|
||||
$page=$_GET["page"];
|
||||
$sortorder=$_GET["sortorder"];
|
||||
$sortfield=$_GET["sortfield"];
|
||||
@ -58,18 +54,26 @@ $limit = $conf->liste_limit;
|
||||
$offset = $limit * $page ;
|
||||
if (! $sortorder) $sortorder="DESC";
|
||||
if (! $sortfield) $sortfield="bc.rowid";
|
||||
|
||||
|
||||
$checkdepositstatic=new RemiseCheque($db);
|
||||
$accountstatic=new Account($db);
|
||||
|
||||
|
||||
/*
|
||||
* Affichage
|
||||
*/
|
||||
|
||||
llxHeader('',$langs->trans("CheckReceipt"));
|
||||
|
||||
$sql = "SELECT bc.rowid, bc.number, ".$db->pdate("bc.date_bordereau") ." as dp, bc.amount, bc.statut,";
|
||||
$sql.= " ba.rowid as bid, ba.label";
|
||||
$sql.= " FROM ".MAIN_DB_PREFIX."bordereau_cheque as bc";
|
||||
$sql.= ",".MAIN_DB_PREFIX."bank_account as ba";
|
||||
$sql.= " WHERE bc.fk_bank_account = ba.rowid";
|
||||
|
||||
if ($_GET["search_montant"])
|
||||
{
|
||||
$sql .=" AND p.amount=".price2num($_GET["search_montant"]);
|
||||
}
|
||||
|
||||
$sql .= " ORDER BY $sortfield $sortorder";
|
||||
$sql .= $db->plimit( $limit+1 ,$offset);
|
||||
//print "$sql";
|
||||
@ -90,7 +94,7 @@ if ($resql)
|
||||
print_liste_field_titre($langs->trans("Date"),"liste.php","dp","",$paramlist,'align="center"',$sortfield);
|
||||
print_liste_field_titre($langs->trans("Account"),"liste.php","ba.label","",$paramlist,"",$sortfield);
|
||||
print_liste_field_titre($langs->trans("Amount"),"liste.php","p.amount","",$paramlist,'align="right"',$sortfield);
|
||||
print_liste_field_titre($langs->trans("Status"),"liste.php","p.statut","",$paramlist,'align="center"',$sortfield);
|
||||
print_liste_field_titre($langs->trans("Status"),"liste.php","p.statut","",$paramlist,'align="right"',$sortfield);
|
||||
print "</tr>\n";
|
||||
|
||||
// Lignes des champs de filtre
|
||||
@ -109,26 +113,34 @@ if ($resql)
|
||||
$objp = $db->fetch_object($resql);
|
||||
$var=!$var;
|
||||
print "<tr $bc[$var]>";
|
||||
|
||||
// Num ref cheque
|
||||
print '<td width="80">';
|
||||
print '<img src="statut'.$objp->statut.'.png" alt="Statut" width="12" height="12"> ';
|
||||
print '<a href="'.DOL_URL_ROOT.'/compta/paiement/cheque/fiche.php?id='.$objp->rowid.'">'.$objp->number.'</a></td>';
|
||||
$checkdepositstatic->rowid=$objp->rowid;
|
||||
$checkdepositstatic->statut=$objp->statut;
|
||||
$checkdepositstatic->number=$objp->number;
|
||||
print $checkdepositstatic->getNomUrl(1);
|
||||
print '</td>';
|
||||
|
||||
// Date
|
||||
print '<td align="center">'.dolibarr_print_date($objp->dp).'</td>';
|
||||
|
||||
// Banque
|
||||
print '<td>';
|
||||
if ($objp->bid) print '<a href="'.DOL_URL_ROOT.'/compta/bank/account.php?account='.$objp->bid.'">'.img_object($langs->trans("ShowAccount"),'account').' '.$objp->label.'</a>';
|
||||
else print ' ';
|
||||
print '</td>';
|
||||
|
||||
// Montant
|
||||
print '<td align="right">'.price($objp->amount).'</td>';
|
||||
print '<td align="center">';
|
||||
|
||||
// Statut
|
||||
print '<td align="right">';
|
||||
if ($objp->statut == 0)
|
||||
{
|
||||
print '<a href="fiche.php?id='.$objp->rowid.'&action=valide">'.$langs->trans("ToValidate").'</a>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print img_tick();
|
||||
}
|
||||
print $checkdepositstatic->LibStatut($objp->statut,5);
|
||||
print "</td></tr>\n";
|
||||
$i++;
|
||||
}
|
||||
|
||||
@ -38,7 +38,7 @@ function llxHeader($head = "", $title="")
|
||||
$menu->add("/compta/paiement/liste.php",$langs->trans("Payments"));
|
||||
|
||||
$menu->add(DOL_URL_ROOT."/compta/paiement/cheque/index.php",$langs->trans("CheckReceipt"));
|
||||
$menu->add_submenu(DOL_URL_ROOT."/compta/paiement/cheque/fiche.php?action=new",$langs->trans("New"));
|
||||
$menu->add_submenu(DOL_URL_ROOT."/compta/paiement/cheque/fiche.php?action=new",$langs->trans("NewCheckDeposit"));
|
||||
$menu->add_submenu(DOL_URL_ROOT."/compta/paiement/cheque/liste.php",$langs->trans("List"));
|
||||
|
||||
$menu->add(DOL_URL_ROOT."/compta/paiement/rapport.php",$langs->trans("Reportings"));
|
||||
|
||||
@ -1,5 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2007 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
|
||||
@ -17,25 +18,24 @@
|
||||
*
|
||||
* $Id$
|
||||
* $Source$
|
||||
*
|
||||
*/
|
||||
|
||||
/**
|
||||
\file htdocs/compta/paiement/cheque/resimecheque.class.php
|
||||
\ingroup compta
|
||||
\brief Fichier de la classe des bordereau de remise de cheque
|
||||
\version $Revision$
|
||||
\file htdocs/compta/paiement/cheque/resimecheque.class.php
|
||||
\ingroup compta
|
||||
\brief Fichier de la classe des bordereau de remise de cheque
|
||||
\version $Revision$
|
||||
*/
|
||||
|
||||
/**
|
||||
\class RemiseCheque
|
||||
\brief Classe permettant la gestion des remises de cheque
|
||||
\class RemiseCheque
|
||||
\brief Classe permettant la gestion des remises de cheque
|
||||
*/
|
||||
|
||||
class RemiseCheque
|
||||
{
|
||||
var $db ;
|
||||
var $id ;
|
||||
var $db;
|
||||
var $id;
|
||||
var $num;
|
||||
var $intitule;
|
||||
//! Numero d'erreur Plage 1024-1279
|
||||
@ -47,9 +47,10 @@ class RemiseCheque
|
||||
* \param id id compte (0 par defaut)
|
||||
*/
|
||||
|
||||
function RemiseCheque($DB)
|
||||
function RemiseCheque($DB,$langs='')
|
||||
{
|
||||
$this->db = $DB;
|
||||
$this->langs = $langs;
|
||||
$this->next_id = 0;
|
||||
$this->previous_id = 0;
|
||||
}
|
||||
@ -498,5 +499,82 @@ class RemiseCheque
|
||||
return $this->errno;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* \brief Renvoie nom clicable (avec eventuellement le picto)
|
||||
* \param withpicto Inclut le picto dans le lien
|
||||
* \param option Sur quoi pointe le lien
|
||||
* \return string Chaine avec URL
|
||||
*/
|
||||
function getNomUrl($withpicto=0,$option='')
|
||||
{
|
||||
global $langs; // TODO Renvoyer le libellé anglais et faire traduction a affichage
|
||||
|
||||
$result='';
|
||||
|
||||
$number=$this->number;
|
||||
if ($this->statut == 0) $number='(PROV'.$this->rowid.')';
|
||||
|
||||
$lien = '<a href="'.DOL_URL_ROOT.'/compta/paiement/cheque/fiche.php?id='.$this->rowid.'">';
|
||||
$lienfin='</a>';
|
||||
|
||||
if ($withpicto) $result.=($lien.img_object($langs->trans("ShowCheckReceipt"),'payment').$lienfin.' ');
|
||||
$result.=$lien.$number.$lienfin;
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Retourne le libellé du statut d'une facture (brouillon, validée, abandonnée, payée)
|
||||
* \param mode 0=libellé long, 1=libellé court, 2=Picto + Libellé court, 3=Picto, 4=Picto + Libellé long, 5=Libellé court + Picto
|
||||
* \return string Libelle
|
||||
*/
|
||||
function getLibStatut($mode=0)
|
||||
{
|
||||
return $this->LibStatut($this->statut,$mode);
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Renvoi le libellé d'un statut donne
|
||||
* \param status Statut
|
||||
* \param mode 0=libellé long, 1=libellé court, 2=Picto + Libellé court, 3=Picto, 4=Picto + Libellé long, 5=Libellé court + Picto
|
||||
* \return string Libellé du statut
|
||||
*/
|
||||
function LibStatut($status,$mode=0)
|
||||
{
|
||||
global $langs; // TODO Renvoyer le libellé anglais et faire traduction a affichage
|
||||
$langs->load('compta');
|
||||
if ($mode == 0)
|
||||
{
|
||||
if ($status == 0) return $langs->trans('ToValidate');
|
||||
if ($status == 1) return $langs->trans('Validated');
|
||||
}
|
||||
if ($mode == 1)
|
||||
{
|
||||
if ($status == 0) return $langs->trans('ToValidate');
|
||||
if ($status == 1) return $langs->trans('Validated');
|
||||
}
|
||||
if ($mode == 2)
|
||||
{
|
||||
if ($status == 0) return img_picto($langs->trans('ToValidate'),'statut1').' '.$langs->trans('ToValidate');
|
||||
if ($status == 1) return img_picto($langs->trans('Validated'),'statut4').' '.$langs->trans('Validated');
|
||||
}
|
||||
if ($mode == 3)
|
||||
{
|
||||
if ($status == 0) return img_picto($langs->trans('ToValidate'),'statut1');
|
||||
if ($status == 1) return img_picto($langs->trans('Validated'),'statut4');
|
||||
}
|
||||
if ($mode == 4)
|
||||
{
|
||||
if ($status == 0) return img_picto($langs->trans('ToValidate'),'statut1').' '.$langs->trans('ToValidate');
|
||||
if ($status == 1) return img_picto($langs->trans('Validated'),'statut4').' '.$langs->trans('Validated');
|
||||
}
|
||||
if ($mode == 5)
|
||||
{
|
||||
if ($status == 0) return $langs->trans('ToValidate').' '.img_picto($langs->trans('ToValidate'),'statut1');
|
||||
if ($status == 1) return $langs->trans('Validated').' '.img_picto($langs->trans('Validated'),'statut4');
|
||||
}
|
||||
return $langs->trans('Unknown');
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
|
||||
@ -1,6 +1,6 @@
|
||||
<?php
|
||||
/* Copyright (C) 2001-2006 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2005 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2004-2007 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
|
||||
@ -28,6 +28,8 @@
|
||||
*/
|
||||
|
||||
require("./pre.inc.php");
|
||||
require_once(DOL_DOCUMENT_ROOT.'/paiement.class.php');
|
||||
require_once(DOL_DOCUMENT_ROOT.'/compta/bank/account.class.php');
|
||||
|
||||
$langs->load("bills");
|
||||
|
||||
@ -44,6 +46,10 @@ if ($user->societe_id > 0)
|
||||
$socid = $user->societe_id;
|
||||
}
|
||||
|
||||
$paymentstatic=new Paiement($db);
|
||||
$accountstatic=new Account($db);
|
||||
|
||||
|
||||
/*
|
||||
* Affichage
|
||||
*/
|
||||
@ -103,67 +109,76 @@ $resql = $db->query($sql);
|
||||
|
||||
if ($resql)
|
||||
{
|
||||
$num = $db->num_rows($resql);
|
||||
$i = 0;
|
||||
$num = $db->num_rows($resql);
|
||||
$i = 0;
|
||||
|
||||
$paramlist=($_GET["orphelins"]?"&orphelins=1":"");
|
||||
print_barre_liste($langs->trans("ReceivedCustomersPayments"), $page, "liste.php",$paramlist,$sortfield,$sortorder,'',$num);
|
||||
|
||||
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);
|
||||
print_liste_field_titre($langs->trans("Date"),"liste.php","dp","",$paramlist,'align="center"',$sortfield);
|
||||
print_liste_field_titre($langs->trans("Type"),"liste.php","c.libelle","",$paramlist,"",$sortfield);
|
||||
print_liste_field_titre($langs->trans("Account"),"liste.php","ba.label","",$paramlist,"",$sortfield);
|
||||
print_liste_field_titre($langs->trans("Amount"),"liste.php","p.amount","",$paramlist,'align="right"',$sortfield);
|
||||
print_liste_field_titre($langs->trans("Status"),"liste.php","p.statut","",$paramlist,'align="center"',$sortfield);
|
||||
print "</tr>\n";
|
||||
|
||||
// Lignes des champs de filtre
|
||||
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td colspan="4"> </td>';
|
||||
print '<td align="right">';
|
||||
print '<input class="fat" type="text" size="6" name="search_montant" value="'.$_GET["search_montant"].'">';
|
||||
print '</td><td 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 "</tr>\n";
|
||||
|
||||
$var=true;
|
||||
while ($i < min($num,$limit))
|
||||
{
|
||||
$objp = $db->fetch_object($resql);
|
||||
$var=!$var;
|
||||
print "<tr $bc[$var]>";
|
||||
print '<td width="40"><a href="'.DOL_URL_ROOT.'/compta/paiement/fiche.php?id='.$objp->rowid.'">'.img_object($langs->trans("ShowPayment"),"payment").'</a>';
|
||||
|
||||
print ' <a href="'.DOL_URL_ROOT.'/compta/paiement/fiche.php?id='.$objp->rowid.'">'.$objp->rowid.'</a></td>';
|
||||
|
||||
print '<td align="center">'.dolibarr_print_date($objp->dp).'</td>';
|
||||
print '<td>'.$langs->trans("PaymentTypeShort".$objp->paiement_code).' '.$objp->num_paiement.'</td>';
|
||||
print '<td>';
|
||||
if ($objp->bid) print '<a href="'.DOL_URL_ROOT.'/compta/bank/account.php?account='.$objp->bid.'">'.img_object($langs->trans("ShowAccount"),'account').' '.$objp->label.'</a>';
|
||||
else print ' ';
|
||||
print '</td>';
|
||||
print '<td align="right">'.price($objp->amount).'</td>';
|
||||
print '<td align="center">';
|
||||
|
||||
if ($objp->statut == 0)
|
||||
{
|
||||
print '<a href="fiche.php?id='.$objp->rowid.'&action=valide">'.$langs->trans("ToValidate").'</a>';
|
||||
}
|
||||
else
|
||||
{
|
||||
print img_tick();
|
||||
}
|
||||
|
||||
print '</td></tr>';
|
||||
$i++;
|
||||
}
|
||||
print "</table>\n";
|
||||
print "</form>\n";
|
||||
$paramlist=($_GET["orphelins"]?"&orphelins=1":"");
|
||||
print_barre_liste($langs->trans("ReceivedCustomersPayments"), $page, "liste.php",$paramlist,$sortfield,$sortorder,'',$num);
|
||||
|
||||
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);
|
||||
print_liste_field_titre($langs->trans("Date"),"liste.php","dp","",$paramlist,'align="center"',$sortfield);
|
||||
print_liste_field_titre($langs->trans("Type"),"liste.php","c.libelle","",$paramlist,"",$sortfield);
|
||||
print_liste_field_titre($langs->trans("Account"),"liste.php","ba.label","",$paramlist,"",$sortfield);
|
||||
print_liste_field_titre($langs->trans("Amount"),"liste.php","p.amount","",$paramlist,'align="right"',$sortfield);
|
||||
print_liste_field_titre($langs->trans("Status"),"liste.php","p.statut","",$paramlist,'align="right"',$sortfield);
|
||||
print '<td> </td>';
|
||||
print "</tr>\n";
|
||||
|
||||
// Lignes des champs de filtre
|
||||
print '<tr class="liste_titre">';
|
||||
print '<td colspan="4"> </td>';
|
||||
print '<td align="right">';
|
||||
print '<input class="fat" type="text" size="6" name="search_montant" value="'.$_GET["search_montant"].'">';
|
||||
print '</td><td align="right" colspan="2">';
|
||||
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 "</tr>\n";
|
||||
|
||||
$var=true;
|
||||
while ($i < min($num,$limit))
|
||||
{
|
||||
$objp = $db->fetch_object($resql);
|
||||
$var=!$var;
|
||||
print "<tr $bc[$var]>";
|
||||
|
||||
print '<td width="40">';
|
||||
$paymentstatic->rowid=$objp->rowid;
|
||||
print $paymentstatic->getNomUrl(1);
|
||||
print '</td>';
|
||||
|
||||
print '<td align="center">'.dolibarr_print_date($objp->dp).'</td>';
|
||||
print '<td>'.$langs->trans("PaymentTypeShort".$objp->paiement_code).' '.$objp->num_paiement.'</td>';
|
||||
print '<td>';
|
||||
if ($objp->bid)
|
||||
{
|
||||
$accountstatic->id=$objp->bid;
|
||||
$accountstatic->label=$objp->label;
|
||||
print $accountstatic->getNomUrl(1);
|
||||
}
|
||||
else print ' ';
|
||||
print '</td>';
|
||||
print '<td align="right">'.price($objp->amount).'</td>';
|
||||
print '<td align="right">';
|
||||
print $paymentstatic->LibStatut($objp->statut,5);
|
||||
print '</td>';
|
||||
|
||||
print '<td align="right">';
|
||||
if ($objp->statut == 0)
|
||||
{
|
||||
print '<a href="fiche.php?id='.$objp->rowid.'&action=valide">'.$langs->trans("Validate").'</a>';
|
||||
}
|
||||
else print ' ';
|
||||
print '</td>';
|
||||
|
||||
print '</tr>';
|
||||
|
||||
$i++;
|
||||
}
|
||||
print "</table>\n";
|
||||
print "</form>\n";
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
@ -377,24 +377,25 @@ class MenuLeft {
|
||||
$newmenu->add(DOL_URL_ROOT."/compta/facture.php?leftmenu=customers_bills",$langs->trans("BillsCustomers"),1,$user->rights->facture->lire);
|
||||
if ($user->societe_id == 0)
|
||||
{
|
||||
if (eregi("customers_bills",$leftmenu)) $newmenu->add_submenu(DOL_URL_ROOT."/compta/clients.php?action=facturer",$langs->trans("NewBill"),2,$user->rights->facture->creer);
|
||||
if (eregi("customers_bills",$leftmenu)) $newmenu->add_submenu(DOL_URL_ROOT."/compta/clients.php?action=facturer&leftmenu=customers_bills",$langs->trans("NewBill"),2,$user->rights->facture->creer);
|
||||
}
|
||||
if (! defined("FACTURE_DISABLE_RECUR") || ! FACTURE_DISABLE_RECUR)
|
||||
{
|
||||
if (eregi("customers_bills",$leftmenu)) $newmenu->add_submenu(DOL_URL_ROOT."/compta/facture/fiche-rec.php",$langs->trans("Repeatable"),2,$user->rights->facture->lire);
|
||||
if (eregi("customers_bills",$leftmenu)) $newmenu->add_submenu(DOL_URL_ROOT."/compta/facture/fiche-rec.php?leftmenu=customers_bills",$langs->trans("Repeatable"),2,$user->rights->facture->lire);
|
||||
}
|
||||
if (eregi("customers_bills",$leftmenu)) $newmenu->add_submenu(DOL_URL_ROOT."/compta/facture/impayees.php",$langs->trans("Unpayed"),2,$user->rights->facture->lire);
|
||||
if (eregi("customers_bills",$leftmenu)) $newmenu->add_submenu(DOL_URL_ROOT."/compta/facture/impayees.php?leftmenu=customers_bills",$langs->trans("Unpayed"),2,$user->rights->facture->lire);
|
||||
|
||||
if (eregi("customers_bills",$leftmenu)) $newmenu->add_submenu(DOL_URL_ROOT."/compta/paiement/liste.php?leftmenu=customers_bills_payments",$langs->trans("Payments"),2,$user->rights->facture->lire);
|
||||
|
||||
if (eregi("customers_bills_payments",$leftmenu)) $newmenu->add_submenu(DOL_URL_ROOT."/compta/paiement/avalider.php",$langs->trans("MenuToValid"),3,$user->rights->facture->lire);
|
||||
if (eregi("customers_bills_payments",$leftmenu)) $newmenu->add_submenu(DOL_URL_ROOT."/compta/paiement/rapport.php",$langs->trans("Reportings"),3,$user->rights->facture->lire);
|
||||
if (eregi("customers_bills_payments",$leftmenu)) $newmenu->add_submenu(DOL_URL_ROOT."/compta/paiement/avalider.php?leftmenu=customers_bills_payments",$langs->trans("MenuToValid"),3,$user->rights->facture->lire);
|
||||
if (eregi("customers_bills_payments",$leftmenu)) $newmenu->add_submenu(DOL_URL_ROOT."/compta/paiement/rapport.php?leftmenu=customers_bills_payments",$langs->trans("Reportings"),3,$user->rights->facture->lire);
|
||||
|
||||
|
||||
if (eregi("customers_bills",$leftmenu)) $newmenu->add_submenu(DOL_URL_ROOT."/compta/facture/stats/", $langs->trans("Statistics"),2,$user->rights->facture->lire);
|
||||
if (eregi("customers_bills",$leftmenu)) $newmenu->add_submenu(DOL_URL_ROOT."/compta/paiement/cheque/index.php?leftmenu=customers_bills_checks",$langs->trans("CheckReceipt"),2,$user->rights->facture->lire);
|
||||
if (eregi("customers_bills_checks",$leftmenu)) $newmenu->add_submenu(DOL_URL_ROOT."/compta/paiement/cheque/fiche.php?leftmenu=customers_bills_checks&action=new",$langs->trans("NewCheckDeposit"),3,$user->rights->facture->lire);
|
||||
if (eregi("customers_bills_checks",$leftmenu)) $newmenu->add_submenu(DOL_URL_ROOT."/compta/paiement/cheque/liste.php?leftmenu=customers_bills_checks",$langs->trans("List"),3,$user->rights->facture->lire);
|
||||
|
||||
$newmenu->add_submenu(DOL_URL_ROOT."/compta/paiement/cheque/index.php",$langs->trans("CheckReceipt"),1,$user->rights->facture->lire);
|
||||
$newmenu->add_submenu(DOL_URL_ROOT."/compta/paiement/cheque/fiche.php?action=new",$langs->trans("New"),2,$user->rights->facture->lire);
|
||||
$newmenu->add_submenu(DOL_URL_ROOT."/compta/paiement/cheque/liste.php",$langs->trans("List"),2,$user->rights->facture->lire);
|
||||
if (eregi("customers_bills",$leftmenu)) $newmenu->add_submenu(DOL_URL_ROOT."/compta/facture/stats/index.php?leftmenu=customers_bills", $langs->trans("Statistics"),2,$user->rights->facture->lire);
|
||||
}
|
||||
|
||||
// Propal
|
||||
|
||||
@ -56,4 +56,10 @@ AccountNumber=Account number
|
||||
NewAccount=New account
|
||||
SalesTurnover=Sales turnover
|
||||
AccountancyExport=Accountancy export
|
||||
ErrorWrongAccountancyCodeForCompany=Bad customer accountancy code for %s
|
||||
ErrorWrongAccountancyCodeForCompany=Bad customer accountancy code for %s
|
||||
SuppliersProductsSellSalesTurnover=Chiffres d'affaire générés par la vente des produits des fournisseurs
|
||||
CheckReceipt=Check receipt
|
||||
NewCheckReceipt=Nouvelle remise
|
||||
NewCheckDeposit=New check deposit
|
||||
NewCheckDepositOn=New check deposit on account: %s
|
||||
NoWaitingChecks=No checks waiting for deposit.
|
||||
@ -59,4 +59,7 @@ AccountancyExport=Export comptable
|
||||
ErrorWrongAccountancyCodeForCompany=Code compta client incorrect pour %s
|
||||
SuppliersProductsSellSalesTurnover=Chiffres d'affaire générés par la vente des produits des fournisseurs
|
||||
CheckReceipt=Remise de chèques
|
||||
NewCheckReceipt=Nouvelle remise
|
||||
NewCheckReceipt=Nouvelle remise
|
||||
NewCheckDeposit=Nouveau dépôt
|
||||
NewCheckDepositOn=Nouveau dépôt sur compte: %s
|
||||
NoWaitingChecks=Pas de chèque en attente de dépots.
|
||||
@ -394,5 +394,79 @@ class Paiement
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
* \brief Renvoie nom clicable (avec eventuellement le picto)
|
||||
* \param withpicto Inclut le picto dans le lien
|
||||
* \param option Sur quoi pointe le lien
|
||||
* \return string Chaine avec URL
|
||||
*/
|
||||
function getNomUrl($withpicto=0,$option='')
|
||||
{
|
||||
global $langs; // TODO Renvoyer le libellé anglais et faire traduction a affichage
|
||||
|
||||
$result='';
|
||||
|
||||
$lien = '<a href="'.DOL_URL_ROOT.'/compta/paiement/fiche.php?id='.$this->rowid.'">';
|
||||
$lienfin='</a>';
|
||||
|
||||
if ($withpicto) $result.=($lien.img_object($langs->trans("ShowPayment"),'payment').$lienfin.' ');
|
||||
$result.=$lien.$this->rowid.$lienfin;
|
||||
return $result;
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Retourne le libellé du statut d'une facture (brouillon, validée, abandonnée, payée)
|
||||
* \param mode 0=libellé long, 1=libellé court, 2=Picto + Libellé court, 3=Picto, 4=Picto + Libellé long, 5=Libellé court + Picto
|
||||
* \return string Libelle
|
||||
*/
|
||||
function getLibStatut($mode=0)
|
||||
{
|
||||
return $this->LibStatut($this->statut,$mode);
|
||||
}
|
||||
|
||||
/**
|
||||
* \brief Renvoi le libellé d'un statut donne
|
||||
* \param status Statut
|
||||
* \param mode 0=libellé long, 1=libellé court, 2=Picto + Libellé court, 3=Picto, 4=Picto + Libellé long, 5=Libellé court + Picto
|
||||
* \return string Libellé du statut
|
||||
*/
|
||||
function LibStatut($status,$mode=0)
|
||||
{
|
||||
global $langs; // TODO Renvoyer le libellé anglais et faire traduction a affichage
|
||||
$langs->load('compta');
|
||||
if ($mode == 0)
|
||||
{
|
||||
if ($status == 0) return $langs->trans('ToValidate');
|
||||
if ($status == 1) return $langs->trans('Validated');
|
||||
}
|
||||
if ($mode == 1)
|
||||
{
|
||||
if ($status == 0) return $langs->trans('ToValidate');
|
||||
if ($status == 1) return $langs->trans('Validated');
|
||||
}
|
||||
if ($mode == 2)
|
||||
{
|
||||
if ($status == 0) return img_picto($langs->trans('ToValidate'),'statut1').' '.$langs->trans('ToValidate');
|
||||
if ($status == 1) return img_picto($langs->trans('Validated'),'statut4').' '.$langs->trans('Validated');
|
||||
}
|
||||
if ($mode == 3)
|
||||
{
|
||||
if ($status == 0) return img_picto($langs->trans('ToValidate'),'statut1');
|
||||
if ($status == 1) return img_picto($langs->trans('Validated'),'statut4');
|
||||
}
|
||||
if ($mode == 4)
|
||||
{
|
||||
if ($status == 0) return img_picto($langs->trans('ToValidate'),'statut1').' '.$langs->trans('ToValidate');
|
||||
if ($status == 1) return img_picto($langs->trans('Validated'),'statut4').' '.$langs->trans('Validated');
|
||||
}
|
||||
if ($mode == 5)
|
||||
{
|
||||
if ($status == 0) return $langs->trans('ToValidate').' '.img_picto($langs->trans('ToValidate'),'statut1');
|
||||
if ($status == 1) return $langs->trans('Validated').' '.img_picto($langs->trans('Validated'),'statut4');
|
||||
}
|
||||
return $langs->trans('Unknown');
|
||||
}
|
||||
|
||||
}
|
||||
?>
|
||||
|
||||
Loading…
Reference in New Issue
Block a user