WIP Contract/Billing/Invoice 2024-06-28
This commit is contained in:
34
application/Invoiceposition/Invoiceposition.php
Normal file
34
application/Invoiceposition/Invoiceposition.php
Normal file
@@ -0,0 +1,34 @@
|
||||
<?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");
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user