Qual: Removed pdate

This commit is contained in:
Laurent Destailleur 2010-05-08 19:31:44 +00:00
parent bfdd9087ba
commit f7e30a0a5b
4 changed files with 24 additions and 24 deletions

View File

@ -349,8 +349,8 @@ class AdresseLivraison
global $langs;
global $conf;
$sql = 'SELECT a.rowid, a.fk_societe, a.label, a.nom, a.address, a.datec as date_creation';
$sql .= ', a.tms as date_update';
$sql = 'SELECT a.rowid, a.fk_societe, a.label, a.nom, a.address,'.$this->db->pdate('a.datec').' as dc';
$sql .= ','. $this->db->pdate('a.tms').' as date_update';
$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 .= ' FROM '.MAIN_DB_PREFIX.'societe_adresse_livraison as a';
@ -366,17 +366,17 @@ class AdresseLivraison
$this->id = $obj->rowid;
$this->socid = $obj->fk_societe;
$this->date_update = $this->db->jdate($obj->date_update);
$this->date_creation = $this->db->jdate($obj->date_creation);
$this->date_update = $obj->date_update;
$this->date_creation = $obj->date_creation;
$this->label = $obj->label;
$this->nom = $obj->nom;
$this->adresse = $obj->address; // TODO obsolete
$this->address = $obj->address;
$this->label = stripslashes($obj->label);
$this->nom = stripslashes($obj->nom);
$this->adresse = stripslashes($obj->address); // TODO obsolete
$this->address = stripslashes($obj->address);
$this->cp = $obj->cp;
$this->ville = $obj->ville;
$this->adresse_full = $obj->address . "\n". $obj->cp . ' '. $obj->ville;
$this->full_address = $obj->address . "\n". $obj->cp . ' '. $obj->ville; //TODO obsolete
$this->ville = stripslashes($obj->ville);
$this->adresse_full = stripslashes($obj->address) . "\n". $obj->cp . ' '. stripslashes($obj->ville);
$this->full_address = stripslashes($obj->address) . "\n". $obj->cp . ' '. stripslashes($obj->ville); //TODO obsolete
$this->pays_id = $obj->fk_pays;
$this->pays_code = $obj->fk_pays?$obj->pays_code:'';

View File

@ -179,9 +179,9 @@ class Mailing extends CommonObject
$sql .= ", m.email_from, m.email_replyto, m.email_errorsto";
$sql .= ", m.statut, m.nbemail";
$sql .= ", m.fk_user_creat, m.fk_user_valid";
$sql .= ", ".$this->db->pdate("m.date_creat") . " as date_creat";
$sql .= ", ".$this->db->pdate("m.date_valid") . " as date_valid";
$sql .= ", ".$this->db->pdate("m.date_envoi") . " as date_envoi";
$sql .= ", m.date_creat";
$sql .= ", m.date_valid";
$sql .= ", m.date_envoi";
$sql .= " FROM ".MAIN_DB_PREFIX."mailing as m";
$sql .= " WHERE m.rowid = ".$rowid;
@ -210,9 +210,9 @@ class Mailing extends CommonObject
$this->user_creat = $obj->fk_user_creat;
$this->user_valid = $obj->fk_user_valid;
$this->date_creat = $obj->date_creat;
$this->date_valid = $obj->date_valid;
$this->date_envoi = $obj->date_envoi;
$this->date_creat = $this->db->jdate($obj->date_creat);
$this->date_valid = $this->db->jdate($obj->date_valid);
$this->date_envoi = $this->db->jdate($obj->date_envoi);
return 1;
}

View File

@ -1379,7 +1379,7 @@ class Propal extends CommonObject
$ga = array();
$sql = "SELECT s.nom, s.rowid, p.rowid as propalid, p.fk_statut, p.total_ht, p.ref, p.remise, ";
$sql.= " ".$this->db->pdate("p.datep")." as dp, ".$this->db->pdate("p.fin_validite")." as datelimite";
$sql.= " p.datep as dp, p.fin_validite as datelimite";
$sql.= " FROM ".MAIN_DB_PREFIX."societe as s, ".MAIN_DB_PREFIX."propal as p, ".MAIN_DB_PREFIX."c_propalst as c";
$sql.= " WHERE p.entity = ".$conf->entity;
$sql.= " AND p.fk_soc = s.rowid";

View File

@ -2190,9 +2190,9 @@ class Commande extends CommonObject
*/
function info($id)
{
$sql = 'SELECT c.rowid, '.$this->db->pdate('date_creation').' as datec,';
$sql.= ' '.$this->db->pdate('date_valid').' as datev,';
$sql.= ' '.$this->db->pdate('date_cloture').' as datecloture,';
$sql = 'SELECT c.rowid, date_creation as datec,';
$sql.= ' date_valid as datev,';
$sql.= ' date_cloture as datecloture,';
$sql.= ' fk_user_author, fk_user_valid, fk_user_cloture';
$sql.= ' FROM '.MAIN_DB_PREFIX.'commande as c';
$sql.= ' WHERE c.rowid = '.$id;
@ -2224,9 +2224,9 @@ class Commande extends CommonObject
$this->user_cloture = $cluser;
}
$this->date_creation = $obj->datec;
$this->date_validation = $obj->datev;
$this->date_cloture = $obj->datecloture;
$this->date_creation = $this->db->jdate($obj->datec);
$this->date_validation = $this->db->jdate($obj->datev);
$this->date_cloture = $this->db->jdate($obj->datecloture);
}
$this->db->free($result);