Merge pull request #12263 from defrance/patch-144

fix: delete function optional and id value
This commit is contained in:
Laurent Destailleur 2019-11-02 11:49:04 +01:00 committed by GitHub
commit 7e6732c11b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -3586,7 +3586,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;
@ -3594,7 +3594,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);