Added ware house for qr data in controller
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Has been cancelled
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Has been cancelled
This commit is contained in:
@@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
namespace App\Http\Controllers;
|
namespace App\Http\Controllers;
|
||||||
|
|
||||||
|
use App\Models\Plant;
|
||||||
use App\Models\ProductionOrder;
|
use App\Models\ProductionOrder;
|
||||||
use Carbon\Carbon;
|
use Carbon\Carbon;
|
||||||
use Illuminate\Http\Request;
|
use Illuminate\Http\Request;
|
||||||
@@ -70,6 +71,10 @@ class ProductionOrderController extends Controller
|
|||||||
public function printpanel($production_order, $plantCode){
|
public function printpanel($production_order, $plantCode){
|
||||||
$order = ProductionOrder::where('production_order', $production_order)->first();
|
$order = ProductionOrder::where('production_order', $production_order)->first();
|
||||||
|
|
||||||
|
$wareHouseNo = Plant::where('code', $plantCode)->first();
|
||||||
|
|
||||||
|
$wareNo = $wareHouseNo->warehouse_number;
|
||||||
|
|
||||||
if (!$order) {
|
if (!$order) {
|
||||||
abort(404, 'Production Order not found');
|
abort(404, 'Production Order not found');
|
||||||
}
|
}
|
||||||
@@ -90,10 +95,9 @@ class ProductionOrderController extends Controller
|
|||||||
$serial = str_pad($i, 6, '0', STR_PAD_LEFT);
|
$serial = str_pad($i, 6, '0', STR_PAD_LEFT);
|
||||||
$serialCount = substr(str_pad($i, 6, '0', STR_PAD_LEFT), -6);
|
$serialCount = substr(str_pad($i, 6, '0', STR_PAD_LEFT), -6);
|
||||||
|
|
||||||
$qrData = $plantCode . '/' . $itemCode . '/' . $year.$month . '/' . $serialCount;
|
$qrData = $plantCode . $wareNo . '/' . $itemCode . '/' . $year.$month . '/' . $serialCount;
|
||||||
|
|
||||||
$panel = $plantCode . '/' . $itemCode . '/' . $year.$month . '/' . $serialCount;
|
|
||||||
|
|
||||||
|
$panel = $plantCode . $wareNo . '/' . $itemCode . '/' . $year.$month . '/' . $serialCount;
|
||||||
|
|
||||||
$qrCode = new QrCode($qrData);
|
$qrCode = new QrCode($qrData);
|
||||||
$output = new Output\Png;
|
$output = new Output\Png;
|
||||||
|
|||||||
Reference in New Issue
Block a user