Refactor processSerialNumber method to improve package validation logic
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 10s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 11s
Gemini PR Review / review (pull_request) Failing after 22s
Laravel Larastan / larastan (pull_request) Failing after 2m3s
Laravel Pint / pint (pull_request) Failing after 2m18s
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 10s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 11s
Gemini PR Review / review (pull_request) Failing after 22s
Laravel Larastan / larastan (pull_request) Failing after 2m3s
Laravel Pint / pint (pull_request) Failing after 2m18s
This commit is contained in:
@@ -3265,6 +3265,8 @@ class CreateInvoiceValidation extends CreateRecord
|
||||
return;
|
||||
}
|
||||
|
||||
$invalidPackage = false;
|
||||
|
||||
$hasMotorQr = $record->stickerMasterRelation->tube_sticker_motor ?? null;
|
||||
$hasPumpQr = $record->stickerMasterRelation->tube_sticker_pump ?? null;
|
||||
$hasPumpSetQr = $record->stickerMasterRelation->tube_sticker_pumpset ?? null;
|
||||
@@ -3274,11 +3276,11 @@ class CreateInvoiceValidation extends CreateRecord
|
||||
$hasMotorQr = $record->stickerMasterRelation->pack_slip_motor ?? null;
|
||||
$hasPumpQr = $record->stickerMasterRelation->pack_slip_pump ?? null;
|
||||
$hasPumpSetQr = $record->stickerMasterRelation->pack_slip_pumpset ?? null;
|
||||
} elseif (! $hasPumpSetQr && ! $hasPumpQr) {
|
||||
} else {
|
||||
if (! $hasPumpSetQr && ! $hasPumpQr) {
|
||||
$hasPumpQr = $record->stickerMasterRelation->pack_slip_pump ?? null;
|
||||
}
|
||||
|
||||
$invalidPackage = false;
|
||||
$hasTubeMotorQr = $record->stickerMasterRelation->tube_sticker_motor ?? null;
|
||||
$hasPackMotorQr = $record->stickerMasterRelation->pack_slip_motor ?? null;
|
||||
$hasTubePumpSetQr = $record->stickerMasterRelation->tube_sticker_pumpset ?? null;
|
||||
@@ -3286,6 +3288,7 @@ class CreateInvoiceValidation extends CreateRecord
|
||||
if ($hasTubeMotorQr != $hasPackMotorQr || $hasTubePumpSetQr != $hasPackPumpSetQr) {
|
||||
$invalidPackage = true;
|
||||
}
|
||||
}
|
||||
|
||||
$hadMotorQr = $record->motor_scanned_status ?? null;
|
||||
$hadPumpQr = $record->pump_scanned_status ?? null;
|
||||
|
||||
Reference in New Issue
Block a user