Added logic for columns missing invoice in transit
Some checks failed
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 11s
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (pull_request) Successful in 10s
Gemini PR Review / review (pull_request) Failing after 42s
Laravel Pint / pint (pull_request) Successful in 2m37s
Laravel Larastan / larastan (pull_request) Failing after 3m49s

This commit is contained in:
dhanabalan
2026-01-07 09:28:57 +05:30
parent 119262405c
commit c2d840d772

View File

@@ -454,6 +454,22 @@ class InvoiceInTransitResource extends Resource
return;
}
$mandatoryColumns = 23;
$firstRow = $rows[0] ?? [];
if (count($firstRow) < $mandatoryColumns) {
Notification::make()
->title('Invalid Excel Format')
->body('Few columns not found. Columns A to W are mandatory.')
->danger()
->persistent()
->send();
return;
}
foreach ($rows as $index => $row)
{
if ($index == 0) {