Code Duplication    Length = 3-4 lines in 2 locations

src/Intraface/modules/invoice/Invoice.php 1 location

@@ 119-122 (lines=4) @@
116
        }
117
118
        $debtor_account = new Account($year, $year->getSetting('debtor_account_id'));
119
        if ($debtor_account->get('id') == 0 || $debtor_account->get('type') != 'balance, asset') {
120
            $this->error->set('Ugyldig debitor konto sat i regnskabsindstillingerne.');
121
            return false;
122
        }
123
124
        $return = true;
125

src/Intraface/modules/invoice/Reminder.php 1 location

@@ 561-563 (lines=3) @@
558
        }
559
560
        $debtor_account = new Account($year, $year->getSetting('debtor_account_id'));
561
        if ($debtor_account->get('id') == 0 || $debtor_account->get('type') != 'balance, asset') {
562
            $this->error->set('invalid debtor account set in the accounting settings');
563
        }
564
565
        if ($this->error->isError()) {
566
            return false;