function price_mods() { $err = 0; $dish = new dish($this->data['dishid']); $autocalc = $dish->getAutocalc(); $only_notfree = false; if ($autocalc) { if ($err = $this->price_mods_autocalc()) { return $err; } $only_notfree = true; } if ($err = $this->price_mods_normal($only_notfree)) { return $err; } return 0; }