From e4f17c87632843aaaf2e6f81492ca42d1dabca29 Mon Sep 17 00:00:00 2001
From: Laurent Destailleur <eldy@destailleur.fr>
Date: Wed, 28 Sep 2016 17:56:54 +0200
Subject: [PATCH] FIX #5793 Normalise code.

---
 htdocs/compta/facture/class/facture-rec.class.php | 6 +++---
 1 file changed, 3 insertions(+), 3 deletions(-)

diff --git a/htdocs/compta/facture/class/facture-rec.class.php b/htdocs/compta/facture/class/facture-rec.class.php
index ab797571c70..007c8040d0d 100644
--- a/htdocs/compta/facture/class/facture-rec.class.php
+++ b/htdocs/compta/facture/class/facture-rec.class.php
@@ -440,14 +440,14 @@ class FactureRec extends CommonInvoice
 	/**
 	 * 	Delete template invoice
 	 *
-	 *	@param     	int		$rowid      	Id of invoice to delete. If empty, we delete current instance of invoice
+	 *	@param     	User	$user          	User that delete.
 	 *	@param		int		$notrigger		1=Does not execute triggers, 0= execute triggers
 	 *	@param		int		$idwarehouse	Id warehouse to use for stock change.
 	 *	@return		int						<0 if KO, >0 if OK
 	 */
-	function delete($rowid=0, $notrigger=0, $idwarehouse=-1)
+	function delete($user, $notrigger=0, $idwarehouse=-1)
 	{
-	    if (empty($rowid)) $rowid=$this->id;
+	    $rowid=$this->id;
 	    
 	    dol_syslog(get_class($this)."::delete rowid=".$rowid, LOG_DEBUG);
 	    
-- 
GitLab