Fix: warning

This commit is contained in:
Laurent Destailleur 2008-12-22 23:58:54 +00:00
parent 9e102945f2
commit 0821015e1b

View File

@ -46,7 +46,7 @@ class RemiseCheque extends CommonObject
/**
* \brief Constructeur de la classe
* \param DB handler accès base de données
* \param DB handler acc<EFBFBD>s base de donn<EFBFBD>es
* \param id id compte (0 par defaut)
*/
function RemiseCheque($DB)
@ -157,7 +157,7 @@ class RemiseCheque extends CommonObject
$sql.= " FROM ".MAIN_DB_PREFIX."bank as b";
$sql.= " WHERE b.fk_type = 'CHQ' AND b.amount > 0";
$sql.= " AND b.fk_bordereau = 0 AND b.fk_account='".$account_id."'";
$sql.= " LIMIT 40"; // On limite a 40 pour ne générer des PDF que d'une page
$sql.= " LIMIT 40"; // On limite a 40 pour ne g<EFBFBD>n<EFBFBD>rer des PDF que d'une page
dolibarr_syslog("RemiseCheque::Create sql=".$sql, LOG_DEBUG);
$resql = $this->db->query($sql);
@ -282,6 +282,8 @@ class RemiseCheque extends CommonObject
*/
function Validate($user)
{
global $langs;
$this->errno = 0;
$this->db->begin();
@ -317,11 +319,6 @@ class RemiseCheque extends CommonObject
}
}
if ($this->errno == 0)
{
$result=$this->GeneratePdf();
}
// Commit/Rollback
if ($this->errno == 0)
{
@ -413,6 +410,8 @@ class RemiseCheque extends CommonObject
{
global $langs;
if (empty($model)) $model='blochet';
dolibarr_syslog("RemiseCheque::GeneratePdf model=".$model, LOG_DEBUG);
$dir=DOL_DOCUMENT_ROOT ."/includes/modules/cheque/pdf/";
@ -538,7 +537,7 @@ class RemiseCheque extends CommonObject
}
/**
\brief Insère la remise en base
\brief Ins<EFBFBD>re la remise en base
\param user utilisateur qui effectue l'operation
\param account_id Compte bancaire concerne
*/
@ -565,7 +564,7 @@ class RemiseCheque extends CommonObject
return 0;
}
/**
\brief Charge les propriétés ref_previous et ref_next
\brief Charge les propri<EFBFBD>t<EFBFBD>s ref_previous et ref_next
\return int <0 si ko, 0 si ok
*/
function load_previous_next_id()
@ -607,7 +606,7 @@ class RemiseCheque extends CommonObject
*/
function getNomUrl($withpicto=0,$option='')
{
global $langs; // TODO Renvoyer le libellé anglais et faire traduction a affichage
global $langs; // TODO Renvoyer le libell<EFBFBD> anglais et faire traduction a affichage
$result='';
@ -623,8 +622,8 @@ class RemiseCheque extends CommonObject
}
/**
* \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
* \brief Retourne le libell<EFBFBD> du statut d'une facture (brouillon, valid<EFBFBD>e, abandonn<EFBFBD>e, pay<EFBFBD>e)
* \param mode 0=libell<EFBFBD> long, 1=libell<EFBFBD> court, 2=Picto + Libell<EFBFBD> court, 3=Picto, 4=Picto + Libell<EFBFBD> long, 5=Libell<EFBFBD> court + Picto
* \return string Libelle
*/
function getLibStatut($mode=0)
@ -633,14 +632,14 @@ class RemiseCheque extends CommonObject
}
/**
* \brief Renvoi le libellé d'un statut donne
* \brief Renvoi le libell<EFBFBD> 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
* \param mode 0=libell<EFBFBD> long, 1=libell<EFBFBD> court, 2=Picto + Libell<EFBFBD> court, 3=Picto, 4=Picto + Libell<EFBFBD> long, 5=Libell<EFBFBD> court + Picto
* \return string Libell<EFBFBD> du statut
*/
function LibStatut($status,$mode=0)
{
global $langs; // TODO Renvoyer le libellé anglais et faire traduction a affichage
global $langs; // TODO Renvoyer le libell<EFBFBD> anglais et faire traduction a affichage
$langs->load('compta');
if ($mode == 0)
{