mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-01-22 06:23:12 -06:00
Journals that no longer match a bill will be removed.
This commit is contained in:
parent
3e01daa172
commit
df8976eabe
@ -315,6 +315,12 @@ class BillRepository implements BillRepositoryInterface
|
|||||||
Log::debug('TOTAL match is true!');
|
Log::debug('TOTAL match is true!');
|
||||||
$journal->bill()->associate($bill);
|
$journal->bill()->associate($bill);
|
||||||
$journal->save();
|
$journal->save();
|
||||||
|
} else {
|
||||||
|
if ((!$wordMatch || !$amountMatch) && $bill->id == $journal->bill_id) {
|
||||||
|
// if no match, but bill used to match, remove it:
|
||||||
|
$journal->bill_id = null;
|
||||||
|
$journal->save();
|
||||||
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user