1
0
forked from poc/pds

Added logs in production order controller

This commit is contained in:
dhanabalan
2026-05-11 10:13:59 +05:30
parent dd57d14f79
commit b183a1d350

View File

@@ -69,12 +69,27 @@ class ProductionOrderController extends Controller
}
public function printpanel($production_order, $plantCode){
\Log::info('Print Panel Started', [
'production_order' => $production_order,
'plantCode' => $plantCode,
]);
$order = ProductionOrder::where('production_order', $production_order)->first();
$wareHouseNo = Plant::where('code', $plantCode)->first();
$wareNo = $wareHouseNo->warehouse_number;
\Log::info('Plant Data', [
'plant' => $wareHouseNo ? $wareHouseNo->toArray() : null,
]);
\Log::info('Warehouse Number', [
'warehouse_number' => $wareNo,
'final_code' => $plantCode . $wareNo,
]);
if (!$order) {
abort(404, 'Production Order not found');
}