1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-08 20:22:42 +01:00

Fixes for bank transaction filters

This commit is contained in:
David Bomba 2024-08-01 10:57:10 +10:00
parent a03c1eb3e2
commit 2c0e67a568
3 changed files with 6 additions and 4 deletions

View File

@ -155,11 +155,13 @@ class BankTransactionFilters extends QueryFilters
$dir = ($sort_col[1] == 'asc') ? 'asc' : 'desc'; $dir = ($sort_col[1] == 'asc') ? 'asc' : 'desc';
if ($sort_col[0] == 'deposit') { if ($sort_col[0] == 'deposit') {
return $this->builder->where('base_type', 'CREDIT')->orderBy('amount', $dir); return $this->builder->orderByRaw("(CASE WHEN base_type = 'CREDIT' THEN amount END) $dir")->orderBy('amount', $dir);
// return $this->builder->where('base_type', 'CREDIT')->orderBy('amount', $dir);
} }
if ($sort_col[0] == 'withdrawal') { if ($sort_col[0] == 'withdrawal') {
return $this->builder->where('base_type', 'DEBIT')->orderBy('amount', $dir); return $this->builder->orderByRaw("(CASE WHEN base_type = 'DEBIT' THEN amount END) $dir")->orderBy('amount', $dir);
// return $this->builder->where('base_type', 'DEBIT')->orderBy('amount', $dir);
} }
if ($sort_col[0] == 'status') { if ($sort_col[0] == 'status') {

View File

@ -153,7 +153,7 @@ class BrowserPay implements MethodInterface
$this->stripe->client->company, $this->stripe->client->company,
); );
return redirect()->route('client.payments.show', ['payment' => $payment->hashed_id)]); return redirect()->route('client.payments.show', ['payment' => $payment->hashed_id]);
} }
/** /**

View File

@ -160,7 +160,7 @@ class CreditCard
} }
} }
return redirect()->route('client.payments.show', ['payment' => $payment->hashed_id)]); return redirect()->route('client.payments.show', ['payment' => $payment->hashed_id]);
} }
public function processUnsuccessfulPayment($server_response) public function processUnsuccessfulPayment($server_response)