From ed8b41e8ec65b485a8bb050211f0af95fee5f799 Mon Sep 17 00:00:00 2001 From: James Cole Date: Tue, 29 Mar 2016 15:24:40 +0200 Subject: [PATCH] Add source account to scan, see issue #226 --- app/Repositories/Bill/BillRepository.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/app/Repositories/Bill/BillRepository.php b/app/Repositories/Bill/BillRepository.php index dfb0c18675..089bc3e88f 100644 --- a/app/Repositories/Bill/BillRepository.php +++ b/app/Repositories/Bill/BillRepository.php @@ -464,6 +464,10 @@ class BillRepository implements BillRepositoryInterface $matches = explode(',', $bill->match); $description = strtolower($journal->description) . ' ' . strtolower(TransactionJournal::destinationAccount($journal)->name); + + // new: add source to word match: + $description .= ' '.strtolower(TransactionJournal::sourceAccount($journal)->name); + $wordMatch = $this->doWordMatch($matches, $description); $amountMatch = $this->doAmountMatch(TransactionJournal::amountPositive($journal), $bill->amount_min, $bill->amount_max);