Fix code syntax
This commit is contained in:
parent
201e46f34b
commit
5756f0cfdf
@ -981,12 +981,12 @@ class ExpenseReport extends CommonObject
|
||||
if ($result) {
|
||||
$num = $this->db->num_rows($result);
|
||||
$i = 0;
|
||||
while ($i < $num) :
|
||||
while ($i < $num) {
|
||||
$objp = $this->db->fetch_object($result);
|
||||
$total_ht += $objp->total_ht;
|
||||
$total_tva += $objp->total_tva;
|
||||
$i++;
|
||||
endwhile;
|
||||
}
|
||||
|
||||
$total_ttc = $total_ht + $total_tva;
|
||||
$sql = "UPDATE ".MAIN_DB_PREFIX.$this->table_element." SET";
|
||||
@ -995,14 +995,14 @@ class ExpenseReport extends CommonObject
|
||||
$sql .= " , total_tva = ".price2num($total_tva, 'MT');
|
||||
$sql .= " WHERE rowid = ".((int) $id);
|
||||
$result = $this->db->query($sql);
|
||||
if ($result) :
|
||||
if ($result) {
|
||||
$this->db->free($result);
|
||||
return 1;
|
||||
else :
|
||||
} else {
|
||||
$this->error = $this->db->lasterror();
|
||||
dol_syslog(get_class($this)."::recalculer: Error ".$this->error, LOG_ERR);
|
||||
return -3;
|
||||
endif;
|
||||
}
|
||||
} else {
|
||||
$this->error = $this->db->lasterror();
|
||||
dol_syslog(get_class($this)."::recalculer: Error ".$this->error, LOG_ERR);
|
||||
@ -1749,12 +1749,12 @@ class ExpenseReport extends CommonObject
|
||||
$sql .= " WHERE rowid = ".$this->id;
|
||||
|
||||
$result = $this->db->query($sql);
|
||||
if ($result) :
|
||||
if ($result) {
|
||||
return 1;
|
||||
else :
|
||||
} else {
|
||||
$this->error = $this->db->error();
|
||||
return -1;
|
||||
endif;
|
||||
}
|
||||
}
|
||||
|
||||
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.ScopeNotCamelCaps
|
||||
@ -1779,12 +1779,12 @@ class ExpenseReport extends CommonObject
|
||||
$sql .= " WHERE rowid = ".$this->id;
|
||||
|
||||
$result = $this->db->query($sql);
|
||||
if ($result) :
|
||||
if ($result) {
|
||||
return 1;
|
||||
else :
|
||||
} else {
|
||||
$this->error = $this->db->error();
|
||||
return -1;
|
||||
endif;
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
|
||||
Loading…
Reference in New Issue
Block a user