Merge branch '13.0' of git@github.com:Dolibarr/dolibarr.git into 13.0

This commit is contained in:
Laurent Destailleur 2021-04-27 01:58:30 +02:00
commit ea040a423f
5 changed files with 12 additions and 7 deletions

View File

@ -555,7 +555,7 @@ class AccountancyExport
$Tab['signe_montant'] = '+';
// The amount must be in centimes without decimal points.
$Tab['montant'] = str_pad(abs(($data->debit - $abs->credit) * 100), 12, '0', STR_PAD_LEFT);
$Tab['montant'] = str_pad(abs(($data->debit - $data->credit) * 100), 12, '0', STR_PAD_LEFT);
$Tab['contrepartie'] = str_repeat(' ', 8);
// Force date format : %d%m%y

View File

@ -184,7 +184,7 @@ foreach ($dirmodels as $reldir)
{
print img_picto($langs->trans("Activated"), 'switch_on');
} else {
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setmo&token='.newToken().'&value='.preg_replace('/\.php$/', '', $file).'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
print '<a class="reposition" href="'.$_SERVER["PHP_SELF"].'?action=setmod&token='.newToken().'&value='.preg_replace('/\.php$/', '', $file).'&scan_dir='.$module->scandir.'&label='.urlencode($module->name).'" alt="'.$langs->trans("Default").'">'.img_picto($langs->trans("Disabled"), 'switch_off').'</a>';
}
print '</td>';

View File

@ -15,4 +15,6 @@
/.buildpath
/.project
# Other
*.back
*.back
/.editorconfig
/.gitattributes

View File

@ -208,9 +208,12 @@ if (empty($reshook) && $action == 'add') {
$error++;
$errmsg .= $langs->trans("ErrorFieldRequired", $langs->transnoentitiesnoconv("Firstname"))."<br>\n";
}
if (GETPOST("email") && !isValidEmail(GETPOST("email"))) {
if ($conf->global->ADHERENT_MAIL_REQUIRED && empty(GETPOST('email'))) {
$error++;
$errmsg .= $langs->trans('ErrorFieldRequired', $langs->transnoentitiesnoconv('Email'))."<br>\n";
} elseif (GETPOST("email") && !isValidEmail(GETPOST("email"))) {
+ $langs->load('errors');
$error++;
$langs->load("errors");
$errmsg .= $langs->trans("ErrorBadEMail", GETPOST("email"))."<br>\n";
}
$birthday = dol_mktime($_POST["birthhour"], $_POST["birthmin"], $_POST["birthsec"], $_POST["birthmonth"], $_POST["birthday"], $_POST["birthyear"]);
@ -586,7 +589,7 @@ if (empty($conf->global->SOCIETE_DISABLE_STATE)) {
print '</td></tr>';
}
// EMail
print '<tr><td>'.$langs->trans("Email").' <FONT COLOR="red">*</FONT></td><td><input type="text" name="email" maxlength="255" class="minwidth150" value="'.dol_escape_htmltag(GETPOST('email')).'"></td></tr>'."\n";
print '<tr><td>'.$langs->trans("Email").($conf->global->ADHERENT_MAIL_REQUIRED ? ' <span style="color:red;">*</span>' : '').'</td><td><input type="text" name="email" maxlength="255" class="minwidth150" value="'.dol_escape_htmltag(GETPOST('email')).'"></td></tr>'."\n";
// Login
if (empty($conf->global->ADHERENT_LOGIN_NOT_REQUIRED)) {
print '<tr><td>'.$langs->trans("Login").' <FONT COLOR="red">*</FONT></td><td><input type="text" name="login" maxlength="50" class="minwidth100"value="'.dol_escape_htmltag(GETPOST('login')).'"></td></tr>'."\n";

View File

@ -534,7 +534,7 @@ class ProductCombination
$new_price += $variation_price;
}
$child->updatePrice($new_price, $new_type, $user, $new_vat, $new_min_price, $i, $new_npr, $new_psq);
$child->updatePrice($new_price, $new_type, $user, $new_vat, $new_min_price, $i, $new_npr, $new_psq, 0, array(), $parent->default_vat_code);
}
}
} else {