large changes

This commit is contained in:
Omair Saleh
2019-04-12 22:19:26 +08:00
parent 074404ad16
commit fd2f6f2329
@@ -48,6 +48,7 @@ class ListsOrderHistory
foreach ($shippingSchedules as $schedule){
if($schedule->status === "2"){
$customeIssue = CustomIssues::where('schedule_id', $schedule->id)->first();
dd($customeIssue);
if($customeIssue !== null){
$history->push(['date' => $step->updated_at->format('d-m-Y H:i'), 'description' => '[ETD: '.$schedule->ETD.', ETA: '.$schedule->ETA.'] Shipping Schedule failed due to: '.$customeIssue->remark]);
} else {
@@ -79,7 +80,7 @@ class ListsOrderHistory
$shippingSchedules = $shippingArrangment->shippingSchedule()->get();
foreach ($shippingSchedules as $schedule){
if($schedule->status === "2"){
$customeIssue = CustomIssues::where('schedule_id', $schedule->id)->firstOrFail();
$customeIssue = CustomIssues::where('schedule_id', $schedule->id)->first();
if($customeIssue !== null){
$history->push(['date' => $step->updated_at->format('d-m-Y H:i'), 'description' => '[ETD: '.$schedule->ETD.', ETA: '.$schedule->ETA.'] Shipping Schedule failed due to: '.$customeIssue->remark]);
} else {