From f9ac2e19dc62ef718a77bd7136b037fb7166c86a Mon Sep 17 00:00:00 2001 From: dhanabalan Date: Thu, 4 Jun 2026 17:51:55 +0530 Subject: [PATCH] Removed updated by column from serial validation --- .../Pages/CreateSerialValidation.php | 25 ++++++------------- 1 file changed, 7 insertions(+), 18 deletions(-) diff --git a/app/Filament/Resources/SerialValidationResource/Pages/CreateSerialValidation.php b/app/Filament/Resources/SerialValidationResource/Pages/CreateSerialValidation.php index f4e8661..efb4282 100644 --- a/app/Filament/Resources/SerialValidationResource/Pages/CreateSerialValidation.php +++ b/app/Filament/Resources/SerialValidationResource/Pages/CreateSerialValidation.php @@ -2922,25 +2922,25 @@ class CreateSerialValidation extends CreateRecord // } return; } else { - $oldQuan = InvoiceValidation::where('invoice_number', $invoiceNumber)->where('plant_id', $plantId)->count(); + $oldQuan = SerialValidation::where('invoice_number', $invoiceNumber)->where('plant_id', $plantId)->count(); $newQuan = -1; $inserted = 0; foreach ($matchedItems as $sticker) { if ($newQuan == -1 && ! $hasQuanTyp) { - InvoiceValidation::where('invoice_number', $invoiceNumber)->where('plant_id', $plantId)->where(function ($query) { + SerialValidation::where('invoice_number', $invoiceNumber)->where('plant_id', $plantId)->where(function ($query) { $query->whereNull('serial_number')->orWhere('serial_number', ''); }) ->forceDelete(); // ->delete(); - $newQuan = InvoiceValidation::where('invoice_number', $invoiceNumber)->where('plant_id', $plantId)->count(); + $newQuan = SerialValidation::where('invoice_number', $invoiceNumber)->where('plant_id', $plantId)->count(); } elseif ($newQuan == -1 && $hasQuanTyp) { - InvoiceValidation::where('invoice_number', $invoiceNumber)->where('plant_id', $plantId)->where(function ($query) { + SerialValidation::where('invoice_number', $invoiceNumber)->where('plant_id', $plantId)->where(function ($query) { $query->whereNull('serial_number')->orWhere('serial_number', ''); })->whereNotIn('sticker_master_id', $hasQuanTypIds) ->forceDelete(); // ->delete(); - $newQuan = InvoiceValidation::where('invoice_number', $invoiceNumber)->where('plant_id', $plantId)->count(); + $newQuan = SerialValidation::where('invoice_number', $invoiceNumber)->where('plant_id', $plantId)->count(); } $code = $sticker->item->code; @@ -2980,7 +2980,6 @@ class CreateSerialValidation extends CreateRecord 'quantity' => 1, 'operator_id' => $operatorName, 'created_by' => $operatorName, - 'updated_by' => $operatorName, ]); $inserted++; } @@ -3022,7 +3021,6 @@ class CreateSerialValidation extends CreateRecord 'quantity' => $bundleQty, 'operator_id' => $operatorName, 'created_by' => $operatorName, - 'updated_by' => $operatorName, ]); $inserted++; } @@ -3086,7 +3084,6 @@ class CreateSerialValidation extends CreateRecord $existEmpRecQty->update([ 'quantity' => $newInsQty, 'operator_id' => $operatorName, - 'updated_by' => $operatorName, 'updated_at' => now(), ]); $newQuan--; @@ -3099,7 +3096,6 @@ class CreateSerialValidation extends CreateRecord 'quantity' => $newInsQty, 'operator_id' => $operatorName, 'created_by' => $operatorName, - 'updated_by' => $operatorName, ]); $inserted++; } @@ -3119,7 +3115,6 @@ class CreateSerialValidation extends CreateRecord $existEmpRecQty->update([ 'quantity' => $newInsQty, 'operator_id' => $operatorName, - 'updated_by' => $operatorName, 'updated_at' => now(), ]); $newQuan--; @@ -3132,7 +3127,6 @@ class CreateSerialValidation extends CreateRecord 'quantity' => $newInsQty, 'operator_id' => $operatorName, 'created_by' => $operatorName, - 'updated_by' => $operatorName, ]); $inserted++; } @@ -3611,7 +3605,6 @@ class CreateSerialValidation extends CreateRecord 'serial_number' => $serialNumber, 'operator_id' => $operatorName, 'created_by' => $operatorName, - 'updated_by' => $operatorName, ]); $inserted++; } @@ -4153,14 +4146,13 @@ class CreateSerialValidation extends CreateRecord for ($i = 0; $i < $totalExcelQty; $i++) { if ($sticker) { - InvoiceValidation::create([ + SerialValidation::create([ 'sticker_master_id' => $sticker->id, 'plant_id' => $plantId, 'invoice_number' => $invoiceNumber, 'quantity' => 1, 'operator_id' => $operatorName, 'created_by' => $operatorName, - 'updated_by' => $operatorName, ]); $inserted++; } @@ -4188,14 +4180,13 @@ class CreateSerialValidation extends CreateRecord for ($i = 0; $i < ($totalExcelQty / $bundleQty); $i++) { if ($sticker) { - InvoiceValidation::create([ + SerialValidation::create([ 'sticker_master_id' => $sticker->id, 'plant_id' => $plantId, 'invoice_number' => $invoiceNumber, 'quantity' => $bundleQty, 'operator_id' => $operatorName, 'created_by' => $operatorName, - 'updated_by' => $operatorName, ]); $inserted++; } @@ -4228,7 +4219,6 @@ class CreateSerialValidation extends CreateRecord 'quantity' => $totalExcelQty, 'operator_id' => $operatorName, 'created_by' => $operatorName, - 'updated_by' => $operatorName, ]); $inserted++; } @@ -4594,7 +4584,6 @@ class CreateSerialValidation extends CreateRecord 'serial_number' => $serialNumber, 'operator_id' => $operatorName, 'created_by' => $operatorName, - 'updated_by' => $operatorName, ]); $inserted++; }