Merge branch 'develop' of github.com:Dolibarr/dolibarr into FIX_replace_divbutaction_by_dolgetbuttonaction

This commit is contained in:
Steve 2022-02-23 15:19:37 +01:00
commit 6feda05aeb
6 changed files with 30 additions and 25 deletions

View File

@ -335,7 +335,7 @@ function run_sql($sqlfile, $silent = 1, $entity = '', $usesavepoint = 1, $handle
// Add log of request
if (!$silent) {
print '<tr class="trforrunsql"><td class="tdtop opacitymedium"'.($colspan ? ' colspan="'.$colspan.'"' : '').'>'.$langs->trans("Request").' '.($i + 1)." sql='".dol_htmlentities($newsql, ENT_NOQUOTES)."'</td></tr>\n";
print '<tr class="trforrunsql'.md5($sqlfile).'"><td class="tdtop opacitymedium"'.($colspan ? ' colspan="'.$colspan.'"' : '').'>'.$langs->trans("Request").' '.($i + 1)." sql='".dol_htmlentities($newsql, ENT_NOQUOTES)."'</td></tr>\n";
}
dol_syslog('Admin.lib::run_sql Request '.($i + 1), LOG_DEBUG);
$sqlmodified = 0;
@ -454,18 +454,18 @@ function run_sql($sqlfile, $silent = 1, $entity = '', $usesavepoint = 1, $handle
//if (!empty($conf->use_javascript_ajax)) { // use_javascript_ajax is not defined
print '<script type="text/javascript">
jQuery(document).ready(function() {
function init_trrunsql()
function init_trrunsql'.md5($sqlfile).'()
{
console.log("toggle .trforrunsql");
jQuery(".trforrunsql").toggle();
console.log("toggle .trforrunsql'.md5($sqlfile).'");
jQuery(".trforrunsql'.md5($sqlfile).'").toggle();
}
init_trrunsql();
jQuery(".trforrunsqlshowhide").click(function() {
init_trrunsql();
init_trrunsql'.md5($sqlfile).'();
jQuery(".trforrunsqlshowhide'.md5($sqlfile).'").click(function() {
init_trrunsql'.md5($sqlfile).'();
});
});
</script>';
print ' - <a class="trforrunsqlshowhide" href="#">'.$langs->trans("ShowHideDetails").'</a>';
print ' - <a class="trforrunsqlshowhide'.md5($sqlfile).'" href="#">'.$langs->trans("ShowHideDetails").'</a>';
//}
print '</td></tr>'."\n";

View File

@ -32,6 +32,10 @@
vertical-align: middle;
}
.right {
text-align: right;
}
.opacitymedium {
opacity: 0.5;
}

View File

@ -235,8 +235,12 @@ if (!GETPOST('action', 'aZ09') || preg_match('/upgrade/i', GETPOST('action', 'aZ
// Force l'affichage de la progression
if ($ok) {
print '<tr><td colspan="2">'.$langs->trans("PleaseBePatient").'</td></tr>';
print '<tr><td colspan="2"><span class="opacitymedium messagebepatient">'.$langs->trans("PleaseBePatient").'</span></td></tr>';
print '</table>';
flush();
print '<table cellspacing="0" cellpadding="1" border="0" width="100%">';
}
@ -355,7 +359,7 @@ if (!GETPOST('action', 'aZ09') || preg_match('/upgrade/i', GETPOST('action', 'aZ
// Scan if there is migration scripts that depends of Dolibarr version
// for modules htdocs/module/sql or htdocs/custom/module/sql (files called "dolibarr_x.y.z-a.b.c.sql")
// for modules htdocs/module/sql or htdocs/custom/module/sql (files called "dolibarr_x.y.z-a.b.c.sql" or "dolibarr_always.sql")
$modulesfile = array();
foreach ($conf->file->dol_document_root as $type => $dirroot) {
$handlemodule = @opendir($dirroot); // $dirroot may be '..'
@ -366,6 +370,9 @@ if (!GETPOST('action', 'aZ09') || preg_match('/upgrade/i', GETPOST('action', 'aZ
if (is_file($dirroot.'/'.$filemodule.'/sql/dolibarr_'.$file)) {
$modulesfile[$dirroot.'/'.$filemodule.'/sql/dolibarr_'.$file] = '/'.$filemodule.'/sql/dolibarr_'.$file;
}
if (is_file($dirroot.'/'.$filemodule.'/sql/dolibarr_allversions.sql')) {
$modulesfile[$dirroot.'/'.$filemodule.'/sql/dolibarr_allversions.sql'] = '/'.$filemodule.'/sql/dolibarr_allversions.sql';
}
}
}
closedir($handlemodule);
@ -398,6 +405,7 @@ if (!GETPOST('action', 'aZ09') || preg_match('/upgrade/i', GETPOST('action', 'aZ
}
}
if (empty($actiondone)) {
print '<div class="error">'.$langs->trans("ErrorWrongParameters").'</div>';
}

View File

@ -0,0 +1,3 @@
--
-- Script run when an upgrade of Dolibarr is done. Whatever is the Dolibarr version.
--

View File

@ -1,14 +1,4 @@
-- Copyright (C) ---Put here your own copyright and developer email---
--
-- 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
-- the Free Software Foundation, either version 3 of the License, or
-- (at your option) any later version.
-- Script run to make a migration of module version x.x.x to module version y.y.y
--
-- This program is distributed in the hope that it will be useful,
-- but WITHOUT ANY WARRANTY; without even the implied warranty of
-- MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-- GNU General Public License for more details.
--
-- You should have received a copy of the GNU General Public License
-- along with this program. If not, see https://www.gnu.org/licenses/.

View File

@ -1604,11 +1604,11 @@ while ($i < min($num, $limit)) {
}
// VAT
if (!empty($arrayfields['s.tva_intra']['checked'])) {
print "<td>";
print $obj->tva_intra;
print '<td class="tdoverflowmax125" title="'.dol_escape_htmltag($obj->tva_intra).'">';
if ($obj->tva_intra && !isValidVATID($companystatic)) {
print img_warning("BadVATNumber", '', '');
print img_warning("BadVATNumber", '', 'pictofixedwidth');
}
print $obj->tva_intra;
print "</td>\n";
if (!$i) {
$totalarray['nbfield']++;