This commit is contained in:
Laurent Destailleur 2022-05-18 00:10:44 +02:00
parent 68b25b35b4
commit 2e15a14c14
2 changed files with 13 additions and 11 deletions

View File

@ -1733,10 +1733,10 @@ if ($action == 'create' && $usercancreate) {
$form->selectAvailabilityDelay($availability_id, 'availability_id', '', 1, 'maxwidth200 widthcentpercentminusx');
print '</td></tr>';
// Terms of the settlement
// Terms of payment
print '<tr><td class="nowrap">'.$langs->trans('PaymentConditionsShort').'</td><td>';
print img_picto('', 'paiment', 'class="pictofixedwidth"');
$form->select_conditions_paiements($cond_reglement_id, 'cond_reglement_id', 1, 1, 0, '', $deposit_percent);
print img_picto('', 'payment', 'class="pictofixedwidth"');
$form->select_conditions_paiements($cond_reglement_id, 'cond_reglement_id', 1, 1, 0, 'maxwidth200 widthcentpercentminusx', $deposit_percent);
print '</td></tr>';
// Payment mode
@ -1836,7 +1836,7 @@ if ($action == 'create' && $usercancreate) {
print '<tr>';
print '<td>'.$form->editfieldkey("Currency", 'multicurrency_code', '', $object, 0).'</td>';
print '<td class="maxwidthonsmartphone">';
print img_picto('', 'currency', 'class="pictofixedwidth"').$form->selectMultiCurrency($currency_code, 'multicurrency_code');
print img_picto('', 'currency', 'class="pictofixedwidth"').$form->selectMultiCurrency($currency_code, 'multicurrency_code', 0, '', false, 'maxwidth200 widthcentpercentminusx');
print '</td></tr>';
}

View File

@ -5883,14 +5883,16 @@ class Form
/**
* Return array of currencies in user language
*
* @param string $selected preselected currency code
* @param string $htmlname name of HTML select list
* @param integer $useempty 1=Add empty line
* @param string $filter Optional filters criteras (example: 'code <> x', ' in (1,3)')
* @param bool $excludeConfCurrency false = If company current currency not in table, we add it into list. Should always be available. true = we are in currency_rate update , we don't want to see conf->currency in select
* @param string $selected Preselected currency code
* @param string $htmlname Name of HTML select list
* @param integer $useempty 1=Add empty line
* @param string $filter Optional filters criteras (example: 'code <> x', ' in (1,3)')
* @param bool $excludeConfCurrency false = If company current currency not in table, we add it into list. Should always be available.
* true = we are in currency_rate update , we don't want to see conf->currency in select
* @param string $morecss More css
* @return string
*/
public function selectMultiCurrency($selected = '', $htmlname = 'multicurrency_code', $useempty = 0, $filter = '', $excludeConfCurrency = false)
public function selectMultiCurrency($selected = '', $htmlname = 'multicurrency_code', $useempty = 0, $filter = '', $excludeConfCurrency = false, $morecss = '')
{
global $conf, $langs;
@ -5911,7 +5913,7 @@ class Form
}
$out = '';
$out .= '<select class="flat" name="'.$htmlname.'" id="'.$htmlname.'">';
$out .= '<select class="flat'.($morecss ? ' '.$morecss : '').'" name="'.$htmlname.'" id="'.$htmlname.'">';
if ($useempty) {
$out .= '<option value="">&nbsp;</option>';
}