Code Duplication    Length = 4-4 lines in 2 locations

src/Intraface/modules/debtor/DebtorItem.php 2 locations

@@ 351-354 (lines=4) @@
348
        }
349
350
        // hvis det er et kreditnota, skal fakturastatus opdateres
351
        if ($this->debtor->get("type") == "credit_note" && $this->debtor->get("where_from") == "invoice" && $this->debtor->get("where_from_id") != 0) {
352
            $invoice = Debtor::factory($this->debtor->kernel, (int)$this->debtor->get("where_from_id"));
353
            $invoice->updateStatus();
354
        }
355
356
        return $this->id;
357
    }
@@ 422-425 (lines=4) @@
419
        $this->db->query("UPDATE debtor_item SET active = 0 WHERE id = ".$this->id." AND debtor_id = ".$this->debtor->get("id"));
420
        $this->id = 0;
421
422
        if ($this->debtor->get("type") == "credit_note" && $this->debtor->get("where_from") == "invoice" && $this->debtor->get("where_from_id") != 0) {
423
            $invoice = Debtor::factory($this->debtor->kernel, intval($this->debtor->get("where_from_id")));
424
            $invoice->updateStatus();
425
        }
426
427
        return true;
428
    }