Merge pull request 'changed month logic in pallet print' (#813) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 23s
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 23s
Reviewed-on: #813
This commit was merged in pull request #813.
This commit is contained in:
@@ -163,8 +163,6 @@ class PalletPrintController extends Controller
|
|||||||
public function print(Request $request, $pallet, $plant)
|
public function print(Request $request, $pallet, $plant)
|
||||||
{
|
{
|
||||||
|
|
||||||
// $customerPo = $request->query('customer');
|
|
||||||
|
|
||||||
$customerPoMasterId = WireMasterPacking::where('plant_id', $plant)
|
$customerPoMasterId = WireMasterPacking::where('plant_id', $plant)
|
||||||
->where('wire_packing_number', $pallet)
|
->where('wire_packing_number', $pallet)
|
||||||
->value('customer_po_master_id');
|
->value('customer_po_master_id');
|
||||||
@@ -211,7 +209,7 @@ class PalletPrintController extends Controller
|
|||||||
|
|
||||||
$index = $completedPallets->search($pallet);
|
$index = $completedPallets->search($pallet);
|
||||||
|
|
||||||
$currentPalletNo = ($index !== false) ? $index + 1 : 1;
|
$currentPalletNo = ($index !== false) ? $index + 1 : 0;
|
||||||
|
|
||||||
$boxLabel = $currentPalletNo.'/'.$totalBoxes;
|
$boxLabel = $currentPalletNo.'/'.$totalBoxes;
|
||||||
|
|
||||||
@@ -223,11 +221,18 @@ class PalletPrintController extends Controller
|
|||||||
|
|
||||||
$plantAddress = Plant::where('id', $plant)->value('address');
|
$plantAddress = Plant::where('id', $plant)->value('address');
|
||||||
|
|
||||||
|
$scannedAt = WireMasterPacking::where('plant_id', $plant)
|
||||||
|
->where('wire_packing_number', $pallet)
|
||||||
|
->value('scanned_at');
|
||||||
|
|
||||||
$pdf = Pdf::loadView('pdf.wire-pallet', [
|
$pdf = Pdf::loadView('pdf.wire-pallet', [
|
||||||
'product' => 'Submersible Winding Wire',
|
'product' => 'Submersible Winding Wire',
|
||||||
'plantName' => $plantName,
|
'plantName' => $plantName,
|
||||||
'plantAddress' => $plantAddress,
|
'plantAddress' => $plantAddress,
|
||||||
'monthYear' => now()->format('M-y'),
|
// 'monthYear' => now()->format('M-y'),
|
||||||
|
'monthYear' => $scannedAt
|
||||||
|
? \Carbon\Carbon::parse($scannedAt)->format('M-y')
|
||||||
|
: '',
|
||||||
'branch' => '',
|
'branch' => '',
|
||||||
'customerCode' => $customerCode,
|
'customerCode' => $customerCode,
|
||||||
'customerName' => $customerName,
|
'customerName' => $customerName,
|
||||||
|
|||||||
Reference in New Issue
Block a user