FIX #7737
This commit is contained in:
parent
d421b90376
commit
36b4d50cff
@ -228,8 +228,12 @@ if (empty($reshook))
|
|||||||
$db->begin();
|
$db->begin();
|
||||||
|
|
||||||
$id = $object->create($user);
|
$id = $object->create($user);
|
||||||
|
if ($id <= 0)
|
||||||
|
{
|
||||||
|
$error++;
|
||||||
|
}
|
||||||
|
|
||||||
if ($id > 0)
|
if (! $error)
|
||||||
{
|
{
|
||||||
$db->commit();
|
$db->commit();
|
||||||
Header("Location: ".$_SERVER["PHP_SELF"]."?id=".$id);
|
Header("Location: ".$_SERVER["PHP_SELF"]."?id=".$id);
|
||||||
|
|||||||
@ -187,7 +187,8 @@ class ExpenseReport extends CommonObject
|
|||||||
$resql=$this->db->query($sql);
|
$resql=$this->db->query($sql);
|
||||||
if (!$resql) $error++;
|
if (!$resql) $error++;
|
||||||
|
|
||||||
if (is_array($this->lines) && count($this->lines)>0) {
|
if (is_array($this->lines) && count($this->lines)>0)
|
||||||
|
{
|
||||||
foreach ($this->lines as $i => $val)
|
foreach ($this->lines as $i => $val)
|
||||||
{
|
{
|
||||||
$newndfline=new ExpenseReportLine($this->db);
|
$newndfline=new ExpenseReportLine($this->db);
|
||||||
@ -205,6 +206,12 @@ class ExpenseReport extends CommonObject
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (! $error)
|
||||||
|
{
|
||||||
|
$result=$this->insertExtraFields();
|
||||||
|
if ($result < 0) $error++;
|
||||||
|
}
|
||||||
|
|
||||||
if (! $error)
|
if (! $error)
|
||||||
{
|
{
|
||||||
$result=$this->update_price();
|
$result=$this->update_price();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user