Fixed saving edit_by in some Controllers
This commit is contained in:
@@ -2,8 +2,18 @@
|
||||
|
||||
class Vatgroup extends mfBaseModel {
|
||||
private $rates;
|
||||
|
||||
private function loadRates() {
|
||||
|
||||
protected function beforeUpdate($data) {
|
||||
if(!array_key_exists("edit_by", $data)) {
|
||||
$me = new User();
|
||||
$me->loadMe();
|
||||
$data["edit_by"] = $me->id;
|
||||
}
|
||||
|
||||
return $data;
|
||||
}
|
||||
|
||||
private function loadRates() {
|
||||
foreach(VatrateModel::search(["vatgroup_id" => $this->id]) as $rate) {
|
||||
$this->rates[$rate->area] = $rate;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user