mirror of
https://github.com/firefly-iii/firefly-iii.git
synced 2025-10-12 15:35:15 +00:00
Fix tests and fix coverage.
This commit is contained in:
@@ -265,7 +265,7 @@ class BillRepository implements BillRepositoryInterface
|
||||
$amountMatch = false;
|
||||
$wordMatch = false;
|
||||
$matches = explode(',', $bill->match);
|
||||
$description = strtolower($journal->description) . ' ' . strtolower($journal->expense_account->name);
|
||||
$description = strtolower($journal->description) . ' ' . strtolower($journal->destination_account->name);
|
||||
$count = 0;
|
||||
foreach ($matches as $word) {
|
||||
if (!(strpos($description, strtolower($word)) === false)) {
|
||||
|
@@ -48,11 +48,6 @@ class JournalRepository implements JournalRepositoryInterface
|
||||
*/
|
||||
public function delete(TransactionJournal $journal)
|
||||
{
|
||||
// delete transactions first:
|
||||
/** @var Transaction $transaction */
|
||||
foreach ($journal->transactions()->get() as $transaction) {
|
||||
$transaction->delete();
|
||||
}
|
||||
$journal->delete();
|
||||
|
||||
return true;
|
||||
|
@@ -318,7 +318,7 @@ class TagRepository implements TagRepositoryInterface
|
||||
$match = true;
|
||||
/** @var TransactionJournal $check */
|
||||
foreach ($tag->transactionjournals as $check) {
|
||||
if ($check->asset_account->id != $journal->asset_account->id) {
|
||||
if ($check->source_account->id != $journal->source_account->id) {
|
||||
$match = false;
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user