diff --git a/app/Classes/Modules/Exports/Services/ExportsInvoiceTransactions.php b/app/Classes/Modules/Exports/Services/ExportsInvoiceTransactions.php
index 90780750..87cf35a2 100644
--- a/app/Classes/Modules/Exports/Services/ExportsInvoiceTransactions.php
+++ b/app/Classes/Modules/Exports/Services/ExportsInvoiceTransactions.php
@@ -56,9 +56,11 @@ class ExportsInvoiceTransactions implements FromQuery, WithHeadings, WithHeading
*/
public function query()
{
- return StatementTransactionOwner::whereNull('invoice_reference')
+ $data = StatementTransactionOwner::whereNull('invoice_reference')
->whereIn('type', [StatementTransactionOwnerType::SALES, StatementTransactionOwnerType::WALLET_TOP_UP])
->whereIn('status', [ApprovalStatus::COMPLETED, ApprovalStatus::APPROVED]);
+ if ($this->request->has('bankStatementOwnerId')) $data = $data->whereIn('id',json_decode($this->request->input('bankStatementOwnerId')));
+ return $data;
}
/**
diff --git a/resources/assets/vue/components/accounting/elements/StatementTransactionComponent.vue b/resources/assets/vue/components/accounting/elements/StatementTransactionComponent.vue
index d36c149f..6014bb5d 100644
--- a/resources/assets/vue/components/accounting/elements/StatementTransactionComponent.vue
+++ b/resources/assets/vue/components/accounting/elements/StatementTransactionComponent.vue
@@ -113,6 +113,12 @@
{{ item.amount }}
{{ [6, 7, 8, 9, 10, 11, 12, 13, 14].includes(item.owners.approved[0].type) ? 'Miscellaneous' : 'Approved' }}
+
+
+
+
+
+
Pending...
Amount
+
+ Select
+
+
-
+
@@ -199,6 +203,7 @@ export default {
parameters: {},
section: 'bankTransactionSection',
mappedTrue: false,
+ selectAll: false,
}
},
validations: {
@@ -217,7 +222,13 @@ export default {
this.submit(this.route('api.import_receipts.upload'), 'post', this.section, true, false);
},
exportInvoiceToAutoCount(){
- window.open(this.route('invoiceTransactions.export'), '_blank');
+ let bankStatementOwnerId = [];
+ $('.request_export_item:checked').each(function() {
+ bankStatementOwnerId.push($(this).val());
+ });
+
+ bankStatementOwnerId = JSON.stringify(bankStatementOwnerId);
+ window.open(this.route('invoiceTransactions.export')+'?bankStatementOwnerId='+bankStatementOwnerId, '_blank');
},
successHandler(){
this.step += 1;