From fe46d72891f99fa73747fa7ea472116108105840 Mon Sep 17 00:00:00 2001 From: Steve Ng Date: Wed, 1 Nov 2023 13:43:36 +0800 Subject: [PATCH] fix bug of update status of statement transaction owner when update invoice or receipt success, and paginate when next page with filtering date in Pending Export tab, and error on export invoive to autocount --- .../Controllers/Imports/ImportStatementInvoiceController.php | 5 ++++- .../Imports/ImportStatementReceiptsController.php | 5 ++++- .../assets/vue/components/general/elements/ListComponent.vue | 1 + routes/web.php | 2 +- 4 files changed, 10 insertions(+), 3 deletions(-) diff --git a/app/Http/Controllers/Imports/ImportStatementInvoiceController.php b/app/Http/Controllers/Imports/ImportStatementInvoiceController.php index 73e58e87..6cfdec08 100644 --- a/app/Http/Controllers/Imports/ImportStatementInvoiceController.php +++ b/app/Http/Controllers/Imports/ImportStatementInvoiceController.php @@ -154,7 +154,10 @@ class ImportStatementInvoiceController public function updateTransactionOwnerReference($transaction, String $docNo) { $transactionOwner = $transaction->transaction_owner; if ($transactionOwner) { - $transactionOwner->update(['invoice_reference'=>$docNo]); + $transactionOwner->update([ + 'invoice_reference'=>$docNo, + 'status'=>ApprovalStatus::COMPLETED + ]); return $transactionOwner->owner_reference; } return false; diff --git a/app/Http/Controllers/Imports/ImportStatementReceiptsController.php b/app/Http/Controllers/Imports/ImportStatementReceiptsController.php index f3b89db7..3c919376 100644 --- a/app/Http/Controllers/Imports/ImportStatementReceiptsController.php +++ b/app/Http/Controllers/Imports/ImportStatementReceiptsController.php @@ -96,7 +96,10 @@ class ImportStatementReceiptsController public function updateTransactionOwnerReference($transaction, String $docNo) { $transactionOwner = $transaction->transaction_owner; if ($transactionOwner) { - $transactionOwner->update(['receipt_reference'=>$docNo]); + $transactionOwner->update([ + 'receipt_reference'=>$docNo, + 'status'=>ApprovalStatus::COMPLETED + ]); return $transactionOwner->owner_reference; } return false; diff --git a/resources/assets/vue/components/general/elements/ListComponent.vue b/resources/assets/vue/components/general/elements/ListComponent.vue index 50d2fa19..8f54548b 100644 --- a/resources/assets/vue/components/general/elements/ListComponent.vue +++ b/resources/assets/vue/components/general/elements/ListComponent.vue @@ -99,6 +99,7 @@ updateFilters(filters){ this.filters = filters; this.setDecoratorDefault(); + this.$store.dispatch('updateListQueue', {'name': this.section, 'page': 1, 'filters': this.filters}); this.submit(this.endpoint + '?page=1&filters=' + JSON.stringify(this.filters), 'get', this.section, false, false) }, successHandler(response){ diff --git a/routes/web.php b/routes/web.php index 181a8a87..72107a50 100644 --- a/routes/web.php +++ b/routes/web.php @@ -265,7 +265,7 @@ Route::get('/export/payment-transactions/f614e339d7058904a831aad742e24d55', 'Exp Route::get('/export/wallet-transactions/f614e339d7058904a831aad742e24d55', 'Exports\ExportCustomersToExcelController@walletTransactions')->name('walletTransactions.export'); Route::get('/export/booking-transactions', 'Exports\ExportCustomersToExcelController@bookingTransactions')->name('export.transactions.booking'); Route::get('/export/invoice-transactions/f614e339d7058904a831aad742e24d55', 'Exports\ExportCustomersToExcelController@invoiceTransactions')->name('invoiceTransactions.export'); -Route::get('/export/invoice-transactions/f614e339d7058904a831aad742e24d55', 'Exports\ExportCustomersToExcelController@receiptTransactions')->name('receiptTransactions.export'); +Route::get('/export/receipt-transactions/f614e339d7058904a831aad742e24d55', 'Exports\ExportCustomersToExcelController@receiptTransactions')->name('receiptTransactions.export'); Route::get('/export/imported-invoice-mapped', 'Exports\ExportCustomersToExcelController@importedInvoiceMapped')->name('importedInvoiceMapped.export'); Route::get('/products', function (\App\Classes\Modules\Exports\Services\ExportsProducts $exportsProducts) {