mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/exchange-2.0.git
synced 2026-08-20 21:13:59 +00:00
E-Invoice - Automapping Issues, Credit Note Report (Import) Partial Completion
This commit is contained in:
@@ -95,6 +95,24 @@ class ImportExcelLogic extends AbstractControllerLogic
|
||||
'knockoffdocno'
|
||||
];
|
||||
|
||||
$creditNoteReportHeader = [
|
||||
'docno',
|
||||
'docdate',
|
||||
'debtorcode',
|
||||
'ref',
|
||||
'description',
|
||||
'reason',
|
||||
'deptno',
|
||||
'qty',
|
||||
'unitprice',
|
||||
'accno',
|
||||
'submiteinvoice',
|
||||
'einvoiceissuedatetime',
|
||||
'consolidatedeinvoice',
|
||||
'einvoicevalidationlink'
|
||||
];
|
||||
|
||||
|
||||
if ($reportType === 'Sales Invoice Report') {
|
||||
$optionalColumn = 'einvoicevalidationlink';
|
||||
|
||||
@@ -105,12 +123,16 @@ class ImportExcelLogic extends AbstractControllerLogic
|
||||
throw new MalformedRequestException('Uploaded Excel file format is incorrect. Column headers do not match expected format.');
|
||||
}
|
||||
|
||||
} elseif ($reportType === 'Customers Report' && $normalizedHeader !== $customersReportHeader) {
|
||||
}
|
||||
elseif ($reportType === 'Customers Report' && $normalizedHeader !== $customersReportHeader) {
|
||||
throw new MalformedRequestException('Uploaded Excel file format is incorrect. Column headers do not match expected format.');
|
||||
}
|
||||
elseif ($reportType === '01R - RECEIVE PAYMENT (FULL PAYMENT) [AR RECEIVE PAYMENT]' && $normalizedHeader !== $paymentReportHeader) {
|
||||
throw new MalformedRequestException('Uploaded Excel file format is incorrect. Column headers do not match expected format.');
|
||||
}
|
||||
elseif ($reportType === 'Credit Note Report' && $normalizedHeader !== $creditNoteReportHeader) {
|
||||
throw new MalformedRequestException('Uploaded Excel file format is incorrect. Column headers do not match expected format.');
|
||||
}
|
||||
|
||||
if ($reportType === 'Sales Invoice Report') {
|
||||
$this->processSalesInvoiceReport($sheet);
|
||||
|
||||
Reference in New Issue
Block a user