Refactored invoice processing logic to ensure file deletion occurs correctly and added additional condition for marking serial numbers.
This commit is contained in:
@@ -1024,9 +1024,9 @@ class CreateInvoiceValidation extends CreateRecord
|
||||
->send();
|
||||
|
||||
$this->dispatch('playWarnSound');
|
||||
// if ($disk->exists($filePath)) {
|
||||
// $disk->delete($filePath);
|
||||
// }
|
||||
if ($disk->exists($filePath)) {
|
||||
$disk->delete($filePath);
|
||||
}
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1392,7 +1392,6 @@ class CreateInvoiceValidation extends CreateRecord
|
||||
->send();
|
||||
|
||||
$this->dispatch('playWarnSound');
|
||||
|
||||
if ($disk->exists($filePath)) {
|
||||
$disk->delete($filePath);
|
||||
}
|
||||
@@ -3479,6 +3478,13 @@ class CreateInvoiceValidation extends CreateRecord
|
||||
$isMarkC = false;
|
||||
$isMarkPs = false;
|
||||
}
|
||||
else if (!$hasMotorQr && !$hasPumpQr && !$hasPumpSetQr && $hasCapacitorQr)
|
||||
{
|
||||
$isMarkM = false;
|
||||
$isMarkP = false;
|
||||
$isMarkC = true;
|
||||
$isMarkPs = false;
|
||||
}
|
||||
|
||||
if ($isMarkM) {
|
||||
if (!$hasMotorQr)
|
||||
|
||||
Reference in New Issue
Block a user