Code Duplication    Length = 4-4 lines in 3 locations

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

@@ 68-71 (lines=4) @@
65
            return false;
66
        }
67
68
        if ($this->get('status') != 'sent' && $this->get('status') != 'executed') {
69
            $this->error->set('Kreditnotaen skal v�re sendt eller afsluttet for at den kan bogf�res');
70
            return false;
71
        }
72
73
        $return = true;
74

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

@@ 113-116 (lines=4) @@
110
            return false;
111
        }
112
113
        if ($this->get('status') != 'sent' && $this->get('status') != 'executed') {
114
            $this->error->set('Fakturaen skal være sendt eller afsluttet for at den kan bogføres');
115
            return false;
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') {

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

@@ 550-553 (lines=4) @@
547
            $this->error->set('there is nothing to state on the reminder');
548
        }
549
550
        if ($this->get('status') != 'sent' && $this->get('status') != 'executed') {
551
            $this->error->set('the reminder should be sent of executed to be stated');
552
            return false;
553
        }
554
555
        if (!$year->readyForState()) {
556
            $this->error->set('accounting year is not ready for state');