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
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:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user