mirror of
https://gitlab.com/CIEFWorldwideSdnBhd/shipping-portal.git
synced 2026-08-19 04:24:12 +00:00
E-Invoice - Update Sales Invoice Report to have paid and unpaid invoices in the report
This commit is contained in:
@@ -65,7 +65,8 @@ class ExportsSalesInvoicesReport implements FromQuery, WithHeadings, WithHeading
|
||||
|
||||
$query = Transaction::with([
|
||||
'transactionDetails',
|
||||
'transactions', // child transactions (e.g. PAYMENT)
|
||||
'transactions',
|
||||
'transactions.attributesKVP',
|
||||
'owner.containers',
|
||||
'owner.owner.companyModule.company.contacts',
|
||||
'owner.owner.companyModule.inviters',
|
||||
@@ -169,12 +170,12 @@ class ExportsSalesInvoicesReport implements FromQuery, WithHeadings, WithHeading
|
||||
|
||||
$docNo = '<<New>>';
|
||||
$firstItem = true;
|
||||
// if($transaction){
|
||||
// $transactionKVP = $transaction->attributesKVP()->where('key', KVPKey::AUTOCOUNT_DOCNO_INVOICE)->first();
|
||||
// if($transactionKVP){
|
||||
// $docNo = $transactionKVP->value;
|
||||
// }
|
||||
// }
|
||||
if($transaction){
|
||||
$transactionKVP = $transaction->attributesKVP()->where('key', KVPKey::AUTOCOUNT_DOCNO_INVOICE)->first();
|
||||
if($transactionKVP){
|
||||
$docNo = $transactionKVP->value;
|
||||
}
|
||||
}
|
||||
|
||||
$rows = [];
|
||||
foreach ($transactionDetails as $detail) {
|
||||
|
||||
Reference in New Issue
Block a user