fix: delete function optional and id value

This commit is contained in:
BENKE Charlene 2019-10-29 17:27:30 +01:00 committed by GitHub
parent 4eedf4a113
commit 1b7e138e01
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3585,7 +3585,7 @@ class CommandeFournisseurLigne extends CommonOrderLine
* @param int $notrigger 1=Disable call to triggers
* @return int <0 if KO, >0 if OK
*/
public function delete($notrigger)
public function delete($notrigger = 0)
{
global $user;
@ -3593,7 +3593,7 @@ class CommandeFournisseurLigne extends CommonOrderLine
$this->db->begin();
$sql = 'DELETE FROM '.MAIN_DB_PREFIX."commande_fournisseurdet WHERE rowid=".$this->rowid;
$sql = 'DELETE FROM '.MAIN_DB_PREFIX."commande_fournisseurdet WHERE rowid=".$this->id;
dol_syslog(__METHOD__, LOG_DEBUG);
$resql=$this->db->query($sql);