add noprint parameter to select_conditions_paiements

This commit is contained in:
Christophe Battarel 2023-12-14 14:49:52 +01:00
parent 880fc534b8
commit 816d29d177

View file

@ -4304,13 +4304,19 @@ class Form
* @param string $deposit_percent < 0 : deposit_percent input makes no sense (for example, in list filters)
* 0 : use default deposit percentage from entry
* > 0 : force deposit percentage (for example, from company object)
* @param int $noprint if set to one we return the html to print, if 0 (default) we print it
* @return void
* @deprecated
*/
public function select_conditions_paiements($selected = 0, $htmlname = 'condid', $filtertype = -1, $addempty = 0, $noinfoadmin = 0, $morecss = '', $deposit_percent = -1)
public function select_conditions_paiements($selected = 0, $htmlname = 'condid', $filtertype = -1, $addempty = 0, $noinfoadmin = 0, $morecss = '', $deposit_percent = -1, $noprint = 0)
{
// phpcs:enable
print $this->getSelectConditionsPaiements($selected, $htmlname, $filtertype, $addempty, $noinfoadmin, $morecss, $deposit_percent);
$out = $this->getSelectConditionsPaiements($selected, $htmlname, $filtertype, $addempty, $noinfoadmin, $morecss, $deposit_percent, $noprint);
if (empty($noprint)) {
print $out;
} else {
return $out;
}
}