From bd37d224d5b3561a0101ca43b61092cd440b16e9 Mon Sep 17 00:00:00 2001 From: dhanabalan Date: Tue, 1 Dec 2026 14:58:10 +0530 Subject: [PATCH] Added short description logic in print panel 2 --- .../Controllers/ProductionOrderController.php | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/app/Http/Controllers/ProductionOrderController.php b/app/Http/Controllers/ProductionOrderController.php index d70773c2..0e31121d 100644 --- a/app/Http/Controllers/ProductionOrderController.php +++ b/app/Http/Controllers/ProductionOrderController.php @@ -268,7 +268,8 @@ class ProductionOrderController extends Controller $toSerial = (int) $order->to_serial_number; $itemCode = $order->item->code ?? ''; - $itemDes = $order->item->description ?? ''; + // $itemDes = $order->item->description ?? ''; + $itemDes = $order->item->short_description ?? $order->item->description ?? ''; $stickers = []; @@ -295,7 +296,16 @@ class ProductionOrderController extends Controller $serialCount = substr($currentSerial, -6); // QR format: PlantCode/ItemCode/YearMonth/Serial - $qrData = $plantCode . '/' . + // $qrData = $plantCode . '/' . + // $itemCode . '/' . + // $year . $month . '/' . + // $serialCount; + + $wareHouseNo = Plant::where('code', $plantCode)->first(); + + $wareNo = $wareHouseNo->warehouse_number ?? ''; + + $qrData = $plantCode . $wareNo . '/' . $itemCode . '/' . $year . $month . '/' . $serialCount; @@ -328,9 +338,6 @@ class ProductionOrderController extends Controller return $pdf->stream('stickers.pdf'); } - - - public function printitemserial($production_order, $plantCode) { $order = ProductionOrder::where('production_order', $production_order)->first();