Added ware house for qr data in controller
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Has been cancelled

This commit is contained in:
dhanabalan
2026-05-08 15:26:18 +05:30
parent 71e89c7927
commit dd57d14f79

View File

@@ -2,6 +2,7 @@
namespace App\Http\Controllers;
use App\Models\Plant;
use App\Models\ProductionOrder;
use Carbon\Carbon;
use Illuminate\Http\Request;
@@ -70,6 +71,10 @@ class ProductionOrderController extends Controller
public function printpanel($production_order, $plantCode){
$order = ProductionOrder::where('production_order', $production_order)->first();
$wareHouseNo = Plant::where('code', $plantCode)->first();
$wareNo = $wareHouseNo->warehouse_number;
if (!$order) {
abort(404, 'Production Order not found');
}
@@ -90,10 +95,9 @@ class ProductionOrderController extends Controller
$serial = str_pad($i, 6, '0', STR_PAD_LEFT);
$serialCount = substr(str_pad($i, 6, '0', STR_PAD_LEFT), -6);
$qrData = $plantCode . '/' . $itemCode . '/' . $year.$month . '/' . $serialCount;
$panel = $plantCode . '/' . $itemCode . '/' . $year.$month . '/' . $serialCount;
$qrData = $plantCode . $wareNo . '/' . $itemCode . '/' . $year.$month . '/' . $serialCount;
$panel = $plantCode . $wareNo . '/' . $itemCode . '/' . $year.$month . '/' . $serialCount;
$qrCode = new QrCode($qrData);
$output = new Output\Png;