|
@@ -8,20 +8,24 @@
|
|
|
}
|
|
|
?>
|
|
|
|
|
|
- <div id="practice-shipment" class="p-3 mcp-theme-1">
|
|
|
+ <div id="practice-shipment" class="p-3 mcp-theme-1 {{in_array($shipment->status, ['CREATED', 'PRINTED', 'BEING_PICKED', 'PICKED', 'BEING_SCANNED', 'SCANNED']) ? 'pick-list' : 'order-slip' }}">
|
|
|
<div class="card">
|
|
|
<div class="card-header px-3 py-3 d-flex align-items-center bg-white">
|
|
|
- <strong class="font-size-14">
|
|
|
+ <strong class="font-size-14 only-pick-list">
|
|
|
Shipment
|
|
|
</strong>
|
|
|
- <span class="text-sm text-secondary ml-2">
|
|
|
+ <span class="text-sm text-secondary ml-2 only-pick-list">
|
|
|
(Created: {{friendlier_date_time($shipment->created_at)}})
|
|
|
</span>
|
|
|
@if($shipment->status === 'CANCELLED')
|
|
|
<div class="ml-5 font-weight-bold text-danger on-hover-opaque">-- CANCELLED --</div>
|
|
|
@endif
|
|
|
<div class="ml-auto d-inline-flex align-items-center only-screen">
|
|
|
- <button id="print-shipment" class="btn btn-sm btn-info">Generate PDF</button>
|
|
|
+ @if(in_array($shipment->status, ['CREATED', 'PRINTED', 'BEING_PICKED', 'PICKED', 'BEING_SCANNED', 'SCANNED']))
|
|
|
+ <button id="print-shipment" class="btn btn-sm btn-info">Print Pick-List</button>
|
|
|
+ @elseif(in_array($shipment->status, ['BEING_FULFILLED', 'FULFILLED', 'DISPATCHED']))
|
|
|
+ <button id="print-shipment-order-slip" class="btn btn-sm btn-info">Print Order-Slip</button>
|
|
|
+ @endif
|
|
|
<div moe relative class="d-block ml-3">
|
|
|
<a start show class="btn btn-default border btn-sm text-secondary">Cancel Shipment</a>
|
|
|
<form url="/api/shipment/setStatus" right>
|
|
@@ -36,6 +40,9 @@
|
|
|
</form>
|
|
|
</div>
|
|
|
</div>
|
|
|
+ <div class="only-print only-order-slip text-center flex-grow-1">
|
|
|
+ <img src="/img/dialmd-logo.png" style="height: 60px;" class="mx-auto d-block">
|
|
|
+ </div>
|
|
|
</div>
|
|
|
<div class="only-screen">
|
|
|
<div class="card-header px-3 py-3 d-flex align-items-center bg-light">
|
|
@@ -53,7 +60,7 @@
|
|
|
</div>
|
|
|
</div>
|
|
|
|
|
|
- <div class="card-header p-3 only-print bg-white">
|
|
|
+ <div class="card-header p-3 only-print bg-white only-pick-list">
|
|
|
<div class="d-flex justify-content-center">
|
|
|
<div>
|
|
|
<?php
|
|
@@ -84,7 +91,9 @@
|
|
|
@if($shipment->supplyOrders && count($shipment->supplyOrders))
|
|
|
<thead>
|
|
|
<tr class="">
|
|
|
+ @if(in_array($shipment->status, ['CREATED', 'PRINTED', 'BEING_PICKED', 'PICKED', 'BEING_SCANNED', 'SCANNED']))
|
|
|
<th class="px-2 text-nowrap text-secondary border-bottom-0 only-print">Picked</th>
|
|
|
+ @endif
|
|
|
<th class="px-2 text-nowrap text-secondary border-bottom-0">Item</th>
|
|
|
<th class="px-2 text-nowrap text-secondary border-bottom-0">IMEI</th>
|
|
|
<th class="px-2 text-nowrap text-secondary border-bottom-0">Lot #</th>
|
|
@@ -96,7 +105,9 @@
|
|
|
<tbody>
|
|
|
@foreach($shipment->supplyOrders as $iSupplyOrder)
|
|
|
<tr class="">
|
|
|
+ @if(in_array($shipment->status, ['CREATED', 'PRINTED', 'BEING_PICKED', 'PICKED', 'BEING_SCANNED', 'SCANNED']))
|
|
|
<td class="px-2 only-print"> </td>
|
|
|
+ @endif
|
|
|
<td class="px-2">{{ $iSupplyOrder->product->title }}
|
|
|
<span class="text-sm text-secondary ml-2">
|
|
|
(Created: {{friendlier_date_time($iSupplyOrder->created_at)}})
|
|
@@ -341,6 +352,14 @@
|
|
|
$('#print-shipment')
|
|
|
.off('click')
|
|
|
.on('click', function () {
|
|
|
+ $('body').addClass('pick-list').removeClass('order-slip');
|
|
|
+ window.print();
|
|
|
+ });
|
|
|
+
|
|
|
+ $('#print-shipment-order-slip')
|
|
|
+ .off('click')
|
|
|
+ .on('click', function () {
|
|
|
+ $('body').addClass('order-slip').removeClass('pick-list');
|
|
|
window.print();
|
|
|
});
|
|
|
}
|