Merge pull request #1661 from domkrm/fix/reconciliation-ignore-time
Fix transaction not visible when paid on the end date of a reconciliation
This commit is contained in:
commit
ce2fee9d0d
@ -177,10 +177,10 @@ class Reconciliations extends Controller
|
|||||||
*/
|
*/
|
||||||
protected function getTransactions($account, $started_at, $ended_at)
|
protected function getTransactions($account, $started_at, $ended_at)
|
||||||
{
|
{
|
||||||
$started = explode(' ', $started_at);
|
$started = explode(' ', $started_at)[0] . ' 00:00:00';
|
||||||
$ended = explode(' ', $ended_at);
|
$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');
|
return collect($transactions)->sortByDesc('paid_at');
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user