Fix method of herited object has same signature than parent

This commit is contained in:
Laurent Destailleur 2017-11-25 11:10:52 +01:00
parent bdecef56f9
commit 412c4e335d
2 changed files with 16 additions and 13 deletions

View File

@ -1033,28 +1033,31 @@ class FactureRec extends CommonInvoice
* Return label of object status * Return label of object status
* *
* @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=short label + picto, 6=Long label + picto * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=short label + picto, 6=Long label + picto
* @return string Label * @param integer $alreadypaid Not used on recurring invoices
* @return string Label of status
*/ */
function getLibStatut($mode=0) function getLibStatut($mode=0, $alreadypaid=-1)
{ {
return $this->LibStatut($this->frequency?1:0, $this->suspended, $mode, empty($this->type)?0:$this->type);
return $this->LibStatut($this->frequency?1:0, $this->suspended, $mode, $alreadypaid, empty($this->type)?0:$this->type);
} }
/** /**
* Renvoi le libelle d'un statut donne * Return label of a status
* *
* @param int $recur Is it a recurring invoice ? * @param int $recur Is it a recurring invoice ?
* @param int $status Id status (suspended or not) * @param int $status Id status (suspended or not)
* @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=short label + picto, 6=long label + picto * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=short label + picto, 6=long label + picto
* @param integer $alreadypaid Not used for recurring invoices
* @param int $type Type invoice * @param int $type Type invoice
* @return string Libelle du statut * @return string Label of status
*/ */
function LibStatut($recur, $status, $mode=0, $type=0) function LibStatut($recur, $status, $mode=0, $alreadypaid=-1, $type=0)
{ {
global $langs; global $langs;
$langs->load('bills'); $langs->load('bills');
//print "$recur,$status,$mode,$type"; //print "$recur,$status,$mode,$alreadypaid,$type";
if ($mode == 0) if ($mode == 0)
{ {
$prefix=''; $prefix='';

View File

@ -296,7 +296,7 @@ abstract class CommonInvoice extends CommonObject
* *
* @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=short label + picto, 6=Long label + picto * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=short label + picto, 6=Long label + picto
* @param integer $alreadypaid 0=No payment already done, >0=Some payments were already done (we recommand to put here amount payed if you have it, 1 otherwise) * @param integer $alreadypaid 0=No payment already done, >0=Some payments were already done (we recommand to put here amount payed if you have it, 1 otherwise)
* @return string Label * @return string Label of status
*/ */
function getLibStatut($mode=0, $alreadypaid=-1) function getLibStatut($mode=0, $alreadypaid=-1)
{ {
@ -304,14 +304,14 @@ abstract class CommonInvoice extends CommonObject
} }
/** /**
* Renvoi le libelle d'un statut donne * Return label of a status
* *
* @param int $paye Status field paye * @param int $paye Status field paye
* @param int $status Id status * @param int $status Id status
* @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=short label + picto, 6=long label + picto * @param int $mode 0=long label, 1=short label, 2=Picto + short label, 3=Picto, 4=Picto + long label, 5=short label + picto, 6=long label + picto
* @param integer $alreadypaid 0=No payment already done, >0=Some payments were already done (we recommand to put here amount payed if you have it, -1 otherwise) * @param integer $alreadypaid 0=No payment already done, >0=Some payments were already done (we recommand to put here amount payed if you have it, -1 otherwise)
* @param int $type Type invoice * @param int $type Type invoice
* @return string Libelle du statut * @return string Label of status
*/ */
function LibStatut($paye, $status, $mode=0, $alreadypaid=-1, $type=0) function LibStatut($paye, $status, $mode=0, $alreadypaid=-1, $type=0)
{ {