loadMe(); $old_id = $this->id; $this->id = null; // cleanup data $this->invoice_id = null; $this->create_by = $me->id; $this->edit_by = $me->id; $this->create = null; $this->edit = null; $this->saved = 0; $this->mode = "new"; $this->_old_data = new StdClass(); /*$this->save(); if($old_id == $this->id) { $this->log->error("save() of cloned Contract $old_id failed!"); throw new Exception("Saving clone failed."); }*/ //$this->log->debug("Cloned Invoiceposition $old_id"); } }