close #273 Fixed: Banking - Transfer and Transactions - Latest dates should be first then descend for consistency

This commit is contained in:
cuneytsenturk
2018-07-09 12:01:16 +03:00
parent bf30fad8af
commit eec7c0290b
6 changed files with 132 additions and 60 deletions

View File

@@ -37,13 +37,13 @@ class Transactions extends Controller
$type = $request->get('type');
if ($type != 'income') {
$this->addTransactions(Payment::collect('paid_at'), trans_choice('general.expenses', 1));
$this->addTransactions(BillPayment::collect('paid_at'), trans_choice('general.expenses', 1), trans_choice('general.bills', 1));
$this->addTransactions(Payment::collect(['paid_at'=> 'desc']), trans_choice('general.expenses', 1));
$this->addTransactions(BillPayment::collect(['paid_at'=> 'desc']), trans_choice('general.expenses', 1), trans_choice('general.bills', 1));
}
if ($type != 'expense') {
$this->addTransactions(Revenue::collect('paid_at'), trans_choice('general.incomes', 1));
$this->addTransactions(InvoicePayment::collect('paid_at'), trans_choice('general.incomes', 1), trans_choice('general.invoices', 1));
$this->addTransactions(Revenue::collect(['paid_at'=> 'desc']), trans_choice('general.incomes', 1));
$this->addTransactions(InvoicePayment::collect(['paid_at'=> 'desc']), trans_choice('general.incomes', 1), trans_choice('general.invoices', 1));
}
$transactions = $this->getTransactions($request);