Code Duplication    Length = 10-10 lines in 2 locations

src/Intraface/modules/accounting/VatPeriod.php 1 location

@@ 122-131 (lines=10) @@
119
    /**
120
     * @return boolean
121
     */
122
    function delete()
123
    {
124
        $db = new DB_Sql;
125
        if ($this->isStated()) {
126
            $this->error->set('Du kan ikke slette en periode, der er bogf�rt');
127
            return false;
128
        }
129
        $db->query("UPDATE accounting_vat_period SET active = 0, date_updated = NOW() WHERE id = " . $this->id . " AND intranet_id = " . $this->year->kernel->intranet->get('id'));
130
        return true;
131
    }
132
133
    /**
134
     * @return boolean

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

@@ 126-135 (lines=10) @@
123
        return $number;
124
    }
125
126
    function isNumberFree($number)
127
    {
128
        $sql = "SELECT id FROM invoice_reminder WHERE number = ".intval($number)." AND id != ".$this->id . " AND intranet_id = " . $this->kernel->intranet->get('id');
129
        $this->db->query($sql);
130
        if ($this->db->nextRecord()) {
131
            return false;
132
        } else {
133
            return true;
134
        }
135
    }
136
137
    function save($input)
138
    {