Merge pull request #18723 from PyroShape/develop

Explicit date_creation instead of date
This commit is contained in:
Laurent Destailleur 2021-09-28 13:34:44 +02:00 committed by GitHub
commit 89ac5a5be6
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -112,6 +112,7 @@ class CommandeFournisseur extends CommonOrder
public $socid;
public $fourn_id;
public $date;
public $date_creation;
public $date_valid;
public $date_approve;
public $date_approve2; // Used when SUPPLIER_ORDER_3_STEPS_TO_BE_APPROVED is set
@ -375,11 +376,16 @@ class CommandeFournisseur extends CommonOrder
$this->total_localtax1 = $obj->localtax1;
$this->total_localtax2 = $obj->localtax2;
$this->total_ttc = $obj->total_ttc;
$this->date = $this->db->jdate($obj->date_creation);
$this->date_creation = $this->db->jdate($obj->date_creation);
$this->date_valid = $this->db->jdate($obj->date_valid);
$this->date_approve = $this->db->jdate($obj->date_approve);
$this->date_approve2 = $this->db->jdate($obj->date_approve2);
$this->date_commande = $this->db->jdate($obj->date_commande); // date we make the order to supplier
if (isset($obj->date_commande)) {
$this->date = $this->date_commande;
} else {
$this->date = $this->date_creation;
}
$this->date_livraison = $this->db->jdate($obj->delivery_date); // deprecated
$this->delivery_date = $this->db->jdate($obj->delivery_date);
$this->remise_percent = $obj->remise_percent;
@ -3295,7 +3301,6 @@ class CommandeFournisseur extends CommonOrder
$keysinwishednotindelivered = array_diff(array_keys($qtywished), array_keys($qtydelivered)); // To check we also have same number of keys
$keysindeliverednotinwished = array_diff(array_keys($qtydelivered), array_keys($qtywished)); // To check we also have same number of keys
/*var_dump(array_keys($qtydelivered));
var_dump(array_keys($qtywished));
var_dump($diff_array);
var_dump($keysinwishednotindelivered);