129 lines
4.6 KiB
PHP
129 lines
4.6 KiB
PHP
|
|
@extends('admin.layouts.app')
|
||
|
|
|
||
|
|
@section('page-title', 'Shipment Preview')
|
||
|
|
|
||
|
|
@section('content')
|
||
|
|
|
||
|
|
<div class="container py-4">
|
||
|
|
|
||
|
|
<div class="card shadow-sm border-0">
|
||
|
|
<div class="card-header bg-primary text-white">
|
||
|
|
<h5 class="mb-0">
|
||
|
|
<i class="bi bi-box-seam me-2"></i>
|
||
|
|
Shipment Preview: {{ $shipment->shipment_id }}
|
||
|
|
</h5>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<div class="card-body">
|
||
|
|
|
||
|
|
<!-- Dummy Info -->
|
||
|
|
<div class="alert alert-info">
|
||
|
|
<strong>{{ $dummyData['title'] }}</strong><br>
|
||
|
|
Generated On: {{ $dummyData['generated_on'] }} <br>
|
||
|
|
Note: {{ $dummyData['note'] }}
|
||
|
|
</div>
|
||
|
|
|
||
|
|
<!-- Shipment Basic Details -->
|
||
|
|
<h5 class="fw-bold mt-3">Shipment Details</h5>
|
||
|
|
<table class="table table-bordered">
|
||
|
|
<tr>
|
||
|
|
<th>Shipment ID</th>
|
||
|
|
<td>{{ $shipment->shipment_id }}</td>
|
||
|
|
</tr>
|
||
|
|
<tr>
|
||
|
|
<th>Origin</th>
|
||
|
|
<td>{{ $shipment->origin }}</td>
|
||
|
|
</tr>
|
||
|
|
<tr>
|
||
|
|
<th>Destination</th>
|
||
|
|
<td>{{ $shipment->destination }}</td>
|
||
|
|
</tr>
|
||
|
|
<tr>
|
||
|
|
<th>Status</th>
|
||
|
|
<td>{{ ucfirst($shipment->status) }}</td>
|
||
|
|
</tr>
|
||
|
|
<tr>
|
||
|
|
<th>Date</th>
|
||
|
|
<td>{{ \Carbon\Carbon::parse($shipment->shipment_date)->format('d M Y') }}</td>
|
||
|
|
</tr>
|
||
|
|
</table>
|
||
|
|
|
||
|
|
<!-- Orders in Shipment -->
|
||
|
|
<h5 class="fw-bold mt-4">Orders Contained in Shipment</h5>
|
||
|
|
|
||
|
|
@if($shipment->orders->isEmpty())
|
||
|
|
<p class="text-muted">No orders found.</p>
|
||
|
|
@else
|
||
|
|
<div class="table-responsive">
|
||
|
|
<table class="table table-hover table-striped">
|
||
|
|
<thead class="table-dark">
|
||
|
|
<tr>
|
||
|
|
<th>Order ID</th>
|
||
|
|
<th>Origin</th>
|
||
|
|
<th>Destination</th>
|
||
|
|
<th>CTN</th>
|
||
|
|
<th>QTY</th>
|
||
|
|
<th>TTL/QTY</th>
|
||
|
|
<th>KG</th>
|
||
|
|
<th>Amount</th>
|
||
|
|
</tr>
|
||
|
|
</thead>
|
||
|
|
<tbody>
|
||
|
|
@foreach($shipment->orders as $order)
|
||
|
|
<tr>
|
||
|
|
<td>{{ $order->order_id }}</td>
|
||
|
|
<td>{{ $order->origin }}</td>
|
||
|
|
<td>{{ $order->destination }}</td>
|
||
|
|
<td>{{ $order->ctn }}</td>
|
||
|
|
<td>{{ $order->qty }}</td>
|
||
|
|
<td>{{ $order->ttl_qty }}</td>
|
||
|
|
<td>{{ $order->ttl_kg }}</td>
|
||
|
|
<td>₹{{ number_format($order->ttl_amount, 2) }}</td>
|
||
|
|
</tr>
|
||
|
|
@endforeach
|
||
|
|
</tbody>
|
||
|
|
</table>
|
||
|
|
</div>
|
||
|
|
@endif
|
||
|
|
|
||
|
|
<!-- Shipment Totals -->
|
||
|
|
<h5 class="fw-bold mt-4">Shipment Totals</h5>
|
||
|
|
<table class="table table-bordered">
|
||
|
|
<tr>
|
||
|
|
<th>Total CTN</th>
|
||
|
|
<td>{{ $shipment->total_ctn }}</td>
|
||
|
|
</tr>
|
||
|
|
<tr>
|
||
|
|
<th>Total Quantity</th>
|
||
|
|
<td>{{ $shipment->total_qty }}</td>
|
||
|
|
</tr>
|
||
|
|
<tr>
|
||
|
|
<th>Total TTL Quantity</th>
|
||
|
|
<td>{{ $shipment->total_ttl_qty }}</td>
|
||
|
|
</tr>
|
||
|
|
<tr>
|
||
|
|
<th>Total CBM</th>
|
||
|
|
<td>{{ $shipment->total_cbm }}</td>
|
||
|
|
</tr>
|
||
|
|
<tr>
|
||
|
|
<th>Total KG</th>
|
||
|
|
<td>{{ $shipment->total_kg }}</td>
|
||
|
|
</tr>
|
||
|
|
<tr>
|
||
|
|
<th>Total Amount</th>
|
||
|
|
<td class="fw-bold text-success">
|
||
|
|
₹{{ number_format($shipment->total_amount, 2) }}
|
||
|
|
</td>
|
||
|
|
</tr>
|
||
|
|
</table>
|
||
|
|
|
||
|
|
<a href="{{ route('admin.shipments') }}" class="btn btn-secondary mt-3">
|
||
|
|
← Back to Shipments
|
||
|
|
</a>
|
||
|
|
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
</div>
|
||
|
|
|
||
|
|
@endsection
|