Fix : we can't use the reserved word offset (#26705)
This commit is contained in:
parent
1b91a9f83b
commit
05884f9b6a
1 changed files with 4 additions and 3 deletions
|
|
@ -2603,7 +2603,7 @@ class ExpenseReport extends CommonObject
|
|||
//Clean
|
||||
$qty = price2num($qty);
|
||||
|
||||
$sql = " SELECT r.range_ik, t.ikoffset as offset, t.coef";
|
||||
$sql = " SELECT r.range_ik, t.ikoffset, t.coef";
|
||||
$sql .= " FROM ".MAIN_DB_PREFIX."expensereport_ik t";
|
||||
$sql .= " LEFT JOIN ".MAIN_DB_PREFIX."c_exp_tax_range r ON r.rowid = t.fk_range";
|
||||
$sql .= " WHERE t.fk_c_exp_tax_cat = ".(int) $fk_cat;
|
||||
|
|
@ -2630,6 +2630,7 @@ class ExpenseReport extends CommonObject
|
|||
$obj = $this->db->fetch_object($resql);
|
||||
$cumulYearQty = $obj->cumul;
|
||||
}
|
||||
|
||||
$qty = $cumulYearQty + $qty;
|
||||
}
|
||||
|
||||
|
|
@ -2647,12 +2648,12 @@ class ExpenseReport extends CommonObject
|
|||
if ($i < ($num - 1)) {
|
||||
if ($qty > $ranges[$i]->range_ik && $qty < $ranges[$i+1]->range_ik) {
|
||||
$coef = $ranges[$i]->coef;
|
||||
$offset = $ranges[$i]->offset;
|
||||
$offset = $ranges[$i]->ikoffset;
|
||||
}
|
||||
} else {
|
||||
if ($qty > $ranges[$i]->range_ik) {
|
||||
$coef = $ranges[$i]->coef;
|
||||
$offset = $ranges[$i]->offset;
|
||||
$offset = $ranges[$i]->ikoffset;
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in a new issue