diff --git a/htdocs/compta/paiement_charge.php b/htdocs/compta/paiement_charge.php
index a76a3cebbfc..d92cbc2035a 100644
--- a/htdocs/compta/paiement_charge.php
+++ b/htdocs/compta/paiement_charge.php
@@ -160,7 +160,8 @@ if ($action == 'create') {
//Add js for AutoFill
print ' $(document).ready(function () {';
- print ' $(".AutoFillAmount").on(\'click touchstart\', function(){
+ print ' $(".AutoFillAmount").on(\'click touchstart\', function() {
+ console.log("Click on .AutoFillAmount");
var amount = $(this).data("value");
document.getElementById($(this).data(\'rowid\')).value = amount ;
});';
diff --git a/htdocs/compta/prelevement/factures.php b/htdocs/compta/prelevement/factures.php
index f1d9c22cc19..e02a1b9cb70 100644
--- a/htdocs/compta/prelevement/factures.php
+++ b/htdocs/compta/prelevement/factures.php
@@ -35,7 +35,7 @@ require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
require_once DOL_DOCUMENT_ROOT.'/salaries/class/salary.class.php';
// Load translation files required by the page
-$langs->loadLangs(array('banks', 'categories', 'bills', 'companies', 'withdrawals', 'suppliers'));
+$langs->loadLangs(array('banks', 'categories', 'bills', 'companies', 'withdrawals', 'salaries', 'suppliers'));
// Get supervariables
$id = GETPOST('id', 'int');
diff --git a/htdocs/compta/recap-compta.php b/htdocs/compta/recap-compta.php
index 4998d3a653f..6757ce15011 100644
--- a/htdocs/compta/recap-compta.php
+++ b/htdocs/compta/recap-compta.php
@@ -247,6 +247,9 @@ if ($id > 0) {
$balance = 0;
foreach ($TData as &$data1) {
$balance += $data1['amount'];
+ if (!isset($data1['balance'])) {
+ $data1['balance'] = 0;
+ }
$data1['balance'] += $balance;
}
diff --git a/htdocs/core/js/lib_notification.js.php b/htdocs/core/js/lib_notification.js.php
index 2f8192a29fe..61ea425edb8 100644
--- a/htdocs/core/js/lib_notification.js.php
+++ b/htdocs/core/js/lib_notification.js.php
@@ -170,7 +170,7 @@ function check_events() {
body: body,
lang: 'getDefaultLang(1)); ?>',
tag: value.id_agenda,
- requireInteraction: true
+ requireInteraction: true /* wait that the user click or close the notification */
/* only supported for persistent notification shown using ServiceWorkerRegistration.showNotification() so disabled */
/* actions: [{ action: 'action1', title: 'New Button Label' }, { action: 'action2', title: 'Another Button' }] */
};
@@ -185,7 +185,7 @@ function check_events() {
if (noti[index]) {
noti[index].onclick = function (event) {
- /* If the use has clicked on button Activate */
+ /* If the user has clicked on button Activate */
console.log("A click on notification on browser has been done for url="+url);
event.preventDefault(); // prevent the browser from focusing the Notification's tab
window.focus();
@@ -212,7 +212,7 @@ function check_events() {
result = 1;
} else {
- console.log("Cancel check_events() with dolnotif_nb_test_for_page="+dolnotif_nb_test_for_page+". Check is useless because javascript Notification.permission is "+Notification.permission+" (blocked manualy or web site is not https).");
+ console.log("Cancel check_events() with dolnotif_nb_test_for_page="+dolnotif_nb_test_for_page+". Check is useless because javascript Notification.permission is "+Notification.permission+" (blocked manualy or web site is not https or browser is in Private mode).");
result = 2; // We return a positive so the repeated check will done even if authroization is not yet allowed may be after this check)
}
diff --git a/htdocs/core/lib/files.lib.php b/htdocs/core/lib/files.lib.php
index 6b4b56e1475..d8d49aa2ff2 100644
--- a/htdocs/core/lib/files.lib.php
+++ b/htdocs/core/lib/files.lib.php
@@ -2560,13 +2560,13 @@ function dol_most_recent_file($dir, $regexfilter = '', $excludefilter = array('(
* Security check when accessing to a document (used by document.php, viewimage.php and webservices to get documents).
* TODO Replace code that set $accessallowed by a call to restrictedArea()
*
- * @param string $modulepart Module of document ('module', 'module_user_temp', 'module_user' or 'module_temp'). Exemple: 'medias', 'invoice', 'logs', 'tax-vat', ...
- * @param string $original_file Relative path with filename, relative to modulepart.
- * @param string $entity Restrict onto entity (0=no restriction)
- * @param User $fuser User object (forced)
- * @param string $refname Ref of object to check permission for external users (autodetect if not provided) or for hierarchy
- * @param string $mode Check permission for 'read' or 'write'
- * @return mixed Array with access information : 'accessallowed' & 'sqlprotectagainstexternals' & 'original_file' (as a full path name)
+ * @param string $modulepart Module of document ('module', 'module_user_temp', 'module_user' or 'module_temp'). Exemple: 'medias', 'invoice', 'logs', 'tax-vat', ...
+ * @param string $original_file Relative path with filename, relative to modulepart.
+ * @param string $entity Restrict onto entity (0=no restriction)
+ * @param User|null $fuser User object (forced)
+ * @param string $refname Ref of object to check permission for external users (autodetect if not provided) or for hierarchy
+ * @param string $mode Check permission for 'read' or 'write'
+ * @return mixed Array with access information : 'accessallowed' & 'sqlprotectagainstexternals' & 'original_file' (as a full path name)
* @see restrictedArea()
*/
function dol_check_secure_access_document($modulepart, $original_file, $entity, $fuser = '', $refname = '', $mode = 'read')
diff --git a/htdocs/core/modules/oauth/google_oauthcallback.php b/htdocs/core/modules/oauth/google_oauthcallback.php
index b48f9ec54da..be8561fa44d 100644
--- a/htdocs/core/modules/oauth/google_oauthcallback.php
+++ b/htdocs/core/modules/oauth/google_oauthcallback.php
@@ -163,7 +163,7 @@ if (!GETPOST('code')) {
// Save more data into session
// Not required. All data are saved into $_SESSION['datafromloginform'] when form is posted with a click on Login with
- // Google with param actionlogin=login and beforeoauthloginredirect=1, by the functions_googleoauth.php.
+ // Google with param actionlogin=login and beforeoauthloginredirect=google, by the functions_googleoauth.php.
/*
if (!empty($_POST["tz"])) {
$_SESSION["tz"] = $_POST["tz"];
diff --git a/htdocs/core/tpl/login.tpl.php b/htdocs/core/tpl/login.tpl.php
index 05496f0cd57..13edea879ca 100644
--- a/htdocs/core/tpl/login.tpl.php
+++ b/htdocs/core/tpl/login.tpl.php
@@ -375,7 +375,7 @@ if (isset($conf->file->main_authentication) && preg_match('/google/', $conf->fil
*/
print '';
- print '';
+ print '';
print '