minor changes

This commit is contained in:
Omair Saleh
2019-04-12 22:33:14 +08:00
parent 243990d228
commit c564639ff5
@@ -6,6 +6,7 @@ namespace App\Classes\Modules\Orders\Services;
use App\Classes\Constants;
use App\Models\CustomIssues;
use App\Models\Order;
use App\Models\Warehouse;
use Carbon\Carbon;
use Illuminate\Support\Facades\DB;
use Illuminate\Support\Collection;
@@ -34,7 +35,7 @@ class ListsOrderHistory
$history->push(['date' => $step->updated_at->format('d-m-Y H:i'), 'description' => 'Your Order has been loaded into container']);
break;
case Constants::ORDER_WAREHOUSE_RECEIVING_STEP:
$history->push(['date' => $step->updated_at->format('d-m-Y H:i'), 'description' => 'Arrived at China\'s warehouse on: ['.Carbon::parse($order->receiveNotes()->firstOrFail()->receive_date)->format('d-m-Y').']']);
$history->push(['date' => $step->updated_at->format('d-m-Y H:i'), 'description' => 'Arrived at '.Warehouse::where($order->warehouse_id)->get()->name.'warehouse on china on: ['.Carbon::parse($order->receiveNotes()->firstOrFail()->receive_date)->format('d-m-Y').']']);
break;
case Constants::ORDER_WAREHOUSE_PACKING_STEP:
$packages = $order->packingLists()->firstOrFail()->packages()->selectRaw(DB::raw('((width/100) * (height/100) * (length/100)) * quantity as cbm, quantity'))->get();