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

This commit is contained in:
Laurent Destailleur 2018-03-02 17:54:42 +01:00
commit 6bb91dd5d2

View File

@ -2283,9 +2283,12 @@ class Facture extends CommonInvoice
$final = ($this->lines[$i]->situation_percent == 100); $final = ($this->lines[$i]->situation_percent == 100);
$i++; $i++;
} }
if ($final) {
$this->setFinal($user); if (empty($final)) $this->situation_final = 0;
} else $this->situation_final = 1;
$this->setFinal($user);
} }
} }
} }
@ -4106,7 +4109,6 @@ class Facture extends CommonInvoice
$this->db->begin(); $this->db->begin();
$this->situation_final = 1;
$sql = 'UPDATE ' . MAIN_DB_PREFIX . 'facture SET situation_final = ' . $this->situation_final . ' where rowid = ' . $this->id; $sql = 'UPDATE ' . MAIN_DB_PREFIX . 'facture SET situation_final = ' . $this->situation_final . ' where rowid = ' . $this->id;
dol_syslog(__METHOD__, LOG_DEBUG); dol_syslog(__METHOD__, LOG_DEBUG);