diff --git a/htdocs/don/class/don.class.php b/htdocs/don/class/don.class.php index e7296e2e157..cae7adb3394 100644 --- a/htdocs/don/class/don.class.php +++ b/htdocs/don/class/don.class.php @@ -669,39 +669,42 @@ class Don extends CommonObject { $obj = $this->db->fetch_object($resql); - $this->id = $obj->rowid; - $this->ref = $obj->rowid; - $this->datec = $this->db->jdate($obj->datec); - $this->date_valid = $this->db->jdate($obj->date_valid); - $this->datem = $this->db->jdate($obj->datem); - $this->date = $this->db->jdate($obj->datedon); - $this->firstname = $obj->firstname; - $this->lastname = $obj->lastname; - $this->societe = $obj->societe; - $this->statut = $obj->fk_statut; - $this->address = $obj->address; - $this->town = $obj->town; - $this->zip = $obj->zip; - $this->town = $obj->town; - $this->country_id = $obj->fk_country; - $this->country_code = $obj->country_code; - $this->country = $obj->country; - $this->country_olddata= $obj->country_olddata; // deprecated - $this->email = $obj->email; - $this->phone = $obj->phone; - $this->phone_mobile = $obj->phone_mobile; - $this->project = $obj->project_ref; - $this->fk_projet = $obj->fk_project; // deprecated - $this->fk_project = $obj->fk_project; - $this->public = $obj->public; - $this->modepaymentid = $obj->fk_payment; - $this->modepaymentcode = $obj->payment_code; - $this->modepayment = $obj->payment_label; - $this->paid = $obj->paid; - $this->amount = $obj->amount; - $this->note_private = $obj->note_private; - $this->note_public = $obj->note_public; - $this->modelpdf = $obj->model_pdf; + $this->id = $obj->rowid; + $this->ref = $obj->rowid; + $this->datec = $this->db->jdate($obj->datec); + $this->date_creation = $this->db->jdate($obj->datec); + $this->date_valid = $this->db->jdate($obj->date_valid); + $this->date_validation = $this->db->jdate($obj->date_valid); + $this->datem = $this->db->jdate($obj->datem); + $this->date_modification= $this->db->jdate($obj->datem); + $this->date = $this->db->jdate($obj->datedon); + $this->firstname = $obj->firstname; + $this->lastname = $obj->lastname; + $this->societe = $obj->societe; + $this->statut = $obj->fk_statut; + $this->address = $obj->address; + $this->town = $obj->town; + $this->zip = $obj->zip; + $this->town = $obj->town; + $this->country_id = $obj->fk_country; + $this->country_code = $obj->country_code; + $this->country = $obj->country; + $this->country_olddata = $obj->country_olddata; // deprecated + $this->email = $obj->email; + $this->phone = $obj->phone; + $this->phone_mobile = $obj->phone_mobile; + $this->project = $obj->project_ref; + $this->fk_projet = $obj->fk_project; // deprecated + $this->fk_project = $obj->fk_project; + $this->public = $obj->public; + $this->modepaymentid = $obj->fk_payment; + $this->modepaymentcode = $obj->payment_code; + $this->modepayment = $obj->payment_label; + $this->paid = $obj->paid; + $this->amount = $obj->amount; + $this->note_private = $obj->note_private; + $this->note_public = $obj->note_public; + $this->modelpdf = $obj->model_pdf; // Retreive all extrafield // fetch optionals attributes and labels