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

This commit is contained in:
Laurent Destailleur 2024-07-06 00:51:24 +02:00
commit fb5bda01b2
4 changed files with 37 additions and 21 deletions

View File

@ -684,9 +684,9 @@ if ($action == 'edit') {
}
print $text;
if (getDolGlobalString('MAIN_MAIL_SENDMODE', 'mail') == 'mail' && !getDolGlobalString('MAIN_HIDE_WARNING_TO_ENCOURAGE_SMTP_SETUP')) {
if (getDolGlobalString('MAIN_MAIL_SENDMODE', 'mail') == 'mail' && getDolGlobalString('MAIN_HIDE_WARNING_TO_ENCOURAGE_SMTP_SETUP')) {
$textwarning = $langs->trans("WarningPHPMail").'<br>'.$langs->trans("WarningPHPMailA").'<br>'.$langs->trans("WarningPHPMailB").'<br>'.$langs->trans("WarningPHPMailC").'<br><br>'.$langs->trans("WarningPHPMailD");
print $form->textwithpicto('', '<span class="small">'.$textwarning.'</span>', 1, 'warning', 'nomargintop');
print $form->textwithpicto('', '<span class="small">'.$textwarning.'</span>', 1, 'help', 'nomargintop');
}
print '</td></tr>';
@ -831,7 +831,7 @@ if ($action == 'edit') {
$messagetoshow = str_replace('{s1}', $linktosetvar1, $messagetoshow);
$messagetoshow = str_replace('{s2}', $linktosetvar2, $messagetoshow);
//print $messagetoshow;
print info_admin($messagetoshow, 0, 0, 'warning nomargintop');
print info_admin($messagetoshow, 0, 0, 'warning', 'nomargintop', '', 'warning');
}
print '<br>';

View File

@ -108,7 +108,7 @@ if ($sortorder) {
$param .= '&sortorder='.$sortorder;
}
$totalnboflines = 0;
$totalnboflines = '';
$num = 0;
print '<form method="POST" action="'.$_SERVER["PHP_SELF"].'">';
@ -123,6 +123,7 @@ print '<input type="hidden" name="page" value="'.$page.'">';
print '<input type="hidden" name="mode" value="'.$mode.'">';
$nav = ($year ? '<a href="index.php?year='.($year - 1).$param.'">'.img_previous($langs->trans("Previous"), 'class="valignbottom"')."</a> ".$langs->trans("Year").' '.$year.' <a href="index.php?year='.($year + 1).$param.'">'.img_next($langs->trans("Next"), 'class="valignbottom"')."</a>" : "");
print_barre_liste($title, $page, $_SERVER["PHP_SELF"], $param, $sortfield, $sortorder, '', $num, $totalnboflines, 'object_payment', 0, $nav, '', $limit, 1);
if ($year) {
@ -138,13 +139,13 @@ if (isModEnabled('tax') && $user->hasRight('tax', 'charges', 'lire')) {
print '<table class="noborder centpercent">';
print '<tr class="liste_titre">';
print_liste_field_titre("PeriodEndDate", $_SERVER["PHP_SELF"], "cs.date_ech", "", $param, '', $sortfield, $sortorder, 'nowraponall ');
print_liste_field_titre("PeriodEndDate", $_SERVER["PHP_SELF"], "cs.date_ech", "", $param, 'width="120"', $sortfield, $sortorder, 'nowraponall ');
print_liste_field_titre("Label", $_SERVER["PHP_SELF"], "c.libelle", "", $param, '', $sortfield, $sortorder);
print_liste_field_titre("Type", $_SERVER["PHP_SELF"], "cs.fk_type", "", $param, '', $sortfield, $sortorder);
print_liste_field_titre("ExpectedToPay", $_SERVER["PHP_SELF"], "cs.amount", "", $param, 'class="right"', $sortfield, $sortorder);
print_liste_field_titre("RefPayment", $_SERVER["PHP_SELF"], "pc.rowid", "", $param, '', $sortfield, $sortorder);
print_liste_field_titre("DatePayment", $_SERVER["PHP_SELF"], "pc.datep", "", $param, 'align="center"', $sortfield, $sortorder);
print_liste_field_titre("Type", $_SERVER["PHP_SELF"], "pct.code", "", $param, '', $sortfield, $sortorder);
print_liste_field_titre("PaymentMode", $_SERVER["PHP_SELF"], "pct.code", "", $param, '', $sortfield, $sortorder);
if (isModEnabled("bank")) {
print_liste_field_titre("BankAccount", $_SERVER["PHP_SELF"], "ba.label", "", $param, "", $sortfield, $sortorder);
}
@ -205,7 +206,7 @@ if (isModEnabled('tax') && $user->hasRight('tax', 'charges', 'lire')) {
print $socialcontrib->getNomUrl(1, '20');
print '</td>';
// Type
print '<td><a href="'.DOL_URL_ROOT.'/compta/sociales/list.php?filtre=cs.fk_type:'.$obj->type.'">'.$obj->label.'</a></td>';
print '<td class="tdoverflowmax200"><a href="'.DOL_URL_ROOT.'/compta/sociales/list.php?filtre=cs.fk_type:'.$obj->type.'">'.$obj->label.'</a></td>';
// Expected to pay
print '<td class="right"><span class="amount">'.price($obj->total).'</span></td>';
// Ref payment
@ -214,12 +215,17 @@ if (isModEnabled('tax') && $user->hasRight('tax', 'charges', 'lire')) {
print '<td>'.$payment_sc_static->getNomUrl(1)."</td>\n";
// Date payment
print '<td class="center">'.dol_print_date($db->jdate($obj->datep), 'day').'</td>';
// Type payment
print '<td>';
// Payment mode
$s = '';
if ($obj->payment_code) {
print $langs->trans("PaymentTypeShort".$obj->payment_code).' ';
$s .= $langs->trans("PaymentTypeShort".$obj->payment_code).' ';
}
print $obj->num_payment.'</td>';
$s .= $obj->num_payment;
print '<td class="tdoverflowmax125" title="'.dolPrintHTMLForAttribute($s).'>';
print $s;
print '</td>';
// Account
if (isModEnabled("bank")) {
print '<td>';
@ -309,12 +315,12 @@ if (isModEnabled('tax') && $user->hasRight('tax', 'charges', 'lire')) {
print '<table class="noborder centpercent">';
print '<tr class="liste_titre">';
print_liste_field_titre("PeriodEndDate", $_SERVER["PHP_SELF"], "pv.datev", "", $param, '', $sortfield, $sortorder, 'nowraponall ');
print_liste_field_titre("PeriodEndDate", $_SERVER["PHP_SELF"], "pv.datev", "", $param, 'width="120"', $sortfield, $sortorder, 'nowraponall ');
print_liste_field_titre("Label", $_SERVER["PHP_SELF"], "pv.label", "", $param, '', $sortfield, $sortorder);
print_liste_field_titre("ExpectedToPay", $_SERVER["PHP_SELF"], "pv.amount", "", $param, 'class="right"', $sortfield, $sortorder);
print_liste_field_titre("RefPayment", $_SERVER["PHP_SELF"], "ptva.rowid", "", $param, '', $sortfield, $sortorder);
print_liste_field_titre("DatePayment", $_SERVER["PHP_SELF"], "ptva.datep", "", $param, 'align="center"', $sortfield, $sortorder);
print_liste_field_titre("Type", $_SERVER["PHP_SELF"], "pct.code", "", $param, '', $sortfield, $sortorder);
print_liste_field_titre("PaymentMode", $_SERVER["PHP_SELF"], "pct.code", "", $param, '', $sortfield, $sortorder);
if (isModEnabled("bank")) {
print_liste_field_titre("BankAccount", $_SERVER["PHP_SELF"], "ba.label", "", $param, "", $sortfield, $sortorder);
}
@ -346,12 +352,15 @@ if (isModEnabled('tax') && $user->hasRight('tax', 'charges', 'lire')) {
// Date
print '<td class="center">'.dol_print_date($db->jdate($obj->date_payment), 'day')."</td>\n";
// Type payment
print '<td>';
// Payment mode
$s = '';
if ($obj->payment_code) {
print $langs->trans("PaymentTypeShort".$obj->payment_code).' ';
$s .= $langs->trans("PaymentTypeShort".$obj->payment_code).' ';
}
print $obj->num_payment.'</td>';
$s .= $obj->num_payment;
print '<td class="tdoverflowmax125" title="'.dolPrintHTMLForAttribute($s).'">';
print $s;
print '</td>';
// Account
if (isModEnabled("bank")) {
@ -378,6 +387,8 @@ if (isModEnabled('tax') && $user->hasRight('tax', 'charges', 'lire')) {
$i++;
}
print '<tr class="liste_total">';
print '<td class="liste_total" colspan="2">'.$langs->trans("Total").'</td>';
@ -481,7 +492,7 @@ while ($j < $numlt) {
$i++;
}
print '<tr class="liste_total"><td class="right" colspan="2">'.$langs->trans("Total").'</td>';
print '<tr class="liste_total"><td colspan="2">'.$langs->trans("Total").'</td>';
print '<td class="right">'.price($total)."</td>";
print '<td align="center">&nbsp;</td>';
print '<td align="center">&nbsp;</td>';

View File

@ -5737,9 +5737,10 @@ function img_searchclear($titlealt = 'default', $other = '')
* @param string $admin '1'=Info for admin users. '0'=Info for standard users (change only the look), 'error', 'warning', 'xxx'=Other
* @param string $morecss More CSS ('', 'warning', 'error')
* @param string $textfordropdown Show a text to click to dropdown the info box.
* @param string $picto '' or 'warning'
* @return string String with info text
*/
function info_admin($text, $infoonimgalt = 0, $nodiv = 0, $admin = '1', $morecss = 'hideonsmartphone', $textfordropdown = '')
function info_admin($text, $infoonimgalt = 0, $nodiv = 0, $admin = '1', $morecss = 'hideonsmartphone', $textfordropdown = '', $picto = '')
{
global $conf, $langs;
@ -5751,7 +5752,11 @@ function info_admin($text, $infoonimgalt = 0, $nodiv = 0, $admin = '1', $morecss
}
$class = (empty($admin) ? 'undefined' : ($admin == '1' ? 'info' : $admin));
$result = ($nodiv ? '' : '<div class="wordbreak '.$class.($morecss ? ' '.$morecss : '').($textfordropdown ? ' hidden' : '').'">').'<span class="fa fa-info-circle" title="'.dol_escape_htmltag($admin ? $langs->trans('InfoAdmin') : $langs->trans('Note')).'"></span> ';
$fa = 'info-circle';
if ($picto == 'warning') {
$fa = 'exclamation-triangle';
}
$result = ($nodiv ? '' : '<div class="wordbreak '.$class.($morecss ? ' '.$morecss : '').($textfordropdown ? ' hidden' : '').'">').'<span class="fa fa-'.$fa.'" title="'.dol_escape_htmltag($admin ? $langs->trans('InfoAdmin') : $langs->trans('Note')).'"></span> ';
$result .= dol_escape_htmltag($text, 1, 0, 'div,span,b,br,a');
$result .= ($nodiv ? '' : '</div>');

View File

@ -510,7 +510,7 @@ ModuleCompanyCodeCustomerDigitaria=%s followed by the truncated customer name by
ModuleCompanyCodeSupplierDigitaria=%s followed by the truncated supplier name by the number of characters: %s for the supplier accounting code.
Use3StepsApproval=By default, Purchase Orders need to be created and approved by 2 different users (one step/user to create and one step/user to approve. Note that if user has both permission to create and approve, one step/user will be enough). You can ask with this option to introduce a third step/user approval, if amount is higher than a dedicated value (so 3 steps will be necessary: 1=validation, 2=first approval and 3=second approval if amount is enough).<br>Set this to empty if one approval (2 steps) is enough, set it to a very low value (0.1) if a second approval (3 steps) is always required.
UseDoubleApproval=Use a 3 steps approval when amount (without tax) is higher than...
WarningPHPMail=WARNING: The setup to send emails from the application is using the default generic setup. It is often better to setup outgoing emails to use the email server of your Email Service Provider instead of the default setup for several reasons:
WarningPHPMail=WARNING: The setup to send emails from the application is using the default generic setup. This choice needs no technical knowledge to complete the setup.<br>However, it is often better to setup outgoing emails to use the email server of your Email Service Provider instead of the default setup for several reasons:
WarningPHPMailA=- Using the server of the Email Service Provider increases the trustworthiness of your email, so it increases the deliverability without being flagged as SPAM
WarningPHPMailB=- Some Email Service Providers (like Yahoo) do not allow you to send an email from another server than their own server. Your current setup uses the server of the application to send email and not the server of your email provider, so some recipients (the one compatible with the restrictive DMARC protocol), will ask your email provider if they can accept your email and some email providers (like Yahoo) may respond "no" because the server is not theirs, so few of your sent Emails may not be accepted for delivery (be careful also of your email provider's sending quota).
WarningPHPMailC=- Using the SMTP server of your own Email Service Provider to send emails is also interesting so all emails sent from application will also be saved into your "Sent" directory of your mailbox.