Debug v23

This commit is contained in:
Laurent Destailleur 2026-03-01 20:01:01 +01:00
parent 5f99494fed
commit 58852eaa57

View file

@ -1816,7 +1816,7 @@ if ($source == 'member' || $source == 'membersubscription') {
}
// TODO Move this into previous hook
if (getDolGlobalString('MEMBER_NEWFORM_DOLIBARRTURNOVER')) {
if (getDolGlobalString('MEMBER_NEWFORM_DOLIBARRTURNOVER') && $action != 'dopayment') {
$country_id = 0;
if ($member->thirdparty instanceOf Societe) {
$country_id = $member->thirdparty->country_id;
@ -1844,7 +1844,7 @@ if ($source == 'member' || $source == 'membersubscription') {
$country_code = dol_getIdFromCode($db, $country_id, 'c_country', 'rowid', 'code');
if ($country_code === 'FR' && $checkednature === 'mor' && (GETPOST('reload') ? GETPOST('pp') : $pp)) {
print '<input type="text" name="budget" id="budget" class="flat turnover right width100" value="'.GETPOST('budget').'" required'.($action != 'dopayment' ? 'autofocus' : '').'>';
print '<input type="text" name="budget" id="budget" class="flat turnover right width100" value="'.GETPOST('budget').'"'.($action != 'dopayment' ? ' required autofocus' : '').'>';
} else {
$arraybudget = array('50' => '<= 100 000', '100' => '<= 200 000', '200' => '<= 500 000', '300' => '<= 1 500 000', '600' => '<= 3 000 000', '1000' => '<= 5 000 000', '2000' => '5 000 000+');
print $form->selectarray('budget', $arraybudget, GETPOSTINT('budget'), 1, 0, 0, ($checkednature === 'mor' ? 'required' :''), 0, 0, 0, '');
@ -1924,6 +1924,9 @@ if ($source == 'member' || $source == 'membersubscription') {
}
if (selectcountry_id == 1) {
if (jQuery("#budget").val() == \'\') {
return null;
}
if (pp) {
console.log("value selected in input text field is "+jQuery("#budget").val());
newamount = Math.max(Math.round(price2numjs(jQuery("#budget").val()) * 0.005), 50);