Files
thetool/application/Invoiceposition/Invoiceposition.php
2024-07-01 11:44:19 +02:00

34 lines
753 B
PHP

<?php
class Invoiceposition extends mfBaseModel {
public function __clone() {
$me = new User;
$me->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");
}
}