Repository will store edits/ new journals #122

This commit is contained in:
James Cole 2016-03-12 07:37:26 +01:00
parent 8f1bf846fe
commit 8281279452

View File

@ -212,8 +212,12 @@ class JournalRepository implements JournalRepositoryInterface
'description' => $data['description'],
'completed' => 0,
'date' => $data['date'],
'interest_date' => $data['interest_date'],
'book_date' => $data['book_date'],
'process_date' => $data['process_date'],
]
);
// TODO catch errors here. Match rules with JournalFormRequest
$journal->save();
@ -273,6 +277,9 @@ class JournalRepository implements JournalRepositoryInterface
$journal->transaction_currency_id = $data['amount_currency_id_amount'];
$journal->description = $data['description'];
$journal->date = $data['date'];
$journal->interest_date = $data['interest_date'];
$journal->book_date = $data['book_date'];
$journal->process_date = $data['process_date'];
// unlink all categories, recreate them: