From 8281279452e3eab42e704426b48d6c1739b5635b Mon Sep 17 00:00:00 2001 From: James Cole Date: Sat, 12 Mar 2016 07:37:26 +0100 Subject: [PATCH] Repository will store edits/ new journals #122 --- app/Repositories/Journal/JournalRepository.php | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/app/Repositories/Journal/JournalRepository.php b/app/Repositories/Journal/JournalRepository.php index df82798e95..b25ef485a4 100644 --- a/app/Repositories/Journal/JournalRepository.php +++ b/app/Repositories/Journal/JournalRepository.php @@ -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: