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

This commit is contained in:
Laurent Destailleur 2022-10-18 00:06:32 +02:00
commit 3feea00549
5 changed files with 7 additions and 4 deletions

View File

@ -1274,6 +1274,8 @@ class FactureRec extends CommonInvoice
$tmparray = dol_getdate($now);
$today = dol_mktime(23, 59, 59, $tmparray['mon'], $tmparray['mday'], $tmparray['year']); // Today is last second of current day
$this->output = null;
dol_syslog("createRecurringInvoices restrictioninvoiceid=".$restrictioninvoiceid." forcevalidation=".$forcevalidation);
$sql = 'SELECT rowid FROM '.MAIN_DB_PREFIX.'facture_rec';

View File

@ -124,7 +124,7 @@ class box_dolibarr_state_board extends ModeleBoxes
'contacts' => isModEnabled('societe') && $user->hasRight('societe', 'contact', 'lire'),
'products' => isModEnabled('product') && $user->hasRight('produit', 'lire'),
'services' => isModEnabled('service') && $user->hasRight('service', 'lire'),
'proposals' => isModEnabled('propal') && $user->hasRight('propale', 'lire'),
'proposals' => isModEnabled('propal') && $user->hasRight('propal', 'lire'),
'orders' => isModEnabled('commande') && $user->hasRight('commande', 'lire'),
'invoices' => isModEnabled('facture') && $user->hasRight('facture', 'lire'),
'donations' => isModEnabled('don') && $user->hasRight('don', 'lire'),

View File

@ -451,8 +451,8 @@ class DataPolicyCron
$this->db->begin();
foreach ($arrayofparameters as $key => $params) {
if ($conf->global->$key != '' && is_numeric($conf->global->$key) && (int) $conf->global->$key > 0) {
$sql = sprintf($params['sql'], (int) $conf->entity, (int) $conf->global->$key, (int) $conf->global->$key);
if (getDolGlobalInt($key) > 0) {
$sql = sprintf($params['sql'], (int) $conf->entity, (int) getDolGlobalInt($key), (int) getDolGlobalInt($key));
$resql = $this->db->query($sql);

View File

@ -176,7 +176,7 @@ if (empty($conf->global->MAIN_DISABLE_GLOBAL_WORKBOARD)) {
}
// Number of commercial customer proposals open (expired)
if (isModEnabled('propal') && empty($conf->global->MAIN_DISABLE_BLOCK_CUSTOMER) && $user->hasRight('propale', 'lire')) {
if (isModEnabled('propal') && empty($conf->global->MAIN_DISABLE_BLOCK_CUSTOMER) && $user->hasRight('propal', 'lire')) {
include_once DOL_DOCUMENT_ROOT.'/comm/propal/class/propal.class.php';
$board = new Propal($db);
$dashboardlines[$board->element.'_opened'] = $board->load_board($user, "opened");

View File

@ -242,6 +242,7 @@ class Tickets extends DolibarrApi
$socid = DolibarrApiAccess::$user->socid;
}
$search_sale = null;
// If the internal user must only see his customers, force searching by him
if (!DolibarrApiAccess::$user->rights->societe->client->voir && !$socid) {
$search_sale = DolibarrApiAccess::$user->id;