mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Fixed a bug where the paginator for transactions would skip pages.
This commit is contained in:
parent
114b27079e
commit
e235a57e2f
@ -536,7 +536,7 @@ class TransactionJournal implements TransactionJournalInterface, CUD, CommonData
|
||||
|
||||
public function getDepositsPaginated($limit = 50)
|
||||
{
|
||||
$offset = intval(\Input::get('page')) > 0 ? intval(\Input::get('page')) * $limit : 0;
|
||||
$offset = intval(\Input::get('page')) > 0 ? (intval(\Input::get('page'))-1) * $limit : 0;
|
||||
|
||||
$set = $this->getUser()->transactionJournals()->transactionTypes(['Deposit'])->withRelevantData()->take($limit)->offset($offset)->orderBy(
|
||||
'date', 'DESC'
|
||||
@ -575,7 +575,7 @@ class TransactionJournal implements TransactionJournalInterface, CUD, CommonData
|
||||
|
||||
public function getTransfersPaginated($limit = 50)
|
||||
{
|
||||
$offset = intval(\Input::get('page')) > 0 ? intval(\Input::get('page')) * $limit : 0;
|
||||
$offset = intval(\Input::get('page')) > 0 ? (intval(\Input::get('page'))-1) * $limit : 0;
|
||||
|
||||
$set = $this->getUser()->transactionJournals()->transactionTypes(['Transfer'])->withRelevantData()->take($limit)->offset($offset)->orderBy(
|
||||
'date', 'DESC'
|
||||
@ -591,7 +591,7 @@ class TransactionJournal implements TransactionJournalInterface, CUD, CommonData
|
||||
|
||||
public function getWithdrawalsPaginated($limit = 50)
|
||||
{
|
||||
$offset = intval(\Input::get('page')) > 0 ? intval(\Input::get('page')) * $limit : 0;
|
||||
$offset = intval(\Input::get('page')) > 0 ? (intval(\Input::get('page'))-1) * $limit : 0;
|
||||
|
||||
$set = $this->getUser()->transactionJournals()->transactionTypes(['Withdrawal'])->withRelevantData()->take($limit)->offset($offset)->orderBy(
|
||||
'date', 'DESC'
|
||||
|
Loading…
Reference in New Issue
Block a user