This commit is contained in:
Laurent Destailleur 2018-04-21 00:37:05 +02:00
parent 9b57dadc18
commit 1031fcd796

View File

@ -1984,6 +1984,7 @@ class Facture extends CommonInvoice
$this->db->begin();
dol_syslog(get_class($this)."::set_paid rowid=".$this->id, LOG_DEBUG);
$sql = 'UPDATE '.MAIN_DB_PREFIX.'facture SET';
$sql.= ' fk_statut='.self::STATUS_CLOSED;
if (! $close_code) $sql.= ', paye=1';
@ -1991,7 +1992,6 @@ class Facture extends CommonInvoice
if ($close_note) $sql.= ", close_note='".$this->db->escape($close_note)."'";
$sql.= ' WHERE rowid = '.$this->id;
dol_syslog(get_class($this)."::set_paid", LOG_DEBUG);
$resql = $this->db->query($sql);
if ($resql)
{