|
@@ -31,7 +31,7 @@ class StoreOrder extends BaseModel
|
|
|
return $orders;
|
|
|
}
|
|
|
|
|
|
-
|
|
|
+
|
|
|
public function paymentMethod(){
|
|
|
return $this->hasOne(PaymentMethod::class, 'id', 'payment_method_id');
|
|
|
}
|
|
@@ -81,7 +81,7 @@ class StoreOrder extends BaseModel
|
|
|
}
|
|
|
return $data;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
|
|
|
public function testsRequestedInHumanReadable(){
|
|
|
$data = [];
|
|
@@ -113,16 +113,16 @@ class StoreOrder extends BaseModel
|
|
|
$detail = json_decode($this->detail_json);
|
|
|
$selectedOptions = json_decode(@$detail->selected_options);
|
|
|
if(!$selectedOptions) return 0;
|
|
|
- if(!$selectedOptions->partner_test_discount_amount) return 0;
|
|
|
- return floatval($selectedOptions->partner_test_discount_amount);
|
|
|
+ if(!@$selectedOptions->partner_test_discount_amount) return 0;
|
|
|
+ return floatval(@$selectedOptions->partner_test_discount_amount);
|
|
|
}
|
|
|
|
|
|
public function getPartnerEmail(){
|
|
|
$detail = json_decode($this->detail_json);
|
|
|
$selectedOptions = json_decode(@$detail->selected_options);
|
|
|
if(!$selectedOptions) return null;
|
|
|
- if(!$selectedOptions->partner_email) return null;
|
|
|
- return $selectedOptions->partner_email;
|
|
|
+ if(!@$selectedOptions->partner_email) return null;
|
|
|
+ return @$selectedOptions->partner_email;
|
|
|
}
|
|
|
|
|
|
|
|
@@ -163,5 +163,5 @@ class StoreOrder extends BaseModel
|
|
|
}
|
|
|
return null;
|
|
|
}
|
|
|
-
|
|
|
+
|
|
|
}
|