Skip to content

Commit

Permalink
Fix transaction not visible when paid on the end date of a reconcilia…
Browse files Browse the repository at this point in the history
…tion
  • Loading branch information
domkrm committed Nov 9, 2020
1 parent 9e37f6c commit e7b0247
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions app/Http/Controllers/Banking/Reconciliations.php
Original file line number Diff line number Diff line change
Expand Up @@ -177,10 +177,10 @@ public function destroy(Reconciliation $reconciliation)
*/
protected function getTransactions($account, $started_at, $ended_at)
{
$started = explode(' ', $started_at);
$ended = explode(' ', $ended_at);
$started = explode(' ', $started_at)[0] . ' 00:00:00';
$ended = explode(' ', $ended_at)[0] . ' 23:59:59';

$transactions = Transaction::where('account_id', $account->id)->whereBetween('paid_at', [$started[0], $ended[0]])->get();
$transactions = Transaction::where('account_id', $account->id)->whereBetween('paid_at', [$started, $ended])->get();

return collect($transactions)->sortByDesc('paid_at');
}
Expand Down

0 comments on commit e7b0247

Please sign in to comment.