diff --git a/app/Filament/Resources/InvoiceValidationResource/Pages/CreateInvoiceValidation.php b/app/Filament/Resources/InvoiceValidationResource/Pages/CreateInvoiceValidation.php index c7c2b20..9741d1d 100644 --- a/app/Filament/Resources/InvoiceValidationResource/Pages/CreateInvoiceValidation.php +++ b/app/Filament/Resources/InvoiceValidationResource/Pages/CreateInvoiceValidation.php @@ -65,6 +65,20 @@ class CreateInvoiceValidation extends CreateRecord ]; } + // protected $listeners = [ + // 'updateScannedQuantity' => 'updateScannedQuantity', + // ]; + + + // public function updateScannedQuantity() + // { + // $current = $this->form->getState()['scanned_quantity'] ?? 0; + + // $this->form->fill([ + // 'scanned_quantity' => $current + 1, + // ]); + // } + protected function getRedirectUrl(): string { return $this->getResource()::getUrl('create'); @@ -97,7 +111,6 @@ class CreateInvoiceValidation extends CreateRecord //..GET SERIAL INVOICE API - //.. $updateStatus = $this->form->getState()['update_invoice'] ?? null; @@ -3457,6 +3470,21 @@ class CreateInvoiceValidation extends CreateRecord return; } + if ($hasMotorQr && !$hasPumpQr && !$hasPumpSetQr && !$hasCapacitorQr) + { + $isMarkM = true; + $isMarkP = false; + $isMarkC = false; + $isMarkPs = false; + } + else if (!$hasMotorQr && $hasPumpQr && !$hasPumpSetQr && !$hasCapacitorQr) + { + $isMarkM = false; + $isMarkP = true; + $isMarkC = false; + $isMarkPs = false; + } + if ($isMarkM) { if (!$hasMotorQr) {