Merge branch '7.0' of git@github.com:Dolibarr/dolibarr.git into 7.0

This commit is contained in:
Laurent Destailleur 2018-03-29 15:31:35 +02:00
commit 2e22c13062
2 changed files with 4 additions and 1 deletions

View File

@ -2307,11 +2307,13 @@ abstract class CommonObject
if (! $this->table_element)
{
$this->error='update_note was called on objet with property table_element not defined';
dol_syslog(get_class($this)."::update_note was called on objet with property table_element not defined", LOG_ERR);
return -1;
}
if (! in_array($suffix,array('','_public','_private')))
{
$this->error='update_note Parameter suffix must be empty, \'_private\' or \'_public\'';
dol_syslog(get_class($this)."::update_note Parameter suffix must be empty, '_private' or '_public'", LOG_ERR);
return -2;
}
@ -4787,6 +4789,7 @@ abstract class CommonObject
if (! $resql)
{
$this->error=$this->db->lasterror();
dol_syslog(get_class($this) . "::".__METHOD__ . $this->error, LOG_ERR);
$this->db->rollback();
return -1;
}

View File

@ -1246,7 +1246,7 @@ class ExpenseReport extends CommonObject
$error = 0;
// date approval
$this->date_approve = $this->db->idate($now);
$this->date_approve = $now;
if ($this->fk_statut != 5)
{
$this->db->begin();