ranjith-dev #293

Merged
jothi merged 2 commits from ranjith-dev into master 2026-02-03 07:04:25 +00:00
Showing only changes of commit 5eb067899b - Show all commits

View File

@@ -77,7 +77,7 @@ class InvoiceValidationResource extends Resource
->afterStateUpdated(function ($state, callable $set, callable $get) {
$plantId = $get('plant_id');
$set('update_invoice', null);
// Ensure `linestop_id` is not cleared
if (! $plantId) {
$set('invoice_number', null);
$set('serial_number', null);
@@ -87,6 +87,11 @@ class InvoiceValidationResource extends Resource
return;
} else {
$plantCode = Plant::find($plantId)?->code ?? null;
$directory = "uploads/temp/{$plantCode}";
if (! Storage::disk('local')->exists($directory)) {
Storage::disk('local')->makeDirectory($directory);
}
$set('ivPlantError', null);
}
})