Fixed saving edit_by in some Controllers
This commit is contained in:
@@ -10,8 +10,19 @@ class OrderProduct extends mfBaseModel {
|
||||
private $voiceplan;
|
||||
private $editor;
|
||||
private $creator;
|
||||
|
||||
public function formatAmount() {
|
||||
|
||||
protected function beforeUpdate($data) {
|
||||
if(!array_key_exists("edit_by", $data)) {
|
||||
$me = new User();
|
||||
$me->loadMe();
|
||||
$data["edit_by"] = $me->id;
|
||||
}
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
|
||||
public function formatAmount() {
|
||||
if(!$this->id) {
|
||||
return 0;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user