diff --git a/app/Http/Controllers/Accounting/BankStatementController.php b/app/Http/Controllers/Accounting/BankStatementController.php index ff1324b4..8e5ee138 100644 --- a/app/Http/Controllers/Accounting/BankStatementController.php +++ b/app/Http/Controllers/Accounting/BankStatementController.php @@ -129,7 +129,7 @@ class BankStatementController extends Controller ->download($statement->date_from->format('Y-m-d') . '_' . $statement->date_to->format('Y-m-d') . '_statement.csv'); } - public function fetch(Request $request, ListBankStatementDetailsLogic $logic): JsonResponse + public function fetch(Request $request, ListBankStatementTransactionsLogic $logic): JsonResponse { return $logic->execute($request); } diff --git a/app/Http/Controllers/Imports/ImportStatementInvoiceController.php b/app/Http/Controllers/Imports/ImportStatementInvoiceController.php index 2535f870..7ea3454e 100644 --- a/app/Http/Controllers/Imports/ImportStatementInvoiceController.php +++ b/app/Http/Controllers/Imports/ImportStatementInvoiceController.php @@ -140,8 +140,14 @@ class ImportStatementInvoiceController $transactions = Transaction::where('original_amount', $row['net_total'])->whereRaw("DATE(created_at) = '$date'") ->whereHas('receiverCompany', function($q) use($row) { $q->where('debtor',$row['debtor_code']); - }) - ->get(); + })->get(); + + if ($transactions && $transactions->count() == 0) { + $transactions = Transaction::where(DB::raw('FLOOR(original_amount)'), floor($row['net_total']))->whereRaw("DATE(created_at) = '$date'") + ->whereHas('receiverCompany', function($q) use($row) { + $q->where('debtor',$row['debtor_code']); + })->get(); + } if ($transactions && $transactions->count() == 1) { foreach ($transactions as $key => $transaction) { diff --git a/resources/assets/vue/components/accounting/sections/StatementTransactionsDetailsComponent.vue b/resources/assets/vue/components/accounting/sections/StatementTransactionsDetailsComponent.vue index a0fb4a67..9ad2162f 100644 --- a/resources/assets/vue/components/accounting/sections/StatementTransactionsDetailsComponent.vue +++ b/resources/assets/vue/components/accounting/sections/StatementTransactionsDetailsComponent.vue @@ -65,10 +65,12 @@ ID - Date + Posting Date Description 1 - Pay For - System References + Description 2 + Description 3 + Description 4 + Description 5 Amount Action @@ -76,11 +78,12 @@ {{item.id}} - {{item.date}} - {{item.transaction_description_1 | truncate(30, '...')}} - - {{item.pay_for}} - {{item.system_references}} + {{item.posting_date}} + {{item.transaction_description_1}} + {{item.transaction_description_2}} + {{item.transaction_description_3}} + {{item.transaction_description_4}} + {{item.transaction_description_5}} {{item.amount}} @@ -184,11 +187,7 @@ export default { }, created(){ this.setDecoratorDefault(); - if (this.statement === 0) { - this.filters = { 'per_page': 10, order_by: {column: 'id', DESC: true} }; - } else { - this.filters = { 'per_page': 10, order_by: {column: 'id', DESC: true}, 'has_account_statement_id': this.statement }; - } + this.filters = { 'per_page': 10, order_by: {column: 'id', DESC: true} }; this.$store.dispatch('updateListQueue', {'name': this.section, 'page': 1, 'filters': this.filters}); }, methods: {