diff --git a/htdocs/core/class/html.form.class.php b/htdocs/core/class/html.form.class.php
index a81f40ebc2f..0b862caba1b 100644
--- a/htdocs/core/class/html.form.class.php
+++ b/htdocs/core/class/html.form.class.php
@@ -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;
+ }
}