1
0
forked from poc/pds

Refactored invoice processing logic to ensure file deletion occurs correctly and added additional condition for marking serial numbers.

This commit is contained in:
dhanabalan
2025-11-19 10:40:06 +05:30
parent 5f1fcf4be4
commit b6c711fc6f

View File

@@ -1024,9 +1024,9 @@ class CreateInvoiceValidation extends CreateRecord
->send(); ->send();
$this->dispatch('playWarnSound'); $this->dispatch('playWarnSound');
// if ($disk->exists($filePath)) { if ($disk->exists($filePath)) {
// $disk->delete($filePath); $disk->delete($filePath);
// } }
return; return;
} }
@@ -1392,7 +1392,6 @@ class CreateInvoiceValidation extends CreateRecord
->send(); ->send();
$this->dispatch('playWarnSound'); $this->dispatch('playWarnSound');
if ($disk->exists($filePath)) { if ($disk->exists($filePath)) {
$disk->delete($filePath); $disk->delete($filePath);
} }
@@ -3479,6 +3478,13 @@ class CreateInvoiceValidation extends CreateRecord
$isMarkC = false; $isMarkC = false;
$isMarkPs = false; $isMarkPs = false;
} }
else if (!$hasMotorQr && !$hasPumpQr && !$hasPumpSetQr && $hasCapacitorQr)
{
$isMarkM = false;
$isMarkP = false;
$isMarkC = true;
$isMarkPs = false;
}
if ($isMarkM) { if ($isMarkM) {
if (!$hasMotorQr) if (!$hasMotorQr)