|
|
@@ -84,14 +84,14 @@ class OrderPackage extends Model
|
|
|
}
|
|
|
public function fetchAllFromOracle(){
|
|
|
if(empty($this->oracleInfo))return null;
|
|
|
- $this->fetchOwnerFromOracle();
|
|
|
- $this->fetchLogisticFromOracle();
|
|
|
- $this['recipient'] = $this->oracleInfo['consigneename'];
|
|
|
- $this['order_code'] = $this->oracleInfo['orderno'];
|
|
|
+/* $this->fetchOwnerFromOracle();
|
|
|
+ $this->fetchLogisticFromOracle();*/
|
|
|
+/* $this['recipient'] = $this->oracleInfo['consigneename'];
|
|
|
+ $this['order_code'] = $this->oracleInfo['orderno'];*/
|
|
|
$this['batch_rule'] = $this->oracleInfo['descr'];
|
|
|
- $this['recipient_mobile'] = $this->oracleInfo['c_tel2']??$this->oracleInfo['c_tel1'];
|
|
|
+/* $this['recipient_mobile'] = $this->oracleInfo['c_tel2']??$this->oracleInfo['c_tel1'];
|
|
|
if(!$this['logistic_number']&&$this->oracleInfo['soreference5'])
|
|
|
- $this['logistic_number'] = $this->oracleInfo['soreference5'];
|
|
|
+ $this['logistic_number'] = $this->oracleInfo['soreference5'];*/
|
|
|
$this['batch_number'] = $this->oracleInfo['waveno']??null;
|
|
|
}
|
|
|
static public function createPackagesFromBatchCode($batchCode,$weight){
|
|
|
@@ -175,7 +175,7 @@ class OrderPackage extends Model
|
|
|
if(!$max)$max=$this['length'];
|
|
|
if(!$centre)$centre=$this['width'];
|
|
|
if(!$min)$min=$this['height'];
|
|
|
- if(!$owner_id) $owner_id = $this['owner_id'];
|
|
|
+ if(!$owner_id) $owner_id = $this['order'] ? $this['order']['owner_id'] : null;
|
|
|
if(!$owner_id) {
|
|
|
$owner = $this->fetchOwnerFromOracle();
|
|
|
$owner_id = $owner['id'];
|