Fix delete commande fournisseur line linked to commandedet (#31136)
When a commande fournisseur line is deleted, the wrong commandedet.fk_commandefourndet was set to NULL and the commande fournisseur line deletion was impossible if it was link to a commandet. Co-authored-by: Ulysse Valdenaire <uvaldenaire@easya.solutions>
This commit is contained in:
parent
e125ab4783
commit
79edf0fb15
1 changed files with 1 additions and 1 deletions
|
|
@ -4135,7 +4135,7 @@ class CommandeFournisseurLigne extends CommonOrderLine
|
|||
return -1;
|
||||
}
|
||||
|
||||
$sql1 = 'UPDATE '.MAIN_DB_PREFIX."commandedet SET fk_commandefourndet = NULL WHERE rowid=".((int) $this->id);
|
||||
$sql1 = 'UPDATE '.MAIN_DB_PREFIX."commandedet SET fk_commandefourndet = NULL WHERE fk_commandefourndet=".((int) $this->id);
|
||||
$resql = $this->db->query($sql1);
|
||||
if (!$resql) {
|
||||
$this->db->rollback();
|
||||
|
|
|
|||
Loading…
Reference in a new issue