Merge branch 'develop' into develop

This commit is contained in:
Laurent Destailleur 2025-02-07 10:54:11 +01:00 committed by GitHub
commit 1e76faedd2
No known key found for this signature in database
GPG key ID: B5690EEEBB952194
4 changed files with 28 additions and 17 deletions

View file

@ -226,6 +226,7 @@ if ($resql) {
$totalqty = 0;
$totalvat = 0;
$totalvatperrate = array();
$totalhtperrate = array();
$totallocaltax1 = 0;
$totallocaltax2 = 0;
$cachebankaccount = array();
@ -257,8 +258,10 @@ if ($resql) {
if ($line->tva_tx) {
if (empty($totalvatperrate[$line->tva_tx])) {
$totalvatperrate[$line->tva_tx] = 0;
$totalhtperrate[$line->tva_tx] = 0;
}
$totalvatperrate[$line->tva_tx] += $line->total_tva;
$totalhtperrate[$line->tva_tx] += $line->total_ht;
}
$totallocaltax1 += $line->total_localtax1;
$totallocaltax2 += $line->total_localtax2;
@ -448,9 +451,9 @@ if ($resql) {
}
if (!empty($totalvatperrate) && is_array($totalvatperrate)) {
print '<br><br><div class="small inline-block">'.$langs->trans("VATRate").'</div>';
print '<br><br><div class="small inline-block width100">'.$langs->trans("TotalHT").'</div><div class="small inline-block width100">'.$langs->trans("TotalVAT").'</div>';
foreach ($totalvatperrate as $keyrate => $valuerate) {
print '<br><div class="small">'.$langs->trans("VATRate").' '.vatrate($keyrate, true).' : <div class="inline-block amount width100"></div><div class="inline-block amount width100">'.price($valuerate).'</div></div>';
print '<br><div class="small">'.$langs->trans("VATRate").' '.vatrate($keyrate, true).' : <div class="inline-block amount width100">'.price($totalhtperrate[$keyrate] ?? 0).'</div><div class="inline-block amount width100">'.price($valuerate).'</div></div>';
}
}

View file

@ -935,6 +935,7 @@ abstract class CommonDocGenerator
foreach ($date_specs as $date_spec) {
$propertyname = $date_spec[1];
if (property_exists($line, $propertyname)) {
// @phan-suppress-next-line PhanUndeclaredProperty
$resarray[$date_spec[0]] = dol_print_date($line->$propertyname, $date_spec[2], $date_spec[3], $date_spec[4]);
}
}

View file

@ -405,6 +405,7 @@ class doc_generic_bom_odt extends ModelePDFBom
if ($foundtagforlines) {
$linenumber = 0;
foreach ($object->lines as $line) {
/** @var BOMLine $line */
$linenumber++;
if ($line->fk_product > 0) {

View file

@ -2012,14 +2012,16 @@ function top_htmlhead($head, $title = '', $disablejs = 0, $disablehead = 0, $arr
if (!defined('DISABLE_JQUERY') && !$disablejs && $conf->use_javascript_ajax) {
print '<!-- Includes CSS for JQuery (Ajax library) -->'."\n";
$jquerytheme = 'base';
if (getDolGlobalString('MAIN_USE_JQUERY_THEME')) {
$jquerytheme = getDolGlobalString('MAIN_USE_JQUERY_THEME');
}
if (constant('JS_JQUERY_UI')) {
print '<link rel="stylesheet" type="text/css" href="'.JS_JQUERY_UI.'css/'.$jquerytheme.'/jquery-ui.min.css'.($ext ? '?'.$ext : '').'">'."\n"; // Forced JQuery
} else {
print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/css/'.$jquerytheme.'/jquery-ui.css'.($ext ? '?'.$ext : '').'">'."\n"; // JQuery
if (!defined('DISABLE_JQUERY_UI')) {
$jquerytheme = 'base';
if (getDolGlobalString('MAIN_USE_JQUERY_THEME')) {
$jquerytheme = getDolGlobalString('MAIN_USE_JQUERY_THEME');
}
if (constant('JS_JQUERY_UI')) {
print '<link rel="stylesheet" type="text/css" href="' . JS_JQUERY_UI . 'css/' . $jquerytheme . '/jquery-ui.min.css' . ($ext ? '?' . $ext : '') . '">' . "\n"; // Forced JQuery
} else {
print '<link rel="stylesheet" type="text/css" href="' . DOL_URL_ROOT . '/includes/jquery/css/' . $jquerytheme . '/jquery-ui.css' . ($ext ? '?' . $ext : '') . '">' . "\n"; // JQuery
}
}
if (!defined('DISABLE_JQUERY_JNOTIFY')) {
print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.'/includes/jquery/plugins/jnotify/jquery.jnotify-alt.min.css'.($ext ? '?'.$ext : '').'">'."\n"; // JNotify
@ -2036,7 +2038,6 @@ function top_htmlhead($head, $title = '', $disablejs = 0, $disablehead = 0, $arr
print '<link rel="stylesheet" type="text/css" href="'.DOL_URL_ROOT.$fontawesome_directory.'/css/all.min.css'.($ext ? '?'.$ext : '').'">'."\n";
}
print '<!-- Includes CSS for Dolibarr theme -->'."\n";
// Output style sheets (optioncss='print' or ''). Note: $conf->css looks like '/theme/eldy/style.css.php'
$themepath = dol_buildpath($conf->css, 1);
$themesubdir = '';
@ -2050,8 +2051,11 @@ function top_htmlhead($head, $title = '', $disablejs = 0, $disablehead = 0, $arr
}
}
//print 'themepath='.$themepath.' themeparam='.$themeparam;exit;
print '<link rel="stylesheet" type="text/css" href="'.$themepath.$themeparam.'">'."\n";
if (!defined('DISABLE_CSS_DEFAULT_THEME')) {
print '<!-- Includes CSS for Dolibarr theme -->'."\n";
print '<link rel="stylesheet" type="text/css" href="' . $themepath . $themeparam . '">' . "\n";
}
if (getDolGlobalString('MAIN_FIX_FLASH_ON_CHROME')) {
print '<!-- Includes CSS that does not exists as a workaround of flash bug of chrome -->'."\n".'<link rel="stylesheet" type="text/css" href="filethatdoesnotexiststosolvechromeflashbug">'."\n";
}
@ -2118,10 +2122,12 @@ function top_htmlhead($head, $title = '', $disablejs = 0, $disablehead = 0, $arr
} else {
print '<script nonce="'.getNonce().'" src="'.DOL_URL_ROOT.'/includes/jquery/js/jquery.min.js'.($ext ? '?'.$ext : '').'"></script>'."\n";
}
if (defined('JS_JQUERY_UI') && constant('JS_JQUERY_UI')) {
print '<script nonce="'.getNonce().'" src="'.JS_JQUERY_UI.'jquery-ui.min.js'.($ext ? '?'.$ext : '').'"></script>'."\n";
} else {
print '<script nonce="'.getNonce().'" src="'.DOL_URL_ROOT.'/includes/jquery/js/jquery-ui.min.js'.($ext ? '?'.$ext : '').'"></script>'."\n";
if (!defined('DISABLE_JQUERY_UI')) {
if (defined('JS_JQUERY_UI') && constant('JS_JQUERY_UI')) {
print '<script nonce="' . getNonce() . '" src="' . JS_JQUERY_UI . 'jquery-ui.min.js' . ($ext ? '?' . $ext : '') . '"></script>' . "\n";
} else {
print '<script nonce="' . getNonce() . '" src="' . DOL_URL_ROOT . '/includes/jquery/js/jquery-ui.min.js' . ($ext ? '?' . $ext : '') . '"></script>' . "\n";
}
}
// jQuery jnotify
if (!getDolGlobalString('MAIN_DISABLE_JQUERY_JNOTIFY') && !defined('DISABLE_JQUERY_JNOTIFY')) {