large changes

This commit is contained in:
Omair Saleh
2019-04-12 18:28:30 +08:00
parent a7cb7b5eb6
commit 9d3eb5e8b9
@@ -47,8 +47,12 @@ class ListsOrderHistory
$shippingSchedules = $shippingArrangment->shippingSchedule()->get();
foreach ($shippingSchedules as $schedule){
if($schedule->status === "2"){
$customeIssue = CustomIssues::where('schedule_id', $schedule->id)->firstOrFail();
$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]);
$customeIssue = CustomIssues::where('schedule_id', $schedule->id)->first();
if($customeIssue){
$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 {
$history->push(['date' => $step->updated_at->format('d-m-Y H:i'), 'description' => '[ETD: '.$schedule->ETD.', ETA: '.$schedule->ETA.'] Shipping Schedule failed']);
}
} else {
$history->push(['date' => $step->updated_at->format('d-m-Y H:i'), 'description' => '[ETD: '.$schedule->ETD.', ETA: '.$schedule->ETA.'] Your Order has been scheduled for shipping ']);
}
@@ -76,7 +80,11 @@ class ListsOrderHistory
foreach ($shippingSchedules as $schedule){
if($schedule->status === "2"){
$customeIssue = CustomIssues::where('schedule_id', $schedule->id)->firstOrFail();
$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]);
if($customeIssue){
$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 {
$history->push(['date' => $step->updated_at->format('d-m-Y H:i'), 'description' => '[ETD: '.$schedule->ETD.', ETA: '.$schedule->ETA.'] Shipping Schedule failed']);
}
} else {
$history->push(['date' => $step->updated_at->format('d-m-Y H:i'), 'description' => '[ETD: '.$schedule->ETD.', ETA: '.$schedule->ETA.'] Your Order has been scheduled for shipping ']);
}