From ce65c6812538212278fd7fac7dc73904108c44a1 Mon Sep 17 00:00:00 2001 From: dhanabalan Date: Tue, 3 Feb 2026 21:15:13 +0530 Subject: [PATCH] Added updated_by name on updated invoice for scanned serial numbers --- .../Pages/CreateInvoiceValidation.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/Filament/Resources/InvoiceValidationResource/Pages/CreateInvoiceValidation.php b/app/Filament/Resources/InvoiceValidationResource/Pages/CreateInvoiceValidation.php index db6a177..61fe91d 100644 --- a/app/Filament/Resources/InvoiceValidationResource/Pages/CreateInvoiceValidation.php +++ b/app/Filament/Resources/InvoiceValidationResource/Pages/CreateInvoiceValidation.php @@ -790,6 +790,8 @@ class CreateInvoiceValidation extends CreateRecord ->send(); $this->dispatch('playNotificationSound'); + InvoiceValidation::where('invoice_number', $invoiceNumber)->where('plant_id', $plantId)->update(['updated_by' => $operatorName]); // 'updated_at' => now(), + // Update total quantity in the form $totalQuantity = InvoiceValidation::where('invoice_number', $invoiceNumber)->where('plant_id', $plantId)->count(); $scannedQuantity = InvoiceValidation::where('invoice_number', $invoiceNumber)->whereNotNull('serial_number')->where('serial_number', '!=', '')->where('plant_id', $plantId)->count(); @@ -1266,6 +1268,8 @@ class CreateInvoiceValidation extends CreateRecord $this->dispatch('playNotificationSound'); + InvoiceValidation::where('invoice_number', $invoiceNumber)->where('plant_id', $plantId)->update(['updated_by' => $operatorName]); // 'updated_at' => now(), + // Update total quantity in the form $totalQuantity = InvoiceValidation::where('invoice_number', $invoiceNumber)->where('plant_id', $plantId)->count(); $scannedQuantity = InvoiceValidation::where('invoice_number', $invoiceNumber)->where('scanned_status', 'Scanned')->where('plant_id', $plantId)->count();