Code Duplication    Length = 6-6 lines in 3 locations

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

@@ 267-272 (lines=6) @@
264
            $this->error->set('Filen blev ikke overflyttet');
265
        }
266
267
        if ($this->error->isError()) {
268
            $this->error->set('Der er opstået en fejl under bogføringen af fakturaen. Det kan betyde at dele af den er bogført, men ikke det hele. Du bedes manuelt tjekke bilaget');
269
            // I am not quite sure if the invoice should be set as stated, but it can give trouble to state it again, if some of it was stated...
270
            $this->setStated($voucher->get('id'), $this_date->get());
271
            return false;
272
        }
273
274
        $this->setStated($voucher->get('id'), $this_date->get());
275
        $this->load();

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

@@ 205-210 (lines=6) @@
202
            $this->error->set('Filen blev ikke overflyttet');
203
        }
204
205
        if ($this->error->isError()) {
206
            $this->error->set('Der er opst�et en fejl under bogf�ringen af kreditnotaen. Det kan betyde at dele af den er bogf�rt, men ikke det hele. Du bedes manuelt tjekke bilaget');
207
            // I am not quite sure if the credit note should be set as stated, but it can give trouble to state it again, if some of it was stated...
208
            $this->setStated($voucher->get('id'), $this_date->get());
209
            return false;
210
        }
211
212
        $this->setStated($voucher->get('id'), $this_date->get());
213
        $this->load();

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

@@ 654-659 (lines=6) @@
651
            $this->error->set('Filen blev ikke overflyttet');
652
        }
653
654
        if ($this->error->isError()) {
655
            $this->error->set('An error occured while stating the reminder. This can mean that parts of the reminder was not state correct. Please check the voucher.');
656
            // I am not quite sure if the invoice should be set as stated, but it can give trouble to state it again, if some of it was stated...
657
            $this->setStated($voucher->get('id'), $this_date->get());
658
            return false;
659
        }
660
661
        $this->setStated($voucher->get('id'), $this_date->get());
662
        $this->load();