Qual: Removed pdate

This commit is contained in:
Laurent Destailleur 2010-05-08 19:31:43 +00:00
parent 89c76d13b2
commit bfdd9087ba
13 changed files with 823 additions and 824 deletions

View File

@ -23,13 +23,13 @@
\ingroup societe, expedition \ingroup societe, expedition
\brief Fichier de la classe des adresses de livraison \brief Fichier de la classe des adresses de livraison
\version $Id$ \version $Id$
*/ */
/** /**
\class AdresseLivraison \class AdresseLivraison
\brief Classe permettant la gestion des adresses de livraison \brief Classe permettant la gestion des adresses de livraison
*/ */
class AdresseLivraison class AdresseLivraison
{ {
@ -137,7 +137,7 @@ class AdresseLivraison
} }
/** /**
* \brief Verification lors de la modification de l'adresse de livraison * \brief Verification lors de la modification de l'adresse de livraison
* \return 0 si ok, < 0 en cas d'erreur * \return 0 si ok, < 0 en cas d'erreur
*/ */
@ -276,8 +276,8 @@ class AdresseLivraison
// Adresses de livraison liees a la societe // Adresses de livraison liees a la societe
if ($this->socid) if ($this->socid)
{ {
$sql = 'SELECT a.rowid as id, a.label, a.nom, a.address,'.$this->db->pdate('a.datec').' as dc'; $sql = 'SELECT a.rowid as id, a.label, a.nom, a.address, a.datec as dc';
$sql .= ','. $this->db->pdate('a.tms').' as date_update, a.fk_societe'; $sql .= ', a.tms as date_update, a.fk_societe';
$sql .= ', a.cp, a.ville, a.note, a.fk_pays, a.tel, a.fax'; $sql .= ', a.cp, a.ville, a.note, a.fk_pays, a.tel, a.fax';
$sql .= ', p.code as pays_code, p.libelle as pays'; $sql .= ', p.code as pays_code, p.libelle as pays';
$sql .= ' FROM '.MAIN_DB_PREFIX.'societe_adresse_livraison as a'; $sql .= ' FROM '.MAIN_DB_PREFIX.'societe_adresse_livraison as a';
@ -296,16 +296,16 @@ class AdresseLivraison
$ligne = new AdresseLivraisonLigne(); $ligne = new AdresseLivraisonLigne();
$ligne->id = $objp->id; $ligne->id = $objp->id;
$ligne->date_creation = $objp->dc; $ligne->date_creation = $this->db->jdate($objp->dc);
$ligne->date_update = $objp->date_update; $ligne->date_update = $this->db->jdate($objp->date_update);
$ligne->label = stripslashes($objp->label); $ligne->label = $objp->label;
$ligne->nom = stripslashes($objp->nom); $ligne->nom = $objp->nom;
$ligne->address = stripslashes($objp->address); $ligne->address = $objp->address;
$ligne->adresse = stripslashes($objp->address); // TODO obsolete $ligne->adresse = $objp->address; // TODO obsolete
$ligne->cp = $objp->cp; $ligne->cp = $objp->cp;
$ligne->ville = stripslashes($objp->ville); $ligne->ville = $objp->ville;
$ligne->adresse_full = stripslashes($objp->address) . "\n". $objp->cp . ' '. stripslashes($objp->ville); $ligne->adresse_full = $objp->address . "\n". $objp->cp . ' '. $objp->ville;
$ligne->full_address = stripslashes($objp->address) . "\n". $objp->cp . ' '. stripslashes($objp->ville); // TODO obsolete $ligne->full_address = $objp->address . "\n". $objp->cp . ' '. $objp->ville; // TODO obsolete
$ligne->pays_id = $objp->fk_pays; $ligne->pays_id = $objp->fk_pays;
$ligne->pays_code = $objp->fk_pays?$objp->pays_code:''; $ligne->pays_code = $objp->fk_pays?$objp->pays_code:'';
$ligne->pays = $objp->fk_pays?($langs->trans('Country'.$objp->pays_code)!='Country'.$objp->pays_code?strtoupper($langs->trans('Country'.$objp->pays_code)):$objp->pays):''; $ligne->pays = $objp->fk_pays?($langs->trans('Country'.$objp->pays_code)!='Country'.$objp->pays_code?strtoupper($langs->trans('Country'.$objp->pays_code)):$objp->pays):'';
@ -349,8 +349,8 @@ class AdresseLivraison
global $langs; global $langs;
global $conf; global $conf;
$sql = 'SELECT a.rowid, a.fk_societe, a.label, a.nom, a.address,'.$this->db->pdate('a.datec').' as dc'; $sql = 'SELECT a.rowid, a.fk_societe, a.label, a.nom, a.address, a.datec as date_creation';
$sql .= ','. $this->db->pdate('a.tms').' as date_update'; $sql .= ', a.tms as date_update';
$sql .= ', a.cp,a.ville, a.note, a.fk_pays, a.tel, a.fax'; $sql .= ', a.cp,a.ville, a.note, a.fk_pays, a.tel, a.fax';
$sql .= ', p.code as pays_code, p.libelle as pays'; $sql .= ', p.code as pays_code, p.libelle as pays';
$sql .= ' FROM '.MAIN_DB_PREFIX.'societe_adresse_livraison as a'; $sql .= ' FROM '.MAIN_DB_PREFIX.'societe_adresse_livraison as a';
@ -366,17 +366,17 @@ class AdresseLivraison
$this->id = $obj->rowid; $this->id = $obj->rowid;
$this->socid = $obj->fk_societe; $this->socid = $obj->fk_societe;
$this->date_update = $obj->date_update; $this->date_update = $this->db->jdate($obj->date_update);
$this->date_creation = $obj->date_creation; $this->date_creation = $this->db->jdate($obj->date_creation);
$this->label = stripslashes($obj->label); $this->label = $obj->label;
$this->nom = stripslashes($obj->nom); $this->nom = $obj->nom;
$this->adresse = stripslashes($obj->address); // TODO obsolete $this->adresse = $obj->address; // TODO obsolete
$this->address = stripslashes($obj->address); $this->address = $obj->address;
$this->cp = $obj->cp; $this->cp = $obj->cp;
$this->ville = stripslashes($obj->ville); $this->ville = $obj->ville;
$this->adresse_full = stripslashes($obj->address) . "\n". $obj->cp . ' '. stripslashes($obj->ville); $this->adresse_full = $obj->address . "\n". $obj->cp . ' '. $obj->ville;
$this->full_address = stripslashes($obj->address) . "\n". $obj->cp . ' '. stripslashes($obj->ville); //TODO obsolete $this->full_address = $obj->address . "\n". $obj->cp . ' '. $obj->ville; //TODO obsolete
$this->pays_id = $obj->fk_pays; $this->pays_id = $obj->fk_pays;
$this->pays_code = $obj->fk_pays?$obj->pays_code:''; $this->pays_code = $obj->fk_pays?$obj->pays_code:'';
@ -435,7 +435,7 @@ class AdresseLivraison
*/ */
function info($id) function info($id)
{ {
$sql = "SELECT s.rowid, s.nom, ".$this->db->pdate("datec")." as datec, ".$this->db->pdate("datea")." as datea,"; $sql = "SELECT s.rowid, s.nom, datec, datea,";
$sql.= " fk_user_creat, fk_user_modif"; $sql.= " fk_user_creat, fk_user_modif";
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s"; $sql.= " FROM ".MAIN_DB_PREFIX."societe as s";
$sql.= " WHERE s.rowid = ".$id; $sql.= " WHERE s.rowid = ".$id;
@ -461,8 +461,8 @@ class AdresseLivraison
$this->user_modification = $muser; $this->user_modification = $muser;
} }
$this->ref = $obj->nom; $this->ref = $obj->nom;
$this->date_creation = $obj->datec; $this->date_creation = $this->db->jdate($obj->datec);
$this->date_modification = $obj->datea; $this->date_modification = $this->db->jdate($obj->datea);
} }
$this->db->free($result); $this->db->free($result);

View File

@ -191,7 +191,7 @@ if ($socid > 0)
print '<table class="noborder" width="100%">'; print '<table class="noborder" width="100%">';
$sql = "SELECT s.nom, s.rowid as socid, p.rowid as propalid, p.fk_statut, p.total_ht, p.ref, p.remise, "; $sql = "SELECT s.nom, s.rowid as socid, p.rowid as propalid, p.fk_statut, p.total_ht, p.ref, p.remise, ";
$sql.= " ".$db->pdate("p.datep")." as dp, ".$db->pdate("p.fin_validite")." as datelimite,"; $sql.= " p.datep as dp, p.fin_validite as datelimite,";
$sql.= " c.label as statut, c.id as statutid"; $sql.= " c.label as statut, c.id as statutid";
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s"; $sql.= " FROM ".MAIN_DB_PREFIX."societe as s";
$sql.= ", ".MAIN_DB_PREFIX."propal as p"; $sql.= ", ".MAIN_DB_PREFIX."propal as p";
@ -226,11 +226,11 @@ if ($socid > 0)
print "<td><a href=\"../propal.php?propalid=$objp->propalid\">"; print "<td><a href=\"../propal.php?propalid=$objp->propalid\">";
print img_object($langs->trans("ShowPropal"),"propal"); print img_object($langs->trans("ShowPropal"),"propal");
print " ".$objp->ref."</a>\n"; print " ".$objp->ref."</a>\n";
if ( $objp->dp < ($now - $conf->propal->cloture->warning_delay) && $objp->fk_statut == 1 ) if ($db->jdate($objp->dp) < ($now - $conf->propal->cloture->warning_delay) && $objp->fk_statut == 1)
{ {
print " ".img_warning(); print " ".img_warning();
} }
print "</td><td align=\"right\">".dol_print_date($objp->dp,"day")."</td>\n"; print "</td><td align=\"right\">".dol_print_date($db->jdate($objp->dp),"day")."</td>\n";
print "<td align=\"right\">".price($objp->total_ht)."</td>\n"; print "<td align=\"right\">".price($objp->total_ht)."</td>\n";
print "<td align=\"right\">".$propal_static->LibStatut($objp->fk_statut,5)."</td></tr>\n"; print "<td align=\"right\">".$propal_static->LibStatut($objp->fk_statut,5)."</td></tr>\n";
$i++; $i++;

View File

@ -171,7 +171,7 @@ if ($conf->agenda->enabled) show_array_actions_to_do(10);
*/ */
if ($conf->propal->enabled && $user->rights->propale->lire) if ($conf->propal->enabled && $user->rights->propale->lire)
{ {
$sql = "SELECT s.nom, s.rowid as socid, p.rowid as propalid, p.total as total_ttc, p.ref,".$db->pdate("p.datep")." as dp, c.label as statut, c.id as statutid"; $sql = "SELECT s.nom, s.rowid as socid, p.rowid as propalid, p.total as total_ttc, p.ref, p.datep as dp, c.label as statut, c.id as statutid";
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s"; $sql.= " FROM ".MAIN_DB_PREFIX."societe as s";
$sql.= ", ".MAIN_DB_PREFIX."propal as p"; $sql.= ", ".MAIN_DB_PREFIX."propal as p";
$sql.= ", ".MAIN_DB_PREFIX."c_propalst as c"; $sql.= ", ".MAIN_DB_PREFIX."c_propalst as c";
@ -207,7 +207,7 @@ if ($conf->propal->enabled && $user->rights->propale->lire)
print "<td><a href=\"fiche.php?id=".$obj->socid."\">".img_object($langs->trans("ShowCompany"),"company").' '.$obj->nom."</a></td>\n"; print "<td><a href=\"fiche.php?id=".$obj->socid."\">".img_object($langs->trans("ShowCompany"),"company").' '.$obj->nom."</a></td>\n";
print "<td align=\"right\">"; print "<td align=\"right\">";
print dol_print_date($obj->dp,'day')."</td>\n"; print dol_print_date($db->jdate($obj->dp),'day')."</td>\n";
print "<td align=\"right\">".price($obj->total_ttc)."</td></tr>\n"; print "<td align=\"right\">".price($obj->total_ttc)."</td></tr>\n";
$i++; $i++;
$total += $obj->price; $total += $obj->price;

View File

@ -21,7 +21,7 @@
* $Id$ * $Id$
*/ */
/** /**
* \file htdocs/compta/export/ComptaJournalPaiement.php * \file htdocs/compta/export/ComptaJournalPaiement.php
* \ingroup compta * \ingroup compta
* \brief Fichier de la classe export compta journal * \brief Fichier de la classe export compta journal
@ -83,7 +83,7 @@ class ComptaJournalPaiement
$this->pdf->SetXY (10, 10); $this->pdf->SetXY (10, 10);
$nexY = $this->pdf->GetY(); $nexY = $this->pdf->GetY();
$sql = "SELECT p.rowid,".$this->db->pdate("p.datep")." as dp, p.statut"; $sql = "SELECT p.rowid,p.datep as dp, p.statut";
$sql.= ", pf.amount"; $sql.= ", pf.amount";
$sql.= ", c.libelle, p.num_paiement"; $sql.= ", c.libelle, p.num_paiement";
$sql.= ", f.facnumber, f.increment"; $sql.= ", f.facnumber, f.increment";
@ -118,7 +118,7 @@ class ComptaJournalPaiement
{ {
$obj = $this->db->fetch_object($resql); $obj = $this->db->fetch_object($resql);
if ($oldate <> strftime("%d%m%Y",$obj->dp)) if ($oldate <> strftime("%d%m%Y",$this->db->jdate($obj->dp)))
{ {
if ($oldate <> '') if ($oldate <> '')
{ {
@ -132,7 +132,7 @@ class ComptaJournalPaiement
$this->pdf->ln(); $this->pdf->ln();
} }
$journal = "Journal $journ du ".strftime('%A, %e %B %G',$obj->dp); $journal = "Journal $journ du ".strftime('%A, %e %B %G',$this->db->jdate($obj->dp));
$total_credit = 0 ; $total_credit = 0 ;
$total_debit = 0 ; $total_debit = 0 ;
$this->pdf->SetFont('Arial','B',10); $this->pdf->SetFont('Arial','B',10);
@ -157,7 +157,7 @@ class ComptaJournalPaiement
$this->pdf->cell(18,$this->hligne,'Credit',0,0,'R'); $this->pdf->cell(18,$this->hligne,'Credit',0,0,'R');
$this->pdf->ln(); $this->pdf->ln();
$oldate = strftime("%d%m%Y",$obj->dp); $oldate = strftime("%d%m%Y",$this->db->jdate($obj->dp));
} }
/* /*
@ -197,7 +197,7 @@ class ComptaJournalPaiement
$facnumber = $obj->increment; $facnumber = $obj->increment;
} }
$this->_print_ligne($obj->dp, $facnumber, '41100000', $s, $credit, $debit); $this->_print_ligne($this->db->jdate($obj->dp), $facnumber, '41100000', $s, $credit, $debit);
if ($obj->amount >= 0) if ($obj->amount >= 0)
{ {
@ -215,7 +215,7 @@ class ComptaJournalPaiement
} }
$s = $socnom . ' '.$libelle; $s = $socnom . ' '.$libelle;
$this->_print_ligne($obj->dp, $facnumber, '5122000', $s, $credit, $debit); $this->_print_ligne($this->db->jdate($obj->dp), $facnumber, '5122000', $s, $credit, $debit);
$i++; $i++;
} }

View File

@ -20,12 +20,12 @@
* $Id$ * $Id$
*/ */
/** /**
\file htdocs/compta/export/ComptaJournalVente.php \file htdocs/compta/export/ComptaJournalVente.php
\ingroup compta \ingroup compta
\brief Fichier de la classe export compta journal \brief Fichier de la classe export compta journal
\version $Revision$ \version $Revision$
*/ */
require_once(DOL_DOCUMENT_ROOT.'/compta/export/class/ComptaJournalPdf.class.php'); require_once(DOL_DOCUMENT_ROOT.'/compta/export/class/ComptaJournalPdf.class.php');
@ -33,7 +33,7 @@ require_once(DOL_DOCUMENT_ROOT.'/compta/export/class/ComptaJournalPdf.class.php'
/** /**
\class ComptaJournalVente \class ComptaJournalVente
\brief Classe export compta journal \brief Classe export compta journal
*/ */
class ComptaJournalVente { class ComptaJournalVente {
function ComptaJournalVente ($db=0) function ComptaJournalVente ($db=0)
@ -77,7 +77,7 @@ class ComptaJournalVente {
$pdf->SetXY (10, 10 ); $pdf->SetXY (10, 10 );
$nexY = $pdf->GetY(); $nexY = $pdf->GetY();
$sql = "SELECT f.rowid as facid, f.facnumber, ".$this->db->pdate("f.datef")." as dp"; $sql = "SELECT f.rowid as facid, f.facnumber, f.datef as dp";
$sql .= " , f.total_ttc as amount, f.tva"; $sql .= " , f.total_ttc as amount, f.tva";
$sql .= " , s.nom, s.code_compta"; $sql .= " , s.nom, s.code_compta";
$sql .= " , l.price, l.tva_tx"; $sql .= " , l.price, l.tva_tx";
@ -119,10 +119,10 @@ class ComptaJournalVente {
{ {
$obj = $this->db->fetch_object($resql); $obj = $this->db->fetch_object($resql);
if ($oldate <> strftime("%d%m%Y",$obj->dp)) if ($oldate <> strftime("%d%m%Y",$this->db->jdate($obj->dp)))
{ {
$journal = "Journal $journ du ".strftime('%A, %e %B %G',$obj->dp); $journal = "Journal $journ du ".strftime('%A, %e %B %G',$this->db->jdate($obj->dp));
$total_credit = 0 ; $total_credit = 0 ;
$total_debit = 0 ; $total_debit = 0 ;
$pdf->SetFont('Arial','B',10); $pdf->SetFont('Arial','B',10);
@ -144,7 +144,7 @@ class ComptaJournalVente {
$pdf->ln(); $pdf->ln();
$oldate = strftime("%d%m%Y",$obj->dp); $oldate = strftime("%d%m%Y",$this->db->jdate($obj->dp));
} }
/* /*
@ -195,7 +195,7 @@ class ComptaJournalVente {
{ {
$oldfac = $obj->facid; $oldfac = $obj->facid;
$pdf->cell($wc[1],$hligne,strftime('%d%m%y',$obj->dp)); $pdf->cell($wc[1],$hligne,strftime('%d%m%y',$this->db->jdate($obj->dp)));
$pdf->cell($wc[2],$hligne,'VI'); $pdf->cell($wc[2],$hligne,'VI');
$pdf->cell($wc[3],$hligne,'41100000'); $pdf->cell($wc[3],$hligne,'41100000');
$pdf->cell($wc[4],$hligne,$obj->code_compta); $pdf->cell($wc[4],$hligne,$obj->code_compta);
@ -203,10 +203,10 @@ class ComptaJournalVente {
$pdf->cell($wc[6],$hligne,$facnumber); $pdf->cell($wc[6],$hligne,$facnumber);
$pdf->cell($wc[7],$hligne,$amount,0,0,'R'); $pdf->cell($wc[7],$hligne,$amount,0,0,'R');
$pdf->cell($wc[8],$hligne,$d); $pdf->cell($wc[8],$hligne,$d);
$pdf->cell($wc[9],$hligne,strftime('%d%m%y',$obj->dp),0,0,'R'); $pdf->cell($wc[9],$hligne,strftime('%d%m%y',$this->db->jdate($obj->dp)),0,0,'R');
$pdf->ln(); $pdf->ln();
$pdf->cell($wc[1],$hligne,strftime('%d%m%y',$obj->dp)); $pdf->cell($wc[1],$hligne,strftime('%d%m%y',$this->db->jdate($obj->dp)));
$pdf->cell($wc[2],$hligne,'VI'); $pdf->cell($wc[2],$hligne,'VI');
$pdf->cell($wc[3],$hligne,'4457119'); $pdf->cell($wc[3],$hligne,'4457119');
$pdf->cell($wc[4],$hligne,''); $pdf->cell($wc[4],$hligne,'');
@ -214,11 +214,11 @@ class ComptaJournalVente {
$pdf->cell($wc[6],$hligne,$facnumber); $pdf->cell($wc[6],$hligne,$facnumber);
$pdf->cell($wc[7],$hligne,$tva,0,0,'R'); $pdf->cell($wc[7],$hligne,$tva,0,0,'R');
$pdf->cell($wc[8],$hligne,$c); $pdf->cell($wc[8],$hligne,$c);
$pdf->cell($wc[9],$hligne,strftime('%d%m%y',$obj->dp),0,0,'R'); $pdf->cell($wc[9],$hligne,strftime('%d%m%y',$this->db->jdate($obj->dp)),0,0,'R');
$pdf->ln(); $pdf->ln();
} }
$pdf->cell($wc[1],$hligne,strftime('%d%m%y',$obj->dp)); $pdf->cell($wc[1],$hligne,strftime('%d%m%y',$this->db->jdate($obj->dp)));
$pdf->cell($wc[2],$hligne,'VI'); $pdf->cell($wc[2],$hligne,'VI');
$pdf->cell($wc[3],$hligne,$obj->numero); $pdf->cell($wc[3],$hligne,$obj->numero);
$pdf->cell($wc[4],$hligne,''); $pdf->cell($wc[4],$hligne,'');
@ -226,7 +226,7 @@ class ComptaJournalVente {
$pdf->cell($wc[6],$hligne,$facnumber); $pdf->cell($wc[6],$hligne,$facnumber);
$pdf->cell($wc[7],$hligne,$price,0,0,'R'); $pdf->cell($wc[7],$hligne,$price,0,0,'R');
$pdf->cell($wc[8],$hligne,$c); $pdf->cell($wc[8],$hligne,$c);
$pdf->cell($wc[9],$hligne,strftime('%d%m%y',$obj->dp),0,0,'R'); $pdf->cell($wc[9],$hligne,strftime('%d%m%y',$this->db->jdate($obj->dp)),0,0,'R');
$pdf->ln(); $pdf->ln();
$i++; $i++;

View File

@ -191,7 +191,7 @@ class FactureRec extends Facture
dol_syslog("Facture::Fetch rowid=".$rowid.", societe_id=".$socid, LOG_DEBUG); dol_syslog("Facture::Fetch rowid=".$rowid.", societe_id=".$socid, LOG_DEBUG);
$sql = 'SELECT f.titre,f.fk_soc,f.amount,f.tva,f.total,f.total_ttc,f.remise_percent,f.remise_absolue,f.remise'; $sql = 'SELECT f.titre,f.fk_soc,f.amount,f.tva,f.total,f.total_ttc,f.remise_percent,f.remise_absolue,f.remise';
$sql.= ','.$this->db->pdate('f.date_lim_reglement').' as dlr'; $sql.= ', f.date_lim_reglement as dlr';
$sql.= ', f.note, f.note_public, f.fk_user_author'; $sql.= ', f.note, f.note_public, f.fk_user_author';
$sql.= ', f.fk_mode_reglement, f.fk_cond_reglement'; $sql.= ', f.fk_mode_reglement, f.fk_cond_reglement';
$sql.= ', p.code as mode_reglement_code, p.libelle as mode_reglement_libelle'; $sql.= ', p.code as mode_reglement_code, p.libelle as mode_reglement_libelle';
@ -231,7 +231,7 @@ class FactureRec extends Facture
$this->close_note = $obj->close_note; $this->close_note = $obj->close_note;
$this->socid = $obj->fk_soc; $this->socid = $obj->fk_soc;
$this->statut = $obj->fk_statut; $this->statut = $obj->fk_statut;
$this->date_lim_reglement = $obj->dlr; $this->date_lim_reglement = $this->db->jdate($obj->dlr);
$this->mode_reglement_id = $obj->fk_mode_reglement; $this->mode_reglement_id = $obj->fk_mode_reglement;
$this->mode_reglement_code = $obj->mode_reglement_code; $this->mode_reglement_code = $obj->mode_reglement_code;
$this->mode_reglement = $obj->mode_reglement_libelle; $this->mode_reglement = $obj->mode_reglement_libelle;

View File

@ -55,7 +55,7 @@ if ($page == -1) $page = 0 ;
$limit = $conf->liste_limit; $limit = $conf->liste_limit;
$offset = $limit * $page ; $offset = $limit * $page ;
$sql = "SELECT p.rowid,".$db->pdate("p.datep")." as dp, p.amount, p.statut"; $sql = "SELECT p.rowid, p.datep as dp, p.amount, p.statut";
$sql .=", c.libelle as paiement_type, p.num_paiement"; $sql .=", c.libelle as paiement_type, p.num_paiement";
$sql .= " FROM ".MAIN_DB_PREFIX."paiement as p, ".MAIN_DB_PREFIX."c_paiement as c"; $sql .= " FROM ".MAIN_DB_PREFIX."paiement as p, ".MAIN_DB_PREFIX."c_paiement as c";
if ($socid) if ($socid)
@ -96,7 +96,7 @@ if ($resql)
$var=!$var; $var=!$var;
print "<tr $bc[$var]>"; print "<tr $bc[$var]>";
print '<td>'.'<a href="'.DOL_URL_ROOT.'/compta/paiement/fiche.php?id='.$objp->rowid.'">'.img_object($langs->trans("ShowPayment"),"payment").' '.$objp->rowid.'</a></td>'; print '<td>'.'<a href="'.DOL_URL_ROOT.'/compta/paiement/fiche.php?id='.$objp->rowid.'">'.img_object($langs->trans("ShowPayment"),"payment").' '.$objp->rowid.'</a></td>';
print '<td width="80" align="center">'.dol_print_date($objp->dp,'day')."</td>\n"; print '<td width="80" align="center">'.dol_print_date($db->jdate($objp->dp),'day')."</td>\n";
print "<td>$objp->paiement_type $objp->num_paiement</td>\n"; print "<td>$objp->paiement_type $objp->num_paiement</td>\n";
print '<td align="right">'.price($objp->amount).'</td>'; print '<td align="right">'.price($objp->amount).'</td>';
print '<td align="center">'; print '<td align="center">';

View File

@ -68,7 +68,7 @@ class RemiseCheque extends CommonObject
global $conf; global $conf;
$sql = "SELECT bc.rowid, bc.datec, bc.fk_user_author, bc.fk_bank_account, bc.amount, bc.number, bc.statut, bc.nbcheque"; $sql = "SELECT bc.rowid, bc.datec, bc.fk_user_author, bc.fk_bank_account, bc.amount, bc.number, bc.statut, bc.nbcheque";
$sql.= ", ".$this->db->pdate("bc.date_bordereau"). " as date_bordereau"; $sql.= ", bc.date_bordereau as date_bordereau";
$sql.= ", ba.label as account_label"; $sql.= ", ba.label as account_label";
$sql.= " FROM ".MAIN_DB_PREFIX."bordereau_cheque as bc"; $sql.= " FROM ".MAIN_DB_PREFIX."bordereau_cheque as bc";
$sql.= " LEFT JOIN ".MAIN_DB_PREFIX."bank_account as ba ON bc.fk_bank_account = ba.rowid"; $sql.= " LEFT JOIN ".MAIN_DB_PREFIX."bank_account as ba ON bc.fk_bank_account = ba.rowid";
@ -84,7 +84,7 @@ class RemiseCheque extends CommonObject
{ {
$this->id = $obj->rowid; $this->id = $obj->rowid;
$this->amount = $obj->amount; $this->amount = $obj->amount;
$this->date_bordereau = $obj->date_bordereau; $this->date_bordereau = $this->db->jdate($obj->date_bordereau);
$this->account_id = $obj->fk_bank_account; $this->account_id = $obj->fk_bank_account;
$this->account_label = $obj->account_label; $this->account_label = $obj->account_label;
$this->author_id = $obj->fk_user_author; $this->author_id = $obj->fk_user_author;

View File

@ -216,10 +216,10 @@ class BonPrelevement extends CommonObject
global $conf; global $conf;
$sql = "SELECT p.rowid, p.ref, p.amount, p.note, p.credite"; $sql = "SELECT p.rowid, p.ref, p.amount, p.note, p.credite";
$sql.= ", ".$this->db->pdate("p.datec")." as dc"; $sql.= ", p.datec as dc";
$sql.= ", ".$this->db->pdate("p.date_trans")." as date_trans"; $sql.= ", p.date_trans as date_trans";
$sql.= ", p.method_trans, p.fk_user_trans"; $sql.= ", p.method_trans, p.fk_user_trans";
$sql.= ", ".$this->db->pdate("p.date_credit")." as date_credit"; $sql.= ", p.date_credit as date_credit";
$sql.= ", p.fk_user_credit"; $sql.= ", p.fk_user_credit";
$sql.= ", p.statut"; $sql.= ", p.statut";
$sql.= " FROM ".MAIN_DB_PREFIX."prelevement_bons as p"; $sql.= " FROM ".MAIN_DB_PREFIX."prelevement_bons as p";
@ -237,15 +237,15 @@ class BonPrelevement extends CommonObject
$this->id = $obj->rowid; $this->id = $obj->rowid;
$this->ref = $obj->ref; $this->ref = $obj->ref;
$this->amount = $obj->amount; $this->amount = $obj->amount;
$this->note = stripslashes($obj->note); $this->note = $obj->note;
$this->datec = $obj->dc; $this->datec = $this->db->jdate($obj->dc);
$this->credite = $obj->credite; $this->credite = $obj->credite;
$this->date_trans = $obj->date_trans; $this->date_trans = $this->db->jdate($obj->date_trans);
$this->method_trans = $obj->method_trans; $this->method_trans = $obj->method_trans;
$this->user_trans = $obj->fk_user_trans; $this->user_trans = $obj->fk_user_trans;
$this->date_credit = $obj->date_credit; $this->date_credit = $this->db->jdate($obj->date_credit);
$this->user_credit = $obj->fk_user_credit; $this->user_credit = $obj->fk_user_credit;
$this->statut = $obj->statut; $this->statut = $obj->statut;

View File

@ -294,8 +294,7 @@ class RejetPrelevement
function fetch($rowid) function fetch($rowid)
{ {
$sql = "SELECT ".$this->db->pdate("pr.date_rejet")." as dr"; $sql = "SELECT pr.date_rejet as dr, motif";
$sql.= ", motif";
$sql.= " FROM ".MAIN_DB_PREFIX."prelevement_rejet as pr"; $sql.= " FROM ".MAIN_DB_PREFIX."prelevement_rejet as pr";
$sql.= " WHERE pr.fk_prelevement_lignes =".$rowid; $sql.= " WHERE pr.fk_prelevement_lignes =".$rowid;
@ -307,7 +306,7 @@ class RejetPrelevement
$obj = $this->db->fetch_object(); $obj = $this->db->fetch_object();
$this->id = $rowid; $this->id = $rowid;
$this->date_rejet = $obj->dr; $this->date_rejet = $this->db->jdate($obj->dr);
$this->motif = $this->motifs[$obj->motif]; $this->motif = $this->motifs[$obj->motif];
$this->db->free(); $this->db->free();

View File

@ -117,7 +117,7 @@ function factures ($db, $year, $month, $paye)
{ {
global $bc,$conf; global $bc,$conf;
$sql = "SELECT s.nom, s.rowid as socid, f.facnumber, f.total,".$db->pdate("f.datef")." as df, f.paye, f.rowid as facid "; $sql = "SELECT s.nom, s.rowid as socid, f.facnumber, f.total, f.datef as df, f.paye, f.rowid as facid ";
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s"; $sql.= " FROM ".MAIN_DB_PREFIX."societe as s";
$sql.= ",".MAIN_DB_PREFIX."facture as f"; $sql.= ",".MAIN_DB_PREFIX."facture as f";
$sql.= " WHERE f.fk_statut = 1"; $sql.= " WHERE f.fk_statut = 1";
@ -154,7 +154,7 @@ function factures ($db, $year, $month, $paye)
print "<td><a href=\"../facture.php?facid=".$objp->facid."\">".$objp->facnumber."</a></td>\n"; print "<td><a href=\"../facture.php?facid=".$objp->facid."\">".$objp->facnumber."</a></td>\n";
if ($objp->df > 0 ) if ($objp->df > 0 )
{ {
print "<td align=\"right\">".dol_print_date($objp->df)."</td>\n"; print "<td align=\"right\">".dol_print_date($db->jdate($objp->df))."</td>\n";
} }
else else
{ {

View File

@ -216,9 +216,9 @@ class Tva extends CommonObject
$sql = "SELECT"; $sql = "SELECT";
$sql.= " t.rowid,"; $sql.= " t.rowid,";
$sql.= " ".$this->db->pdate('t.tms')." as tms,"; $sql.= " t.tms,";
$sql.= " ".$this->db->pdate('t.datep')." as datep,"; $sql.= " t.datep,";
$sql.= " ".$this->db->pdate('t.datev')." as datev,"; $sql.= " t.datev,";
$sql.= " t.amount,"; $sql.= " t.amount,";
$sql.= " t.label,"; $sql.= " t.label,";
$sql.= " t.note,"; $sql.= " t.note,";
@ -243,9 +243,9 @@ class Tva extends CommonObject
$this->id = $obj->rowid; $this->id = $obj->rowid;
$this->ref = $obj->rowid; $this->ref = $obj->rowid;
$this->tms = $obj->tms; $this->tms = $this->db->jdate($obj->tms);
$this->datep = $obj->datep; $this->datep = $this->db->jdate($obj->datep);
$this->datev = $obj->datev; $this->datev = $this->db->jdate($obj->datev);
$this->amount = $obj->amount; $this->amount = $obj->amount;
$this->label = $obj->label; $this->label = $obj->label;
$this->note = $obj->note; $this->note = $obj->note;