mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-02-25 18:45:27 -06:00
Bill scan routine should not grab transfers and income.
This commit is contained in:
parent
3ed6561702
commit
d1329be2fa
@ -276,12 +276,21 @@ class BillRepository implements BillRepositoryInterface
|
||||
*/
|
||||
public function scan(Bill $bill, TransactionJournal $journal)
|
||||
{
|
||||
|
||||
/*
|
||||
* Can only support withdrawals.
|
||||
*/
|
||||
if ($journal->transactionType->type !== 'Withdrawal') {
|
||||
return false;
|
||||
}
|
||||
|
||||
$matches = explode(',', $bill->match);
|
||||
$description = strtolower($journal->description) . ' ' . strtolower($journal->destination_account->name);
|
||||
$wordMatch = $this->doWordMatch($matches, $description);
|
||||
$amountMatch = $this->doAmountMatch($journal->amount_positive, $bill->amount_min, $bill->amount_max);
|
||||
Log::debug('Journal #' . $journal->id . ' has description "' . $description . '"');
|
||||
|
||||
|
||||
/*
|
||||
* If both, update!
|
||||
*/
|
||||
|
Loading…
Reference in New Issue
Block a user