Merge pull request 'Added logic for columns missing invoice in transit' (#176) from ranjith-dev into master
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 17s
All checks were successful
Scan for leaked secrets using Kingfisher / kingfisher-secrets-scan (push) Successful in 17s
Reviewed-on: #176
This commit was merged in pull request #176.
This commit is contained in:
@@ -454,6 +454,22 @@ class InvoiceInTransitResource extends Resource
|
|||||||
return;
|
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)
|
foreach ($rows as $index => $row)
|
||||||
{
|
{
|
||||||
if ($index == 0) {
|
if ($index == 0) {
|
||||||
|
|||||||
Reference in New Issue
Block a user