fix situation line's total
This commit is contained in:
parent
c7f54439ff
commit
4ddca02bb9
@ -4834,7 +4834,7 @@ class FactureLigne extends CommonInvoiceLine
|
|||||||
$resql = $this->db->query($sql);
|
$resql = $this->db->query($sql);
|
||||||
if ($resql && $resql->num_rows > 0) {
|
if ($resql && $resql->num_rows > 0) {
|
||||||
$res = $this->db->fetch_array($resql);
|
$res = $this->db->fetch_array($resql);
|
||||||
return $res['situation_percent'];
|
return floatval($res['situation_percent']);
|
||||||
} else {
|
} else {
|
||||||
$this->error = $this->db->error();
|
$this->error = $this->db->error();
|
||||||
dol_syslog(get_class($this) . "::select Error " . $this->error, LOG_ERR);
|
dol_syslog(get_class($this) . "::select Error " . $this->error, LOG_ERR);
|
||||||
|
|||||||
@ -1899,13 +1899,13 @@ function pdf_getlinetotalexcltax($object,$i,$outputlangs,$hidedetails=0)
|
|||||||
{
|
{
|
||||||
$prev_progress = 0;
|
$prev_progress = 0;
|
||||||
$progress = 1;
|
$progress = 1;
|
||||||
if (method_exists($object, 'get_prev_progress'))
|
if (method_exists($object->lines[$i], 'get_prev_progress'))
|
||||||
{
|
{
|
||||||
$prev_progress = $object->lines[$i]->get_prev_progress($object->id);
|
$prev_progress = $object->lines[$i]->get_prev_progress($object->id);
|
||||||
$progress = ($object->lines[$i]->situation_percent - $prev_progress) / 100;
|
$progress = ($object->lines[$i]->situation_percent - $prev_progress) / 100;
|
||||||
}
|
}
|
||||||
$result.=price($sign * ($total_ht/($object->lines[$i]->situation_percent/100)) * $progress, 0, $outputlangs);
|
$result.=price($sign * ($total_ht/($object->lines[$i]->situation_percent/100)) * $progress, 0, $outputlangs);
|
||||||
}
|
}
|
||||||
else
|
else
|
||||||
$result.=price($sign * $total_ht, 0, $outputlangs);
|
$result.=price($sign * $total_ht, 0, $outputlangs);
|
||||||
}
|
}
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user