From 317e877255bb1487fe38530780d9ddfba777338b Mon Sep 17 00:00:00 2001 From: dhanabalan Date: Sat, 8 Nov 2025 16:20:00 +0530 Subject: [PATCH] Refactor duplicate QR code messages for consistency in wording and clarity --- app/Filament/Resources/InvoiceOutValidationResource.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/app/Filament/Resources/InvoiceOutValidationResource.php b/app/Filament/Resources/InvoiceOutValidationResource.php index 72cd224..547dbdb 100644 --- a/app/Filament/Resources/InvoiceOutValidationResource.php +++ b/app/Filament/Resources/InvoiceOutValidationResource.php @@ -223,7 +223,7 @@ class InvoiceOutValidationResource extends Resource $uniqueKey = $plantCode . '_' . $qrCode; if (in_array($uniqueKey, $seenPlantQr)) { - $duplicateQrExcel[] = "Duplicate in file at Row {$index}: Document Numbers '{$qrCode}' already exists for Plant Code '{$plant->name}'"; + $duplicateQrExcel[] = "Duplicate in file at Row {$index}: Document Number '{$qrCode}' already exists for Plant '{$plant->name}'"; } $seenPlantQr[] = $uniqueKey; @@ -233,7 +233,7 @@ class InvoiceOutValidationResource extends Resource // ->first(); // if ($existsInDb) { - // $duplicateQrDb[] = "Document Numbers '{$qrCode}' already exists in DB for Plant Code {$plant->name}"; + // $duplicateQrDb[] = "Document Numbers '{$qrCode}' already exists in DB for Plant '{$plant->name}'"; // } } @@ -301,7 +301,7 @@ class InvoiceOutValidationResource extends Resource $duplicateGroupedByPlantQr = []; foreach ($duplicateQrExcel as $message) {//"/Document Numbers '([^']+)' already exists for Plant Code (\S+)/" - if (preg_match("/Document Numbers '([^']+)' already exists for Plant Code '([^']+)'/", $message, $matches)) { + if (preg_match("/Document Number '([^']+)' already exists for Plant '([^']+)'/", $message, $matches)) { $qrCode = $matches[1]; $plantCode = $matches[2]; $duplicateGroupedByPlantQr[$plantCode][] = $qrCode; @@ -340,7 +340,7 @@ class InvoiceOutValidationResource extends Resource // $duplicateGroupedByPlantDb = []; // foreach ($duplicateQrDb as $message) { - // if (preg_match("/Document Numbers '([^']+)' already exists in DB for Plant Code (\S+)/", $message, $matches)) { + // if (preg_match("/Document Numbers '([^']+)' already exists in DB for Plant '([^']+)'/", $message, $matches)) { // $qrCode = $matches[1]; // $plantCode = $matches[2]; // $duplicateGroupedByPlantDb[$plantCode][] = $qrCode;