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

This commit is contained in:
Laurent Destailleur 2023-09-01 00:40:48 +02:00
commit b6430fb897
9 changed files with 44 additions and 27 deletions

View File

@ -1,5 +1,5 @@
<?php
/* Copyright (C) 2004-2017 Laurent Destailleur <eldy@users.sourceforge.net>
/* Copyright (C) 2004-2023 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2011-2021 Alexandre Spangaro <aspangaro@open-dsi.fr>
*
* This program is free software; you can redistribute it and/or modify
@ -852,6 +852,9 @@ if ($resql) {
print "</tr>\n";
$i++;
}
} else {
$colspan = 11;
print '<tr><td colspan="'.$colspan.'"><span class="opacitymedium">'.$langs->trans("None").'</td></tr>';
}
} else {
dol_print_error($db);

View File

@ -2639,7 +2639,6 @@ function fieldList($fieldlist, $obj = '', $tabname = '', $context = '')
$maxlength = '';
if (in_array($fieldlist[$field], array('libelle', 'label'))) {
switch ($tabname) {
case 'c_accounting_category':
case 'c_ecotaxe':
case 'c_email_senderprofile':
case 'c_forme_juridique':

View File

@ -592,8 +592,13 @@ if (!empty($conf->global->BILL_ADD_PAYMENT_VALIDATION)) {
}
}
$params = array();
if (! empty($title_button)) {
$params['attr'] = array('title' => $title_button);
}
if ($user->socid == 0 && $action == '') {
print dolGetButtonAction($langs->trans("Delete"), '', 'delete', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=delete&token='.newToken(), 'delete', $user->hasRight('facture', 'paiement') && !$disable_delete);
print dolGetButtonAction($langs->trans("Delete"), '', 'delete', $_SERVER["PHP_SELF"].'?id='.$object->id.'&action=delete&token='.newToken(), 'delete', $user->hasRight('facture', 'paiement') && !$disable_delete, $params);
}
print '</div>';

View File

@ -7097,7 +7097,7 @@ class Form
$arrayofdateof = $adddateof;
}
foreach ($arrayofdateof as $valuedateof) {
$tmpadddateof = $valuedateof['adddateof'];
$tmpadddateof = $valuedateof['adddateof'] != '' ? $valuedateof['adddateof'] : 0;
$tmplabeladddateof = $valuedateof['labeladddateof'];
$tmparray = dol_getdate($tmpadddateof);
if (empty($tmplabeladddateof)) {

View File

@ -235,7 +235,7 @@ class FormAccounting extends Form
public function select_accounting_category($selected = '', $htmlname = 'account_category', $useempty = 0, $maxlen = 0, $help = 1, $allcountries = 0)
{
// phpcs:enable
global $db, $langs, $user, $mysoc;
global $db, $langs, $mysoc;
if (empty($mysoc->country_id) && empty($mysoc->country_code) && empty($allcountries)) {
dol_print_error('', 'Call to select_accounting_account with mysoc country not yet defined');
@ -293,7 +293,7 @@ class FormAccounting extends Form
$out .= '</select>';
//if ($user->admin && $help) $out .= info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"),1);
} else {
$out = $langs->trans("ErrorNoAccountingCategoryForThisCountry", $mysoc->country_code);
$out = $langs->trans("ErrorNoAccountingCategoryForThisCountry", $mysoc->country_code, $langs->trans("Accounting"), $langs->trans("Setup"), $langs->trans("AccountingCategories"));
}
} else {
dol_print_error($this->db);

View File

@ -4122,6 +4122,12 @@ function migrate_delete_old_files($db, $langs, $conf)
'/core/menus/standard/auguria_frontoffice.php',
'/core/menus/standard/eldy_backoffice.php',
'/core/menus/standard/eldy_frontoffice.php',
'/core/modules/export/export_excel.modules.php',
'/core/modules/export/export_csv.modules.php',
'/core/modules/export/exportcsv.modules.php',
'/core/modules/export/export_excel2007new.modules.php',
'/core/modules/facture/pdf_crabe.modules.php',
'/core/modules/facture/pdf_oursin.modules.php',
'/core/modules/mailings/contacts2.modules.php',
'/core/modules/mailings/contacts3.modules.php',
'/core/modules/mailings/contacts4.modules.php',
@ -4130,12 +4136,6 @@ function migrate_delete_old_files($db, $langs, $conf)
'/core/modules/mailings/peche.modules.php',
'/core/modules/mailings/poire.modules.php',
'/core/modules/mailings/kiwi.modules.php',
'/core/modules/facture/pdf_crabe.modules.php',
'/core/modules/facture/pdf_oursin.modules.php',
'/core/modules/export/export_excel.modules.php',
'/core/modules/export/export_csv.modules.php',
'/core/modules/export/exportcsv.modules.php',
'/core/modules/export/export_excel2007new.modules.php',
'/core/boxes/box_members.php',
'/api/class/api_generic.class.php',

View File

@ -448,7 +448,7 @@ ConfirmMassDeleteBookkeepingWritingQuestion=This will delete the transaction fro
## Error
SomeMandatoryStepsOfSetupWereNotDone=Some mandatory steps of setup was not done, please complete them
ErrorNoAccountingCategoryForThisCountry=No accounting account group available for country %s (See Home - Setup - Dictionaries)
ErrorNoAccountingCategoryForThisCountry=No accounting account group available for country %s (See %s - %s - %s)
ErrorInvoiceContainsLinesNotYetBounded=You try to journalize some lines of the invoice <strong>%s</strong>, but some other lines are not yet bounded to accounting account. Journalization of all invoice lines for this invoice are refused.
ErrorInvoiceContainsLinesNotYetBoundedShort=Some lines on invoice are not bound to accounting account.
ExportNotSupported=The export format setuped is not supported into this page

View File

@ -360,11 +360,13 @@ print '</div>'."\n";
print '<div class="corps">'."\n";
print '<div class="center">'."\n";
print '<table align="center">'."\n"; // The div class=center has no effect on table, so we must keep the align=center for table
print '<tr><td><input type="image" name="anneeavant" value="<<" src="../img/rewind.png"></td><td><input type="image" name="moisavant" value="<" src="../img/previous.png"></td>';
print '<td width="150px" align="center"> '.$motmois.' '.$_SESSION["annee"].'<br>';
print '<input type="image" name="retourmois" alt="'.dol_escape_htmltag($langs->trans("BackToCurrentMonth")).'" title="'.dol_escape_htmltag($langs->trans("BackToCurrentMonth")).'" value="" src="'.img_picto('', 'refresh', '', 0, 1).'">';
print '</td><td><input type="image" name="moisapres" value=">" src="../img/next.png"></td>';
print '<td><input type="image" name="anneeapres" value=">>" src="../img/fforward.png"></td><td></td><td></td><td></td><td></td><td></td><td>';
print '<tr><td><input type="image" class="buttonwebsite" name="anneeavant" value="<<" src="../img/rewind.png"></td>';
print '<td><input type="image" class="buttonwebsite" name="moisavant" value="<" src="../img/previous.png"></td>';
print '<td width="150px" class="center"> '.$motmois.' '.$_SESSION["annee"].'<br>';
print '<input type="image" name="retourmois" class="buttonreset" alt="'.dol_escape_htmltag($langs->trans("BackToCurrentMonth")).'" title="'.dol_escape_htmltag($langs->trans("BackToCurrentMonth")).'" value="" src="'.img_picto('', 'refresh', '', 0, 1).'">';
print '</td>';
print '<td><input type="image" class="buttonwebsite" name="moisapres" value=">" src="../img/next.png"></td>';
print '<td><input type="image" class="buttonwebsite" name="anneeapres" value=">>" src="../img/fforward.png"></td><td></td><td></td><td></td><td></td><td></td><td>';
print '</td></tr>'."\n";
print '</table>'."\n";
print '</div>'."\n";
@ -493,7 +495,7 @@ for ($i = 0; $i < $nbrejourmois + $premierjourmois; $i++) {
for ($j = 0; $j < $nbofchoice; $j++) {
// show red buttons
if (date("j", $_SESSION["totalchoixjour"][$j]) == $numerojour && date("n", $_SESSION["totalchoixjour"][$j]) == $_SESSION["mois"] && date("Y", $_SESSION["totalchoixjour"][$j]) == $_SESSION["annee"]) {
print '<td align="center" class="choisi"><input type="submit" class="bouton OFF" name="choixjourretrait[]" value="'.$numerojour.'"></td>'."\n";
print '<td align="center" class="choisi"><input type="submit" class="bouton OFF centpercent nomarginleft buttonwebsite" name="choixjourretrait[]" value="'.$numerojour.'"></td>'."\n";
$dejafait = $numerojour;
}
}
@ -503,10 +505,10 @@ for ($i = 0; $i < $nbrejourmois + $premierjourmois; $i++) {
if (isset($dejafait) === false || $dejafait != $numerojour) {
// green button
if (($numerojour >= $jourAJ && $_SESSION["mois"] == $moisAJ && $_SESSION["annee"] == $anneeAJ) || ($_SESSION["mois"] > $moisAJ && $_SESSION["annee"] == $anneeAJ) || $_SESSION["annee"] > $anneeAJ) {
print '<td align="center" class="libre"><input type="submit" class="bouton ON" name="choixjourajout[]" value="'.$numerojour.'"></td>'."\n";
print '<td class="center libre"><input type="submit" class="bouton ON centpercent nomarginleft buttonwebsite" name="choixjourajout[]" value="'.$numerojour.'"></td>'."\n";
} else {
// grey button
print '<td align="center" class="avant">'.$numerojour.'</td>'."\n";
print '<td class="center avant">'.$numerojour.'</td>'."\n";
}
}
}
@ -543,12 +545,13 @@ if (issetAndNoEmpty('totalchoixjour', $_SESSION) || $erreur) {
print '</tr>'."\n";
//affichage de la liste des jours choisis
// Show list of selected days
$nbofchoice = count($_SESSION["totalchoixjour"]);
for ($i = 0; $i < $nbofchoice; $i++) {
print '<tr>'."\n";
print '<td>'.dol_print_date($_SESSION["totalchoixjour"][$i], 'daytext').' ('.dol_print_date($_SESSION["totalchoixjour"][$i], '%A').')</td>';
print '<td class="left">'.dol_print_date($_SESSION["totalchoixjour"][$i], 'daytext').' <span class="opacitymedium">('.dol_print_date($_SESSION["totalchoixjour"][$i], '%A').')</span></td>';
//affichage des cases d'horaires
for ($j = 0; $j < $_SESSION["nbrecaseshoraires"]; $j++) {
@ -568,7 +571,9 @@ if (issetAndNoEmpty('totalchoixjour', $_SESSION) || $erreur) {
// show buttons to cancel, delete days or create survey
print '<table>'."\n";
print '<tr>'."\n";
print '<td><input type="submit" class="button" name="reset" value="'.dol_escape_htmltag($langs->trans("RemoveAllDays")).'"></td><td><input type="submit" class="button" name="reporterhoraires" value="'.dol_escape_htmltag($langs->trans("CopyHoursOfFirstDay")).'"></td><td><input type="submit" class="button" name="resethoraires" value="'.dol_escape_htmltag($langs->trans("RemoveAllHours")).'"></td></tr>'."\n";
print '<td><input type="submit" class="button small" name="reset" value="'.dol_escape_htmltag($langs->trans("RemoveAllDays")).'"></td>';
print '<td><input type="submit" class="button small" name="reporterhoraires" value="'.dol_escape_htmltag($langs->trans("CopyHoursOfFirstDay")).'"></td>';
print '<td><input type="submit" class="button small" name="resethoraires" value="'.dol_escape_htmltag($langs->trans("RemoveAllHours")).'"></td></tr>'."\n";
print'<tr><td colspan="3"><br><br></td></tr>'."\n";
print '<tr><td colspan="3" align="center"><input type="submit" class="button" name="confirmation" value="'.$langs->trans("CreatePoll").'"></td></tr>'."\n";
print '</table>'."\n";

View File

@ -2,7 +2,7 @@
/* Copyright (C) 2013 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2014 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2016 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2019 Frédéric France <frederic.france@netlogic.fr>
* Copyright (C) 2019 Frédéric France <frederic.france@netlogic.fr>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
@ -55,13 +55,18 @@ print '<div class="corps">';
print '<br>';
print '<div class="index_date">';
print '<div><img class="opacity imgopensurveywizard" src="../img/date.png" onclick="document.formulaire.date.click()"></div>';
print '<button id="date" name="choix_sondage" value="date" type="submit" class="button orange bigrounded"><img src="../img/calendar-32.png" alt="'.dol_escape_htmltag($langs->trans("CreateSurveyDate")).'" style="padding-right: 4px">'.dol_escape_htmltag($langs->trans("CreateSurveyDate")).'</button>';
print '<button id="date" name="choix_sondage" value="date" type="submit" class="button orange bigrounded">';
print '<img src="../img/calendar-32.png" alt="'.dol_escape_htmltag($langs->trans("CreateSurveyDate")).'" style="padding-right: 4px" class="inline-block valignmiddle">';
print '<div class="inline-block valignmiddle">'.dol_escape_htmltag($langs->trans("CreateSurveyDate")).'</div></button>';
print '</div>';
print '<div class="index_sondage">';
print '<div><img class="opacity imgopensurveywizard" src="../img/sondage2.png" onclick="document.formulaire.autre.click()"></div>';
print '<button id="autre" name="choix_sondage" value="autre" type="submit" class="button blue bigrounded"><img src="../img/chart-32.png" alt="'.dol_escape_htmltag($langs->trans("CreateSurveyStandard")).'" style="padding-right: 4px">'.dol_escape_htmltag($langs->trans("CreateSurveyStandard")).'</button>';
print '<button id="autre" name="choix_sondage" value="autre" type="submit" class="button blue bigrounded">';
print '<img src="../img/chart-32.png" alt="'.dol_escape_htmltag($langs->trans("CreateSurveyStandard")).'" style="padding-right: 4px" class="inline-block valignmiddle">';
print '<div class="inline-block valignmiddle">'.dol_escape_htmltag($langs->trans("CreateSurveyStandard")).'</div></button>';
print '</div>';
print '<div class="clearboth"></div>';
print '<br>';
print '</div>';
print '</div></form>';