19declare(strict_types=1);
38 $this->
id = (
int) $data[
'unit_id'];
39 $this->unit =
$data[
'unit'];
40 $this->factor = (float)
$data[
'factor'];
41 $this->baseunit = (
int)
$data[
'baseunit_fi'];
42 $this->baseunit_title =
$data[
'baseunit_title'] ??
null;
43 $this->category = (
int)
$data[
'category'];
44 $this->sequence = (
int)
$data[
'sequence'];
57 public function setUnit(
string $unit): void
94 if ($this->baseunit > 0) {
128 if (strcmp(
'-qpl_qst_formulaquestion_' .
$unit .
'-',
$lng->txt(
'qpl_qst_formulaquestion_' .
$unit)) !== 0) {
141 'SELECT factor FROM il_qpl_qst_fq_unit WHERE unit_id = %s',
148 return (
float) $row[
'factor'];