Fix: [ bug #233 ] Delete invoice problem with a discount
This commit is contained in:
parent
a4570c578e
commit
e08e07c493
@ -1205,8 +1205,8 @@ class Facture extends CommonObject
|
|||||||
if (sizeof($list_rowid_det))
|
if (sizeof($list_rowid_det))
|
||||||
{
|
{
|
||||||
$sql = 'UPDATE '.MAIN_DB_PREFIX.'societe_remise_except';
|
$sql = 'UPDATE '.MAIN_DB_PREFIX.'societe_remise_except';
|
||||||
$sql.= ' SET fk_facture = NULL';
|
$sql.= ' SET fk_facture = NULL, fk_facture_line = NULL';
|
||||||
$sql.= ' WHERE fk_facture IN ('.join(',',$list_rowid_det).')';
|
$sql.= ' WHERE fk_facture_line IN ('.join(',',$list_rowid_det).')';
|
||||||
|
|
||||||
dol_syslog("Facture.class::delete sql=".$sql);
|
dol_syslog("Facture.class::delete sql=".$sql);
|
||||||
if (! $this->db->query($sql))
|
if (! $this->db->query($sql))
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user