modified sticker reprint controller logic
This commit is contained in:
@@ -55,14 +55,18 @@ class ProductionStickerReprintController extends Controller
|
||||
|
||||
// Decide number of copies
|
||||
$copies = 1;
|
||||
|
||||
if ($sticker) {
|
||||
if ($sticker->serial_number_motor == 1) {
|
||||
$copies = 1;
|
||||
} elseif (is_null($sticker->serial_number_motor) && $sticker->serial_number_pump == 1) {
|
||||
if ($sticker->serial_number_pump == 1) {
|
||||
// If pump is selected (regardless of motor), 2 copies
|
||||
$copies = 2;
|
||||
} elseif ($sticker->serial_number_motor == 1) {
|
||||
// Only motor selected, 1 copy
|
||||
$copies = 1;
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
return '
|
||||
<html>
|
||||
<head>
|
||||
@@ -130,20 +134,6 @@ class ProductionStickerReprintController extends Controller
|
||||
</style>
|
||||
</head>
|
||||
<body>
|
||||
<table class="sticker-table">
|
||||
<tr>
|
||||
<td class="qr-cell">
|
||||
<img class="qr" src="data:image/png;base64,' . $qrBase64 . '" alt="QR" />
|
||||
</td>
|
||||
<td class="text-cell">
|
||||
<div class="text-row"><pre><span class="serial">' . htmlspecialchars($serial) . '</span> <span class="po-number">' . htmlspecialchars($productionOrder) . '</span></pre>
|
||||
</div>
|
||||
<div class="desc-row">
|
||||
' . htmlspecialchars($item->description) . '
|
||||
</div>
|
||||
</td>
|
||||
</tr>
|
||||
</table>
|
||||
<div id="print-container"></div>
|
||||
|
||||
<script>
|
||||
@@ -182,6 +172,7 @@ class ProductionStickerReprintController extends Controller
|
||||
</html>
|
||||
';
|
||||
|
||||
|
||||
// //Get sticker master data
|
||||
// $sticker = StickerMaster::where('item_id', $itemId)->first();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user