Added skip on completed serial and warning on mismatch invoice
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 13s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 13s
Gemini PR Review / Gemini PR Review (pull_request) Failing after 21s
Laravel Pint / pint (pull_request) Successful in 3m8s
Laravel Larastan / larastan (pull_request) Failing after 3m42s

This commit is contained in:
dhanabalan
2026-02-26 08:33:11 +05:30
parent 01f521794b
commit b25120acf9

View File

@@ -353,6 +353,12 @@ class InvoiceValidationImporter extends Importer
$curPanelBoxSerialNumber = $record->panel_box_serial_number ?? null;
}
if ($record->scanned_status == 'Scanned') {
return null;
} elseif ($record->invoice_number != $invoiceNumber) {
throw new RowImportFailedException('Invoice number mismatch with existing record!');
}
// if ($hadPumpQr == $hasPumpQr && $hadPumpSetQr == $hasPumpSetQr)
if ($hasMotorQr || $hasPumpQr || $hasPumpSetQr || $hasCapacitorQr) {
$scanCnt = $curMotorQr ? $scanCnt + 1 : $scanCnt;