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

This commit is contained in:
Gauthier PC portable 024 2021-02-08 10:37:01 +01:00
commit 41af1a59f4
155 changed files with 1015 additions and 622 deletions

View File

@ -668,7 +668,7 @@ Whet is definition of "shippable" according to all different STOCK_CALCULATE_...
print '<tr class="oddeven">'; print '<tr class="oddeven">';
print '<td>'.$langs->trans("ShippableOrderIconInList").'</td>'; print '<td>'.$langs->trans("ShippableOrderIconInList").'</td>';
print '<td>&nbsp</td>'; print '<td>&nbsp;</td>';
print '<td class="center">'; print '<td class="center">';
if (!empty($conf->global->SHIPPABLE_ORDER_ICON_IN_LIST)) { if (!empty($conf->global->SHIPPABLE_ORDER_ICON_IN_LIST)) {
print '<a href="'.$_SERVER['PHP_SELF'].'?action=setshippableiconinlist&amp;token='.newToken().'&amp;value=0">'; print '<a href="'.$_SERVER['PHP_SELF'].'?action=setshippableiconinlist&amp;token='.newToken().'&amp;value=0">';
@ -687,7 +687,7 @@ if ($conf->banque->enabled)
{ {
print '<tr class="oddeven"><td>'; print '<tr class="oddeven"><td>';
print $langs->trans("BANK_ASK_PAYMENT_BANK_DURING_ORDER").'</td><td>&nbsp</td><td class="center">'; print $langs->trans("BANK_ASK_PAYMENT_BANK_DURING_ORDER").'</td><td>&nbsp;</td><td class="center">';
if (! empty($conf->use_javascript_ajax)) if (! empty($conf->use_javascript_ajax))
{ {
print ajax_constantonoff('BANK_ASK_PAYMENT_BANK_DURING_ORDER'); print ajax_constantonoff('BANK_ASK_PAYMENT_BANK_DURING_ORDER');
@ -717,7 +717,7 @@ if ($conf->stock->enabled)
{ {
print '<tr class="oddeven"><td>'; print '<tr class="oddeven"><td>';
print $langs->trans("WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER").'</td><td>&nbsp</td><td class="center">'; print $langs->trans("WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER").'</td><td>&nbsp;</td><td class="center">';
if (! empty($conf->use_javascript_ajax)) if (! empty($conf->use_javascript_ajax))
{ {
print ajax_constantonoff('WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER'); print ajax_constantonoff('WAREHOUSE_ASK_WAREHOUSE_DURING_ORDER');

View File

@ -472,22 +472,22 @@ if ($nbofactivatedmodules <= 1) {
print load_fiche_titre($langs->trans("ModulesSetup"), '', 'title_setup'); print load_fiche_titre($langs->trans("ModulesSetup"), '', 'title_setup');
// Start to show page // Start to show page
$deschelp = '';
if ($mode == 'common' || $mode == 'commonkanban') { if ($mode == 'common' || $mode == 'commonkanban') {
$desc = $langs->trans("ModulesDesc", '{picto}'); $desc = $langs->trans("ModulesDesc", '{picto}');
$desc = str_replace('{picto}', img_picto('', 'switch_off'), $desc); $desc = str_replace('{picto}', img_picto('', 'switch_off'), $desc);
print '<span class="opacitymedium hideonsmartphone">'.$desc."<br><br></span>\n"; $deschelp = '<span class="opacitymedium hideonsmartphone">'.$desc."<br><br></span>\n";
} }
if ($mode == 'marketplace') { if ($mode == 'marketplace') {
print '<span class="opacitymedium hideonsmartphone">'.$langs->trans("ModulesMarketPlaceDesc")."<br><br></span>\n"; $deschelp = '<span class="opacitymedium hideonsmartphone">'.$langs->trans("ModulesMarketPlaceDesc")."<br><br></span>\n";
} }
if ($mode == 'deploy') { if ($mode == 'deploy') {
print '<span class="opacitymedium hideonsmartphone">'.$langs->trans("ModulesDeployDesc", $langs->transnoentitiesnoconv("AvailableModules"))."<br><br></span>\n"; $deschelp = '<span class="opacitymedium hideonsmartphone">'.$langs->trans("ModulesDeployDesc", $langs->transnoentitiesnoconv("AvailableModules"))."<br><br></span>\n";
} }
if ($mode == 'develop') { if ($mode == 'develop') {
print '<span class="opacitymedium hideonsmartphone">'.$langs->trans("ModulesDevelopDesc")."<br><br></span>\n"; $deschelp = '<span class="opacitymedium hideonsmartphone">'.$langs->trans("ModulesDevelopDesc")."<br><br></span>\n";
} }
$head = modules_prepare_head(); $head = modules_prepare_head();
@ -512,6 +512,8 @@ if ($mode == 'common' || $mode == 'commonkanban') {
print dol_get_fiche_head($head, 'modules', '', -1); print dol_get_fiche_head($head, 'modules', '', -1);
print $deschelp;
$moreforfilter = '<div class="valignmiddle">'; $moreforfilter = '<div class="valignmiddle">';
$moreforfilter .= '<div class="floatright right pagination"><ul><li>'; $moreforfilter .= '<div class="floatright right pagination"><ul><li>';
@ -937,6 +939,8 @@ if ($mode == 'common' || $mode == 'commonkanban') {
if ($mode == 'marketplace') { if ($mode == 'marketplace') {
print dol_get_fiche_head($head, $mode, '', -1); print dol_get_fiche_head($head, $mode, '', -1);
print $deschelp;
print '<br>'; print '<br>';
// Marketplace // Marketplace
@ -1022,6 +1026,8 @@ if ($mode == 'marketplace') {
if ($mode == 'deploy') { if ($mode == 'deploy') {
print dol_get_fiche_head($head, $mode, '', -1); print dol_get_fiche_head($head, $mode, '', -1);
print $deschelp;
$dolibarrdataroot = preg_replace('/([\\/]+)$/i', '', DOL_DATA_ROOT); $dolibarrdataroot = preg_replace('/([\\/]+)$/i', '', DOL_DATA_ROOT);
$allowonlineinstall = true; $allowonlineinstall = true;
$allowfromweb = 1; $allowfromweb = 1;
@ -1192,6 +1198,8 @@ if ($mode == 'deploy') {
if ($mode == 'develop') { if ($mode == 'develop') {
print dol_get_fiche_head($head, $mode, '', -1); print dol_get_fiche_head($head, $mode, '', -1);
print $deschelp;
print '<br>'; print '<br>';
// Marketplace // Marketplace

View File

@ -157,9 +157,7 @@ foreach ($dirmodels as $reldir)
if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) continue; if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) continue;
if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) continue; if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) continue;
if ($module->isEnabled()) if ($module->isEnabled()) {
{
$var = !$var;
print '<tr class="oddeven"><td width="100">'; print '<tr class="oddeven"><td width="100">';
echo preg_replace('/\-.*$/', '', preg_replace('/mod_payment_/', '', preg_replace('/\.php$/', '', $file))); echo preg_replace('/\-.*$/', '', preg_replace('/mod_payment_/', '', preg_replace('/\.php$/', '', $file)));
print "</td><td>\n"; print "</td><td>\n";

View File

@ -281,9 +281,7 @@ foreach ($dirmodels as $reldir)
if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) $modulequalified=0; if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) $modulequalified=0;
if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) $modulequalified=0; if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) $modulequalified=0;
if ($modulequalified) if ($modulequalified) {
{
$var = !$var;
print '<tr class="oddeven"><td width="100">'; print '<tr class="oddeven"><td width="100">';
print (empty($module->name)?$name:$module->name); print (empty($module->name)?$name:$module->name);
print "</td><td>\n"; print "</td><td>\n";

View File

@ -287,9 +287,7 @@ foreach ($dirmodels as $reldir)
if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) $modulequalified=0; if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) $modulequalified=0;
if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) $modulequalified=0; if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) $modulequalified=0;
if ($modulequalified) if ($modulequalified) {
{
$var = !$var;
print '<tr class="oddeven"><td width="100">'; print '<tr class="oddeven"><td width="100">';
print (empty($module->name)?$name:$module->name); print (empty($module->name)?$name:$module->name);
print "</td><td>\n"; print "</td><td>\n";

View File

@ -383,9 +383,7 @@ foreach ($dirmodels as $reldir)
if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) $modulequalified = 0; if ($module->version == 'development' && $conf->global->MAIN_FEATURES_LEVEL < 2) $modulequalified = 0;
if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) $modulequalified = 0; if ($module->version == 'experimental' && $conf->global->MAIN_FEATURES_LEVEL < 1) $modulequalified = 0;
if ($modulequalified) if ($modulequalified) {
{
$var = !$var;
print '<tr class="oddeven"><td width="100">'; print '<tr class="oddeven"><td width="100">';
print (empty($module->name) ? $name : $module->name); print (empty($module->name) ? $name : $module->name);
print "</td><td>\n"; print "</td><td>\n";
@ -654,7 +652,7 @@ if ($conf->banque->enabled)
{ {
print '<tr class="oddeven"><td>'; print '<tr class="oddeven"><td>';
print $langs->trans("BANK_ASK_PAYMENT_BANK_DURING_PROPOSAL").'</td><td>&nbsp</td><td class="right">'; print $langs->trans("BANK_ASK_PAYMENT_BANK_DURING_PROPOSAL").'</td><td>&nbsp;</td><td class="right">';
if (! empty($conf->use_javascript_ajax)) if (! empty($conf->use_javascript_ajax))
{ {
print ajax_constantonoff('BANK_ASK_PAYMENT_BANK_DURING_PROPOSAL'); print ajax_constantonoff('BANK_ASK_PAYMENT_BANK_DURING_PROPOSAL');

View File

@ -485,7 +485,7 @@ if ($conf->banque->enabled)
{ {
print '<tr class="oddeven"><td>'; print '<tr class="oddeven"><td>';
print $langs->trans("BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_ORDER").'</td><td>&nbsp</td><td align="center">'; print $langs->trans("BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_ORDER").'</td><td>&nbsp;</td><td align="center">';
if (! empty($conf->use_javascript_ajax)) if (! empty($conf->use_javascript_ajax))
{ {
print ajax_constantonoff('BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_ORDER'); print ajax_constantonoff('BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_ORDER');

View File

@ -511,7 +511,7 @@ print '</form>';
if ($conf->banque->enabled) if ($conf->banque->enabled)
{ {
print '<tr class="oddeven"><td>'; print '<tr class="oddeven"><td>';
print $langs->trans("BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_PROPOSAL").'</td><td>&nbsp</td><td class="right">'; print $langs->trans("BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_PROPOSAL").'</td><td>&nbsp;</td><td class="right">';
if (!empty($conf->use_javascript_ajax)) if (!empty($conf->use_javascript_ajax))
{ {
print ajax_constantonoff('BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_PROPOSAL'); print ajax_constantonoff('BANK_ASK_PAYMENT_BANK_DURING_SUPPLIER_PROPOSAL');

View File

@ -643,7 +643,7 @@ class Setup extends DolibarrApi
public function getListOfShipmentMethods($sortfield = "rowid", $sortorder = 'ASC', $limit = 100, $page = 0, $active = 1, $sqlfilters = '') public function getListOfShipmentMethods($sortfield = "rowid", $sortorder = 'ASC', $limit = 100, $page = 0, $active = 1, $sqlfilters = '')
{ {
$list = array(); $list = array();
$sql = "SELECT t.rowid, t.code, t.libelle, t.description, t.tracking"; $sql = "SELECT t.rowid, t.code, t.libelle as label, t.description, t.tracking";
$sql .= " FROM ".MAIN_DB_PREFIX."c_shipment_mode as t"; $sql .= " FROM ".MAIN_DB_PREFIX."c_shipment_mode as t";
$sql .= " WHERE t.active = ".$active; $sql .= " WHERE t.active = ".$active;
// Add sql filters // Add sql filters

View File

@ -133,19 +133,33 @@ class BlockedLog
* *
* @return int Always 1 * @return int Always 1
*/ */
public function loadTrackedEvents() { public function loadTrackedEvents()
{
global $conf; global $conf;
$this->trackedevents = array(); $this->trackedevents = array();
if ($conf->facture->enabled) $this->trackedevents['BILL_VALIDATE'] = 'logBILL_VALIDATE'; if ($conf->facture->enabled) {
if ($conf->facture->enabled) $this->trackedevents['BILL_DELETE'] = 'logBILL_DELETE'; $this->trackedevents['BILL_VALIDATE'] = 'logBILL_VALIDATE';
if ($conf->facture->enabled) $this->trackedevents['BILL_SENTBYMAIL'] = 'logBILL_SENTBYMAIL'; }
if ($conf->facture->enabled) $this->trackedevents['DOC_DOWNLOAD'] = 'BlockedLogBillDownload'; if ($conf->facture->enabled) {
if ($conf->facture->enabled) $this->trackedevents['DOC_PREVIEW'] = 'BlockedLogBillPreview'; $this->trackedevents['BILL_DELETE'] = 'logBILL_DELETE';
}
if ($conf->facture->enabled) $this->trackedevents['PAYMENT_CUSTOMER_CREATE'] = 'logPAYMENT_CUSTOMER_CREATE'; if ($conf->facture->enabled) {
if ($conf->facture->enabled) $this->trackedevents['PAYMENT_CUSTOMER_DELETE'] = 'logPAYMENT_CUSTOMER_DELETE'; $this->trackedevents['BILL_SENTBYMAIL'] = 'logBILL_SENTBYMAIL';
}
if ($conf->facture->enabled) {
$this->trackedevents['DOC_DOWNLOAD'] = 'BlockedLogBillDownload';
}
if ($conf->facture->enabled) {
$this->trackedevents['DOC_PREVIEW'] = 'BlockedLogBillPreview';
}
if ($conf->facture->enabled) {
$this->trackedevents['PAYMENT_CUSTOMER_CREATE'] = 'logPAYMENT_CUSTOMER_CREATE';
}
if ($conf->facture->enabled) {
$this->trackedevents['PAYMENT_CUSTOMER_DELETE'] = 'logPAYMENT_CUSTOMER_DELETE';
}
/* Supplier /* Supplier
if ($conf->fournisseur->enabled) $this->trackedevents['BILL_SUPPLIER_VALIDATE']='BlockedLogSupplierBillValidate'; if ($conf->fournisseur->enabled) $this->trackedevents['BILL_SUPPLIER_VALIDATE']='BlockedLogSupplierBillValidate';
@ -158,12 +172,20 @@ class BlockedLog
if ($conf->fournisseur->enabled) $this->trackedevents['PAYMENT_SUPPLIER_DELETE']='BlockedLogsupplierBillPaymentCreate'; if ($conf->fournisseur->enabled) $this->trackedevents['PAYMENT_SUPPLIER_DELETE']='BlockedLogsupplierBillPaymentCreate';
*/ */
if ($conf->don->enabled) $this->trackedevents['DON_VALIDATE'] = 'logDON_VALIDATE'; if ($conf->don->enabled) {
if ($conf->don->enabled) $this->trackedevents['DON_DELETE'] = 'logDON_DELETE'; $this->trackedevents['DON_VALIDATE'] = 'logDON_VALIDATE';
}
if ($conf->don->enabled) {
$this->trackedevents['DON_DELETE'] = 'logDON_DELETE';
}
//if ($conf->don->enabled) $this->trackedevents['DON_SENTBYMAIL']='logDON_SENTBYMAIL'; //if ($conf->don->enabled) $this->trackedevents['DON_SENTBYMAIL']='logDON_SENTBYMAIL';
if ($conf->don->enabled) $this->trackedevents['DONATION_PAYMENT_CREATE'] = 'logDONATION_PAYMENT_CREATE'; if ($conf->don->enabled) {
if ($conf->don->enabled) $this->trackedevents['DONATION_PAYMENT_DELETE'] = 'logDONATION_PAYMENT_DELETE'; $this->trackedevents['DONATION_PAYMENT_CREATE'] = 'logDONATION_PAYMENT_CREATE';
}
if ($conf->don->enabled) {
$this->trackedevents['DONATION_PAYMENT_DELETE'] = 'logDONATION_PAYMENT_DELETE';
}
/* /*
if ($conf->salary->enabled) $this->trackedevents['PAYMENT_SALARY_CREATE']='BlockedLogSalaryPaymentCreate'; if ($conf->salary->enabled) $this->trackedevents['PAYMENT_SALARY_CREATE']='BlockedLogSalaryPaymentCreate';
@ -171,18 +193,29 @@ class BlockedLog
if ($conf->salary->enabled) $this->trackedevents['PAYMENT_SALARY_DELETE']='BlockedLogSalaryPaymentCreate'; if ($conf->salary->enabled) $this->trackedevents['PAYMENT_SALARY_DELETE']='BlockedLogSalaryPaymentCreate';
*/ */
if ($conf->adherent->enabled) $this->trackedevents['MEMBER_SUBSCRIPTION_CREATE'] = 'logMEMBER_SUBSCRIPTION_CREATE'; if ($conf->adherent->enabled) {
if ($conf->adherent->enabled) $this->trackedevents['MEMBER_SUBSCRIPTION_MODIFY'] = 'logMEMBER_SUBSCRIPTION_MODIFY'; $this->trackedevents['MEMBER_SUBSCRIPTION_CREATE'] = 'logMEMBER_SUBSCRIPTION_CREATE';
if ($conf->adherent->enabled) $this->trackedevents['MEMBER_SUBSCRIPTION_DELETE'] = 'logMEMBER_SUBSCRIPTION_DELETE'; }
if ($conf->adherent->enabled) {
$this->trackedevents['MEMBER_SUBSCRIPTION_MODIFY'] = 'logMEMBER_SUBSCRIPTION_MODIFY';
if ($conf->banque->enabled) $this->trackedevents['PAYMENT_VARIOUS_CREATE'] = 'logPAYMENT_VARIOUS_CREATE'; }
if ($conf->banque->enabled) $this->trackedevents['PAYMENT_VARIOUS_MODIFY'] = 'logPAYMENT_VARIOUS_MODIFY'; if ($conf->adherent->enabled) {
if ($conf->banque->enabled) $this->trackedevents['PAYMENT_VARIOUS_DELETE'] = 'logPAYMENT_VARIOUS_DELETE'; $this->trackedevents['MEMBER_SUBSCRIPTION_DELETE'] = 'logMEMBER_SUBSCRIPTION_DELETE';
}
if ($conf->banque->enabled) {
$this->trackedevents['PAYMENT_VARIOUS_CREATE'] = 'logPAYMENT_VARIOUS_CREATE';
}
if ($conf->banque->enabled) {
$this->trackedevents['PAYMENT_VARIOUS_MODIFY'] = 'logPAYMENT_VARIOUS_MODIFY';
}
if ($conf->banque->enabled) {
$this->trackedevents['PAYMENT_VARIOUS_DELETE'] = 'logPAYMENT_VARIOUS_DELETE';
}
// $conf->global->BANK_ENABLE_POS_CASHCONTROL must be set to 1 by all external POS modules // $conf->global->BANK_ENABLE_POS_CASHCONTROL must be set to 1 by all external POS modules
$moduleposenabled = (!empty($conf->cashdesk->enabled) || !empty($conf->takepos->enabled) || !empty($conf->global->BANK_ENABLE_POS_CASHCONTROL)); $moduleposenabled = (!empty($conf->cashdesk->enabled) || !empty($conf->takepos->enabled) || !empty($conf->global->BANK_ENABLE_POS_CASHCONTROL));
if ($moduleposenabled) $this->trackedevents['CASHCONTROL_VALIDATE'] = 'logCASHCONTROL_VALIDATE'; if ($moduleposenabled) {
$this->trackedevents['CASHCONTROL_VALIDATE'] = 'logCASHCONTROL_VALIDATE';
}
// Add more action to track from a conf variable // Add more action to track from a conf variable
if (!empty($conf->global->BLOCKEDLOG_ADD_ACTIONS_SUPPORTED)) { if (!empty($conf->global->BLOCKEDLOG_ADD_ACTIONS_SUPPORTED)) {

View File

@ -210,7 +210,7 @@ llxHeader("", $langs->trans("Categories"), $helpurl);
if ($user->rights->categorie->creer) if ($user->rights->categorie->creer)
{ {
// Create or add // Create or add
if ($action == 'create' || $_POST["addcat"] == 'addcat') if ($action == 'create' || GETPOST("addcat") == 'addcat')
{ {
dol_set_focus('#label'); dol_set_focus('#label');

View File

@ -287,16 +287,19 @@ print dol_get_fiche_end();
*/ */
print "<div class='tabsAction'>\n"; print "<div class='tabsAction'>\n";
$reshook = $hookmanager->executeHooks('addMoreActionsButtons', $parameters, $object, $action); // Note that $action and $object may have been modified by some hooks
if ($user->rights->categorie->creer) if ($reshook < 0) setEventMessages($hookmanager->error, $hookmanager->errors, 'errors');
{ if (empty($reshook)) {
if ($user->rights->categorie->creer)
{
$socid = ($object->socid ? "&socid=".$object->socid : ""); $socid = ($object->socid ? "&socid=".$object->socid : "");
print '<a class="butAction" href="edit.php?id='.$object->id.$socid.'&type='.$type.'">'.$langs->trans("Modify").'</a>'; print '<a class="butAction" href="edit.php?id='.$object->id.$socid.'&type='.$type.'">'.$langs->trans("Modify").'</a>';
} }
if ($user->rights->categorie->supprimer) if ($user->rights->categorie->supprimer)
{ {
print '<a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?action=delete&token='.newToken().'&id='.$object->id.'&type='.$type.'&backtolist='.urlencode($backtolist).'">'.$langs->trans("Delete").'</a>'; print '<a class="butActionDelete" href="'.$_SERVER["PHP_SELF"].'?action=delete&token='.newToken().'&id='.$object->id.'&type='.$type.'&backtolist='.urlencode($backtolist).'">'.$langs->trans("Delete").'</a>';
}
} }
print "</div>"; print "</div>";

View File

@ -280,10 +280,10 @@ if (empty($action) || $action == 'show_month')
$tmpday += ((isset($conf->global->MAIN_START_WEEK) ? $conf->global->MAIN_START_WEEK : 1) - 1); $tmpday += ((isset($conf->global->MAIN_START_WEEK) ? $conf->global->MAIN_START_WEEK : 1) - 1);
if ($tmpday >= 1) $tmpday -= 7; // If tmpday is 0 we start with sunday, if -6, we start with monday of previous week. if ($tmpday >= 1) $tmpday -= 7; // If tmpday is 0 we start with sunday, if -6, we start with monday of previous week.
// Define firstdaytoshow and lastdaytoshow (warning: lastdaytoshow is last second to show + 1) // Define firstdaytoshow and lastdaytoshow (warning: lastdaytoshow is last second to show + 1)
$firstdaytoshow = dol_mktime(0, 0, 0, $prev_month, $max_day_in_prev_month + $tmpday, $prev_year, 'gmt'); $firstdaytoshow = dol_mktime(0, 0, 0, $prev_month, $max_day_in_prev_month + $tmpday, $prev_year, 'tzuserrel');
$next_day = 7 - ($max_day_in_month + 1 - $tmpday) % 7; $next_day = 7 - ($max_day_in_month + 1 - $tmpday) % 7;
if ($next_day < 6) $next_day += 7; if ($next_day < 6) $next_day += 7;
$lastdaytoshow = dol_mktime(0, 0, 0, $next_month, $next_day, $next_year, 'gmt'); $lastdaytoshow = dol_mktime(0, 0, 0, $next_month, $next_day, $next_year, 'tzuserrel');
} }
if ($action == 'show_week') if ($action == 'show_week')
{ {
@ -304,10 +304,10 @@ if ($action == 'show_week')
$next_day = $next['day']; $next_day = $next['day'];
// Define firstdaytoshow and lastdaytoshow (warning: lastdaytoshow is last second to show + 1) // Define firstdaytoshow and lastdaytoshow (warning: lastdaytoshow is last second to show + 1)
$firstdaytoshow = dol_mktime(0, 0, 0, $first_month, $first_day, $first_year, 'gmt'); $firstdaytoshow = dol_mktime(0, 0, 0, $first_month, $first_day, $first_year, 'tzuserrel');
$lastdaytoshow = dol_time_plus_duree($firstdaytoshow, 7, 'd'); $lastdaytoshow = dol_time_plus_duree($firstdaytoshow, 7, 'd');
$max_day_in_month = date("t", dol_mktime(0, 0, 0, $month, 1, $year)); $max_day_in_month = date("t", dol_mktime(0, 0, 0, $month, 1, $year, 'gmt'));
$tmpday = $first_day; $tmpday = $first_day;
} }
@ -323,8 +323,8 @@ if ($action == 'show_day')
$next_day = $next['day']; $next_day = $next['day'];
// Define firstdaytoshow and lastdaytoshow (warning: lastdaytoshow is last second to show + 1) // Define firstdaytoshow and lastdaytoshow (warning: lastdaytoshow is last second to show + 1)
$firstdaytoshow = dol_mktime(0, 0, 0, $prev_month, $prev_day, $prev_year, 'gmt'); $firstdaytoshow = dol_mktime(0, 0, 0, $prev_month, $prev_day, $prev_year, 'tzuserrel');
$lastdaytoshow = dol_mktime(0, 0, 0, $next_month, $next_day, $next_year, 'gmt'); $lastdaytoshow = dol_mktime(0, 0, 0, $next_month, $next_day, $next_year, 'tzuserrel');
} }
//print 'xx'.$prev_year.'-'.$prev_month.'-'.$prev_day; //print 'xx'.$prev_year.'-'.$prev_month.'-'.$prev_day;
//print 'xx'.$next_year.'-'.$next_month.'-'.$next_day; //print 'xx'.$next_year.'-'.$next_month.'-'.$next_day;
@ -607,17 +607,18 @@ if (!$user->rights->societe->client->voir && !$socid) $sql .= " AND (a.fk_soc IS
if ($socid > 0) $sql .= ' AND a.fk_soc = '.$socid; if ($socid > 0) $sql .= ' AND a.fk_soc = '.$socid;
// We must filter on assignement table // We must filter on assignement table
if ($filtert > 0 || $usergroup > 0) $sql .= " AND ar.fk_actioncomm = a.id AND ar.element_type='user'"; if ($filtert > 0 || $usergroup > 0) $sql .= " AND ar.fk_actioncomm = a.id AND ar.element_type='user'";
//var_dump($day.' '.$month.' '.$year);
if ($action == 'show_day') if ($action == 'show_day')
{ {
$sql .= " AND ("; $sql .= " AND (";
$sql .= " (a.datep BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $month, $day, $year))."'"; $sql .= " (a.datep BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $month, $day, $year, 'tzuserrel'))."'";
$sql .= " AND '".$db->idate(dol_mktime(23, 59, 59, $month, $day, $year))."')"; $sql .= " AND '".$db->idate(dol_mktime(23, 59, 59, $month, $day, $year, 'tzuserrel'))."')";
$sql .= " OR "; $sql .= " OR ";
$sql .= " (a.datep2 BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $month, $day, $year))."'"; $sql .= " (a.datep2 BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $month, $day, $year, 'tzuserrel'))."'";
$sql .= " AND '".$db->idate(dol_mktime(23, 59, 59, $month, $day, $year))."')"; $sql .= " AND '".$db->idate(dol_mktime(23, 59, 59, $month, $day, $year, 'tzuserrel'))."')";
$sql .= " OR "; $sql .= " OR ";
$sql .= " (a.datep < '".$db->idate(dol_mktime(0, 0, 0, $month, $day, $year))."'"; $sql .= " (a.datep < '".$db->idate(dol_mktime(0, 0, 0, $month, $day, $year, 'tzuserrel'))."'";
$sql .= " AND a.datep2 > '".$db->idate(dol_mktime(23, 59, 59, $month, $day, $year))."')"; $sql .= " AND a.datep2 > '".$db->idate(dol_mktime(23, 59, 59, $month, $day, $year, 'tzuserrel'))."')";
$sql .= ')'; $sql .= ')';
} else { } else {
// To limit array // To limit array
@ -723,9 +724,9 @@ if ($resql)
// Add an entry in actionarray for each day // Add an entry in actionarray for each day
$daycursor = $event->date_start_in_calendar; $daycursor = $event->date_start_in_calendar;
$annee = dol_print_date($daycursor, '%Y'); $annee = dol_print_date($daycursor, '%Y', 'tzuserrel');
$mois = dol_print_date($daycursor, '%m'); $mois = dol_print_date($daycursor, '%m', 'tzuserrel');
$jour = dol_print_date($daycursor, '%d'); $jour = dol_print_date($daycursor, '%d', 'tzuserrel');
//var_dump(dol_print_date($event->date_start_in_calendar, 'dayhour', 'gmt')); //var_dump(dol_print_date($event->date_start_in_calendar, 'dayhour', 'gmt'));
//var_dump($annee.'-'.$mois.'-'.$jour); //var_dump($annee.'-'.$mois.'-'.$jour);
@ -1231,11 +1232,11 @@ if (empty($action) || $action == 'show_month') // View by month
print '<table width="100%" class="noborder nocellnopadd cal_pannel cal_month">'; print '<table width="100%" class="noborder nocellnopadd cal_pannel cal_month">';
print ' <tr class="liste_titre">'; print ' <tr class="liste_titre">';
// Column title of weeks numbers // Column title of weeks numbers
echo ' <td align="center">#</td>'; echo ' <td class="center">#</td>';
$i = 0; $i = 0;
while ($i < 7) while ($i < 7)
{ {
print ' <td class="center bold uppercase tdfordaytitle">'; print ' <td class="center bold uppercase tdfordaytitle'.($i == 0 ? ' borderleft' : '').'">';
$numdayinweek = (($i + (isset($conf->global->MAIN_START_WEEK) ? $conf->global->MAIN_START_WEEK : 1)) % 7); $numdayinweek = (($i + (isset($conf->global->MAIN_START_WEEK) ? $conf->global->MAIN_START_WEEK : 1)) % 7);
if (!empty($conf->dol_optimize_smallscreen)) if (!empty($conf->dol_optimize_smallscreen))
{ {
@ -1539,9 +1540,9 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa
foreach ($eventarray as $daykey => $notused) foreach ($eventarray as $daykey => $notused)
{ {
$annee = date('Y', $daykey); $annee = dol_print_date($daykey, '%Y');
$mois = date('m', $daykey); $mois = dol_print_date($daykey, '%m');
$jour = date('d', $daykey); $jour = dol_print_date($daykey, '%d');
if ($day == $jour && $month == $mois && $year == $annee) if ($day == $jour && $month == $mois && $year == $annee)
{ {
@ -1703,20 +1704,17 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa
if (empty($event->fulldayevent)) if (empty($event->fulldayevent))
{ {
// Show hours (start ... end) // Show hours (start ... end)
$tmpyearstart = date('Y', $event->date_start_in_calendar); $tmpyearstart = dol_print_date($event->date_start_in_calendar, '%Y', 'tzuserrel');
$tmpmonthstart = date('m', $event->date_start_in_calendar); $tmpmonthstart = dol_print_date($event->date_start_in_calendar, '%m', 'tzuserrel');
$tmpdaystart = date('d', $event->date_start_in_calendar); $tmpdaystart = dol_print_date($event->date_start_in_calendar, '%d', 'tzuserrel');
$tmpyearend = date('Y', $event->date_end_in_calendar); $tmpyearend = dol_print_date($event->date_end_in_calendar, '%Y', 'tzuserrel');
$tmpmonthend = date('m', $event->date_end_in_calendar); $tmpmonthend = dol_print_date($event->date_end_in_calendar, '%m', 'tzuserrel');
$tmpdayend = date('d', $event->date_end_in_calendar); $tmpdayend = dol_print_date($event->date_end_in_calendar, '%d', 'tzuserrel');
/*var_dump($tmpyearstart.' '.$tmpmonthstart.' '.$tmpdaystart);
var_dump($tmpyearend.' '.$tmpmonthend.' '.$tmpdayend);
var_dump($annee.' '.$mois.' '.$jour);*/
// Hour start // Hour start
if ($tmpyearstart == $annee && $tmpmonthstart == $mois && $tmpdaystart == $jour) if ($tmpyearstart == $annee && $tmpmonthstart == $mois && $tmpdaystart == $jour)
{ {
$daterange .= dol_print_date($event->date_start_in_calendar, 'hour', 'tzuser'); $daterange .= dol_print_date($event->date_start_in_calendar, 'hour', 'tzuserrel');
if ($event->date_end_in_calendar && $event->date_start_in_calendar != $event->date_end_in_calendar) if ($event->date_end_in_calendar && $event->date_start_in_calendar != $event->date_end_in_calendar)
{ {
if ($tmpyearstart == $tmpyearend && $tmpmonthstart == $tmpmonthend && $tmpdaystart == $tmpdayend) if ($tmpyearstart == $tmpyearend && $tmpmonthstart == $tmpmonthend && $tmpdaystart == $tmpdayend)
@ -1736,7 +1734,7 @@ function show_day_events($db, $day, $month, $year, $monthshown, $style, &$eventa
if ($event->date_end_in_calendar && $event->date_start_in_calendar != $event->date_end_in_calendar) if ($event->date_end_in_calendar && $event->date_start_in_calendar != $event->date_end_in_calendar)
{ {
if ($tmpyearend == $annee && $tmpmonthend == $mois && $tmpdayend == $jour) if ($tmpyearend == $annee && $tmpmonthend == $mois && $tmpdayend == $jour)
$daterange .= dol_print_date($event->date_end_in_calendar, 'hour', 'tzuser'); $daterange .= dol_print_date($event->date_end_in_calendar, 'hour', 'tzuserrel');
} }
} else { } else {
if ($showinfo) if ($showinfo)

View File

@ -67,9 +67,9 @@ $search_id = GETPOST('search_id', 'alpha');
$search_title = GETPOST('search_title', 'alpha'); $search_title = GETPOST('search_title', 'alpha');
$search_note = GETPOST('search_note', 'alpha'); $search_note = GETPOST('search_note', 'alpha');
$dateselect = dol_mktime(0, 0, 0, GETPOST('dateselectmonth', 'int'), GETPOST('dateselectday', 'int'), GETPOST('dateselectyear', 'int')); $dateselect = dol_mktime(0, 0, 0, GETPOST('dateselectmonth', 'int'), GETPOST('dateselectday', 'int'), GETPOST('dateselectyear', 'int'), 'tzuserrel');
$datestart = dol_mktime(0, 0, 0, GETPOST('datestartmonth', 'int'), GETPOST('datestartday', 'int'), GETPOST('datestartyear', 'int')); $datestart = dol_mktime(0, 0, 0, GETPOST('datestartmonth', 'int'), GETPOST('datestartday', 'int'), GETPOST('datestartyear', 'int'), 'tzuserrel');
$dateend = dol_mktime(0, 0, 0, GETPOST('dateendmonth', 'int'), GETPOST('dateendday', 'int'), GETPOST('dateendyear', 'int')); $dateend = dol_mktime(0, 0, 0, GETPOST('dateendmonth', 'int'), GETPOST('dateendday', 'int'), GETPOST('dateendyear', 'int'), 'tzuserrel');
if ($search_status == '' && !GETPOSTISSET('search_status')) $search_status = (empty($conf->global->AGENDA_DEFAULT_FILTER_STATUS) ? '' : $conf->global->AGENDA_DEFAULT_FILTER_STATUS); if ($search_status == '' && !GETPOSTISSET('search_status')) $search_status = (empty($conf->global->AGENDA_DEFAULT_FILTER_STATUS) ? '' : $conf->global->AGENDA_DEFAULT_FILTER_STATUS);
if (empty($action) && !GETPOSTISSET('action')) $action = (empty($conf->global->AGENDA_DEFAULT_VIEW) ? 'show_month' : $conf->global->AGENDA_DEFAULT_VIEW); if (empty($action) && !GETPOSTISSET('action')) $action = (empty($conf->global->AGENDA_DEFAULT_VIEW) ? 'show_month' : $conf->global->AGENDA_DEFAULT_VIEW);
@ -566,12 +566,12 @@ if ($resql)
if (!empty($arrayfields['a.note']['checked'])) print '<td class="liste_titre"><input type="text" class="maxwidth75" name="search_note" value="'.$search_note.'"></td>'; if (!empty($arrayfields['a.note']['checked'])) print '<td class="liste_titre"><input type="text" class="maxwidth75" name="search_note" value="'.$search_note.'"></td>';
if (!empty($arrayfields['a.datep']['checked'])) { if (!empty($arrayfields['a.datep']['checked'])) {
print '<td class="liste_titre nowraponall" align="center">'; print '<td class="liste_titre nowraponall" align="center">';
print $form->selectDate($datestart, 'datestart', 0, 0, 1, '', 1, 0); print $form->selectDate($datestart, 'datestart', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', '', 'tzuserrel');
print '</td>'; print '</td>';
} }
if (!empty($arrayfields['a.datep2']['checked'])) { if (!empty($arrayfields['a.datep2']['checked'])) {
print '<td class="liste_titre nowraponall" align="center">'; print '<td class="liste_titre nowraponall" align="center">';
print $form->selectDate($dateend, 'dateend', 0, 0, 1, '', 1, 0); print $form->selectDate($dateend, 'dateend', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', '', 'tzuserrel');
print '</td>'; print '</td>';
} }
if (!empty($arrayfields['s.nom']['checked'])) { if (!empty($arrayfields['s.nom']['checked'])) {

View File

@ -265,7 +265,7 @@ $next_month = $month;
$next_day = $day; $next_day = $day;
// Define firstdaytoshow and lastdaytoshow (warning: lastdaytoshow is last second to show + 1) // Define firstdaytoshow and lastdaytoshow (warning: lastdaytoshow is last second to show + 1)
$firstdaytoshow = dol_mktime(0, 0, 0, $first_month, $first_day, $first_year, 'gmt'); $firstdaytoshow = dol_mktime(0, 0, 0, $first_month, $first_day, $first_year, 'tzuserrel');
$lastdaytoshow = dol_time_plus_duree($firstdaytoshow, 7, 'd'); $lastdaytoshow = dol_time_plus_duree($firstdaytoshow, 7, 'd');
//print $firstday.'-'.$first_month.'-'.$first_year; //print $firstday.'-'.$first_month.'-'.$first_year;
//print dol_print_date($firstdaytoshow,'dayhour'); //print dol_print_date($firstdaytoshow,'dayhour');
@ -482,14 +482,14 @@ if ($filtert > 0 || $usergroup > 0) $sql .= " AND ar.fk_actioncomm = a.id AND ar
if ($action == 'show_day') if ($action == 'show_day')
{ {
$sql .= " AND ("; $sql .= " AND (";
$sql .= " (a.datep BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $month, $day, $year))."'"; $sql .= " (a.datep BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $month, $day, $year, 'tzuserrel'))."'";
$sql .= " AND '".$db->idate(dol_mktime(23, 59, 59, $month, $day, $year))."')"; $sql .= " AND '".$db->idate(dol_mktime(23, 59, 59, $month, $day, $year))."')";
$sql .= " OR "; $sql .= " OR ";
$sql .= " (a.datep2 BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $month, $day, $year))."'"; $sql .= " (a.datep2 BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $month, $day, $year, 'tzuserrel'))."'";
$sql .= " AND '".$db->idate(dol_mktime(23, 59, 59, $month, $day, $year))."')"; $sql .= " AND '".$db->idate(dol_mktime(23, 59, 59, $month, $day, $year))."')";
$sql .= " OR "; $sql .= " OR ";
$sql .= " (a.datep < '".$db->idate(dol_mktime(0, 0, 0, $month, $day, $year))."'"; $sql .= " (a.datep < '".$db->idate(dol_mktime(0, 0, 0, $month, $day, $year))."'";
$sql .= " AND a.datep2 > '".$db->idate(dol_mktime(23, 59, 59, $month, $day, $year))."')"; $sql .= " AND a.datep2 > '".$db->idate(dol_mktime(23, 59, 59, $month, $day, $year, 'tzuserrel'))."')";
$sql .= ')'; $sql .= ')';
} else { } else {
// To limit array // To limit array
@ -599,9 +599,9 @@ if ($resql)
// Add an entry in actionarray for each day // Add an entry in actionarray for each day
$daycursor = $event->date_start_in_calendar; $daycursor = $event->date_start_in_calendar;
$annee = dol_print_date($daycursor, '%Y'); $annee = dol_print_date($daycursor, '%Y', 'tzuserrel');
$mois = dol_print_date($daycursor, '%m'); $mois = dol_print_date($daycursor, '%m', 'tzuserrel');
$jour = dol_print_date($daycursor, '%d'); $jour = dol_print_date($daycursor, '%d', 'tzuserrel');
// Loop on each day covered by action to prepare an index to show on calendar // Loop on each day covered by action to prepare an index to show on calendar
$loop = true; $j = 0; $loop = true; $j = 0;
@ -858,9 +858,9 @@ function show_day_events_pertype($username, $day, $month, $year, $monthshown, $s
// We are in a particular day for $username, now we scan all events // We are in a particular day for $username, now we scan all events
foreach ($eventarray as $daykey => $notused) foreach ($eventarray as $daykey => $notused)
{ {
$annee = dol_print_date($daykey, '%Y', 'gmt'); $annee = dol_print_date($daykey, '%Y');
$mois = dol_print_date($daykey, '%m', 'gmt'); $mois = dol_print_date($daykey, '%m');
$jour = dol_print_date($daykey, '%d', 'gmt'); $jour = dol_print_date($daykey, '%d');
if ($day == $jour && $month == $mois && $year == $annee) // Is it the day we are looking for when calling function ? if ($day == $jour && $month == $mois && $year == $annee) // Is it the day we are looking for when calling function ?
{ {
@ -931,9 +931,9 @@ function show_day_events_pertype($username, $day, $month, $year, $monthshown, $s
$newcolor = ''; //init $newcolor = ''; //init
if (empty($event->fulldayevent)) if (empty($event->fulldayevent))
{ {
$a = dol_mktime((int) $h, 0, 0, $month, $day, $year, 'auto', 0); $a = dol_mktime((int) $h, 0, 0, $month, $day, $year, 'tzuserrel', 0);
$b = dol_mktime((int) $h, 30, 0, $month, $day, $year, 'auto', 0); $b = dol_mktime((int) $h, 30, 0, $month, $day, $year, 'tzuserrel', 0);
$c = dol_mktime((int) $h + 1, 0, 0, $month, $day, $year, 'auto', 0); $c = dol_mktime((int) $h + 1, 0, 0, $month, $day, $year, 'tzuserrel', 0);
$dateendtouse = $event->date_end_in_calendar; $dateendtouse = $event->date_end_in_calendar;
if ($dateendtouse == $event->date_start_in_calendar) $dateendtouse++; if ($dateendtouse == $event->date_start_in_calendar) $dateendtouse++;
@ -944,13 +944,13 @@ function show_day_events_pertype($username, $day, $month, $year, $monthshown, $s
{ {
$busy = $event->transparency; $busy = $event->transparency;
$cases1[$h][$event->id]['busy'] = $busy; $cases1[$h][$event->id]['busy'] = $busy;
$cases1[$h][$event->id]['string'] = dol_print_date($event->date_start_in_calendar, 'dayhour'); $cases1[$h][$event->id]['string'] = dol_print_date($event->date_start_in_calendar, 'dayhour', 'tzuserrel');
if ($event->date_end_in_calendar && $event->date_end_in_calendar != $event->date_start_in_calendar) if ($event->date_end_in_calendar && $event->date_end_in_calendar != $event->date_start_in_calendar)
{ {
$tmpa = dol_getdate($event->date_start_in_calendar, true); $tmpa = dol_getdate($event->date_start_in_calendar, true);
$tmpb = dol_getdate($event->date_end_in_calendar, true); $tmpb = dol_getdate($event->date_end_in_calendar, true);
if ($tmpa['mday'] == $tmpb['mday'] && $tmpa['mon'] == $tmpb['mon'] && $tmpa['year'] == $tmpb['year']) $cases1[$h][$event->id]['string'] .= '-'.dol_print_date($event->date_end_in_calendar, 'hour'); if ($tmpa['mday'] == $tmpb['mday'] && $tmpa['mon'] == $tmpb['mon'] && $tmpa['year'] == $tmpb['year']) $cases1[$h][$event->id]['string'] .= '-'.dol_print_date($event->date_end_in_calendar, 'hour', 'tzuserrel');
else $cases1[$h][$event->id]['string'] .= '-'.dol_print_date($event->date_end_in_calendar, 'dayhour'); else $cases1[$h][$event->id]['string'] .= '-'.dol_print_date($event->date_end_in_calendar, 'dayhour', 'tzuserrel');
} }
if ($event->label) $cases1[$h][$event->id]['string'] .= ' - '.$event->label; if ($event->label) $cases1[$h][$event->id]['string'] .= ' - '.$event->label;
$cases1[$h][$event->id]['typecode'] = $event->type_code; $cases1[$h][$event->id]['typecode'] = $event->type_code;
@ -990,13 +990,13 @@ function show_day_events_pertype($username, $day, $month, $year, $monthshown, $s
{ {
$busy = $event->transparency; $busy = $event->transparency;
$cases2[$h][$event->id]['busy'] = $busy; $cases2[$h][$event->id]['busy'] = $busy;
$cases2[$h][$event->id]['string'] = dol_print_date($event->date_start_in_calendar, 'dayhour'); $cases2[$h][$event->id]['string'] = dol_print_date($event->date_start_in_calendar, 'dayhour', 'tzuserrel');
if ($event->date_end_in_calendar && $event->date_end_in_calendar != $event->date_start_in_calendar) if ($event->date_end_in_calendar && $event->date_end_in_calendar != $event->date_start_in_calendar)
{ {
$tmpa = dol_getdate($event->date_start_in_calendar, true); $tmpa = dol_getdate($event->date_start_in_calendar, true);
$tmpb = dol_getdate($event->date_end_in_calendar, true); $tmpb = dol_getdate($event->date_end_in_calendar, true);
if ($tmpa['mday'] == $tmpb['mday'] && $tmpa['mon'] == $tmpb['mon'] && $tmpa['year'] == $tmpb['year']) $cases2[$h][$event->id]['string'] .= '-'.dol_print_date($event->date_end_in_calendar, 'hour'); if ($tmpa['mday'] == $tmpb['mday'] && $tmpa['mon'] == $tmpb['mon'] && $tmpa['year'] == $tmpb['year']) $cases2[$h][$event->id]['string'] .= '-'.dol_print_date($event->date_end_in_calendar, 'hour', 'tzuserrel');
else $cases2[$h][$event->id]['string'] .= '-'.dol_print_date($event->date_end_in_calendar, 'dayhour'); else $cases2[$h][$event->id]['string'] .= '-'.dol_print_date($event->date_end_in_calendar, 'dayhour', 'tzuserrel');
} }
if ($event->label) $cases2[$h][$event->id]['string'] .= ' - '.$event->label; if ($event->label) $cases2[$h][$event->id]['string'] .= ' - '.$event->label;
$cases2[$h][$event->id]['typecode'] = $event->type_code; $cases2[$h][$event->id]['typecode'] = $event->type_code;

View File

@ -404,7 +404,11 @@ if ($user->rights->agenda->myactions->create || $user->rights->agenda->allaction
{ {
$tmpforcreatebutton = dol_getdate(dol_now(), true); $tmpforcreatebutton = dol_getdate(dol_now(), true);
$newparam .= '&month='.str_pad($month, 2, "0", STR_PAD_LEFT).'&year='.$tmpforcreatebutton['year']; $newparam .= '&month='.urlencode(str_pad($month, 2, "0", STR_PAD_LEFT)).'&year='.urlencode($tmpforcreatebutton['year']);
if ($begin_h !== '') $newparam .= '&begin_h='.urlencode($begin_h);
if ($end_h !== '') $newparam .= '&end_h='.urlencode($end_h);
if ($begin_d !== '') $newparam .= '&begin_d='.urlencode($begin_d);
if ($end_d !== '') $newparam .= '&end_d='.urlencode($end_d);
//$param='month='.$monthshown.'&year='.$year; //$param='month='.$monthshown.'&year='.$year;
$hourminsec = '100000'; $hourminsec = '100000';
@ -487,14 +491,14 @@ if ($filtert > 0 || $usergroup > 0) $sql .= " AND ar.fk_actioncomm = a.id AND ar
if ($action == 'show_day') if ($action == 'show_day')
{ {
$sql .= " AND ("; $sql .= " AND (";
$sql .= " (a.datep BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $month, $day, $year))."'"; $sql .= " (a.datep BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $month, $day, $year, 'tzuserrel'))."'";
$sql .= " AND '".$db->idate(dol_mktime(23, 59, 59, $month, $day, $year))."')"; $sql .= " AND '".$db->idate(dol_mktime(23, 59, 59, $month, $day, $year, 'tzuserrel'))."')";
$sql .= " OR "; $sql .= " OR ";
$sql .= " (a.datep2 BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $month, $day, $year))."'"; $sql .= " (a.datep2 BETWEEN '".$db->idate(dol_mktime(0, 0, 0, $month, $day, $year, 'tzuserrel'))."'";
$sql .= " AND '".$db->idate(dol_mktime(23, 59, 59, $month, $day, $year))."')"; $sql .= " AND '".$db->idate(dol_mktime(23, 59, 59, $month, $day, $year, 'tzuserrel'))."')";
$sql .= " OR "; $sql .= " OR ";
$sql .= " (a.datep < '".$db->idate(dol_mktime(0, 0, 0, $month, $day, $year))."'"; $sql .= " (a.datep < '".$db->idate(dol_mktime(0, 0, 0, $month, $day, $year, 'tzuserrel'))."'";
$sql .= " AND a.datep2 > '".$db->idate(dol_mktime(23, 59, 59, $month, $day, $year))."')"; $sql .= " AND a.datep2 > '".$db->idate(dol_mktime(23, 59, 59, $month, $day, $year, 'tzuserrel'))."')";
$sql .= ')'; $sql .= ')';
} else { } else {
// To limit array // To limit array
@ -605,9 +609,10 @@ if ($resql)
// Add an entry in actionarray for each day // Add an entry in actionarray for each day
$daycursor = $event->date_start_in_calendar; $daycursor = $event->date_start_in_calendar;
$annee = dol_print_date($daycursor, '%Y'); $annee = dol_print_date($daycursor, '%Y', 'tzuserrel');
$mois = dol_print_date($daycursor, '%m'); $mois = dol_print_date($daycursor, '%m', 'tzuserrel');
$jour = dol_print_date($daycursor, '%d'); $jour = dol_print_date($daycursor, '%d', 'tzuserrel');
//print $daycursor.' '.dol_print_date($daycursor, 'dayhour', 'gmt').' '.$event->id.' -> '.$annee.'-'.$mois.'-'.$jour.'<br>';
// Loop on each day covered by action to prepare an index to show on calendar // Loop on each day covered by action to prepare an index to show on calendar
$loop = true; $j = 0; $loop = true; $j = 0;
@ -920,7 +925,7 @@ jQuery(document).ready(function() {
if (ids == \'none\') /* No event */ if (ids == \'none\') /* No event */
{ {
/* alert(\'no event\'); */ /* alert(\'no event\'); */
url = "'.DOL_URL_ROOT.'/comm/action/card.php?action=create&assignedtouser="+userid+"&datep="+year+month+day+hour+min+"00&backtopage='.urlencode($_SERVER["PHP_SELF"].'?year='.$year.'&month='.$month.'&day='.$day).'" url = "'.DOL_URL_ROOT.'/comm/action/card.php?action=create&assignedtouser="+userid+"&datep="+year+month+day+hour+min+"00&backtopage='.urlencode($_SERVER["PHP_SELF"].'?year='.$year.'&month='.$month.'&day='.$day.($begin_h !== '' ? '&begin_h='.$begin_h : '').($end_h !== '' ? '&end_h='.$end_h : '').($begin_d !== '' ? '&begin_d='.$begin_d : '').($end_d !== '' ? '&end_d='.$end_d : '')).'"
window.location.href = url; window.location.href = url;
} }
else if (ids.indexOf(",") > -1) /* There is several events */ else if (ids.indexOf(",") > -1) /* There is several events */
@ -979,7 +984,7 @@ function show_day_events2($username, $day, $month, $year, $monthshown, $style, &
$cases2 = array(); // Color second half hour $cases2 = array(); // Color second half hour
$i = 0; $numother = 0; $numbirthday = 0; $numical = 0; $numicals = array(); $i = 0; $numother = 0; $numbirthday = 0; $numical = 0; $numicals = array();
$ymd = sprintf("%04d", $year).sprintf("%02d", $month).sprintf("%02d", $day); //$ymd = sprintf("%04d", $year).sprintf("%02d", $month).sprintf("%02d", $day);
$colorindexused[$user->id] = 0; // Color index for current user (user->id) is always 0 $colorindexused[$user->id] = 0; // Color index for current user (user->id) is always 0
$nextindextouse = count($colorindexused); // At first run this is 0, so first user has 0, next 1, ... $nextindextouse = count($colorindexused); // At first run this is 0, so first user has 0, next 1, ...
@ -988,16 +993,16 @@ function show_day_events2($username, $day, $month, $year, $monthshown, $style, &
// We are in a particular day for $username, now we scan all events // We are in a particular day for $username, now we scan all events
foreach ($eventarray as $daykey => $notused) foreach ($eventarray as $daykey => $notused)
{ {
$annee = dol_print_date($daykey, '%Y', 'gmt'); $annee = dol_print_date($daykey, '%Y');
$mois = dol_print_date($daykey, '%m', 'gmt'); $mois = dol_print_date($daykey, '%m');
$jour = dol_print_date($daykey, '%d', 'gmt'); $jour = dol_print_date($daykey, '%d');
if ($day == $jour && $month == $mois && $year == $annee) // Is it the day we are looking for when calling function ? if ($day == $jour && $month == $mois && $year == $annee) // Is it the day we are looking for when calling function ?
{ {
// Scan all event for this date // Scan all event for this date
foreach ($eventarray[$daykey] as $index => $event) foreach ($eventarray[$daykey] as $index => $event)
{ {
//print $daykey.' '.$year.'-'.$month.'-'.$day.' -> '.$event->id.' '.$index.' '.$annee.'-'.$mois.'-'.$jour."<br>\n"; //print $daykey.' '.dol_print_date($daykey, 'dayhour', 'gmt').' '.$year.'-'.$month.'-'.$day.' -> '.$event->id.' '.$index.' '.$annee.'-'.$mois.'-'.$jour."<br>\n";
//var_dump($event); //var_dump($event);
$keysofuserassigned = array_keys($event->userassigned); $keysofuserassigned = array_keys($event->userassigned);
@ -1078,7 +1083,6 @@ function show_day_events2($username, $day, $month, $year, $monthshown, $style, &
// Define color // Define color
$color = sprintf("%02x%02x%02x", $theme_datacolor[$colorindex][0], $theme_datacolor[$colorindex][1], $theme_datacolor[$colorindex][2]); $color = sprintf("%02x%02x%02x", $theme_datacolor[$colorindex][0], $theme_datacolor[$colorindex][1], $theme_datacolor[$colorindex][2]);
} }
//$cssclass=$cssclass.' '.$cssclass.'_day_'.$ymd;
// Define all rects with event (cases1 is first half hour, cases2 is second half hour) // Define all rects with event (cases1 is first half hour, cases2 is second half hour)
for ($h = $begin_h; $h < $end_h; $h++) for ($h = $begin_h; $h < $end_h; $h++)
@ -1087,9 +1091,9 @@ function show_day_events2($username, $day, $month, $year, $monthshown, $style, &
$newcolor = ''; //init $newcolor = ''; //init
if (empty($event->fulldayevent)) if (empty($event->fulldayevent))
{ {
$a = dol_mktime((int) $h, 0, 0, $month, $day, $year, 'auto', 0); $a = dol_mktime((int) $h, 0, 0, $month, $day, $year, 'tzuserrel', 0);
$b = dol_mktime((int) $h, 30, 0, $month, $day, $year, 'auto', 0); $b = dol_mktime((int) $h, 30, 0, $month, $day, $year, 'tzuserrel', 0);
$c = dol_mktime((int) $h + 1, 0, 0, $month, $day, $year, 'auto', 0); $c = dol_mktime((int) $h + 1, 0, 0, $month, $day, $year, 'tzuserrel', 0);
$dateendtouse = $event->date_end_in_calendar; $dateendtouse = $event->date_end_in_calendar;
if ($dateendtouse == $event->date_start_in_calendar) $dateendtouse++; if ($dateendtouse == $event->date_start_in_calendar) $dateendtouse++;
@ -1100,13 +1104,13 @@ function show_day_events2($username, $day, $month, $year, $monthshown, $style, &
{ {
$busy = $event->transparency; $busy = $event->transparency;
$cases1[$h][$event->id]['busy'] = $busy; $cases1[$h][$event->id]['busy'] = $busy;
$cases1[$h][$event->id]['string'] = dol_print_date($event->date_start_in_calendar, 'dayhour'); $cases1[$h][$event->id]['string'] = dol_print_date($event->date_start_in_calendar, 'dayhour', 'tzuserrel');
if ($event->date_end_in_calendar && $event->date_end_in_calendar != $event->date_start_in_calendar) if ($event->date_end_in_calendar && $event->date_end_in_calendar != $event->date_start_in_calendar)
{ {
$tmpa = dol_getdate($event->date_start_in_calendar, true); $tmpa = dol_getdate($event->date_start_in_calendar, true);
$tmpb = dol_getdate($event->date_end_in_calendar, true); $tmpb = dol_getdate($event->date_end_in_calendar, true);
if ($tmpa['mday'] == $tmpb['mday'] && $tmpa['mon'] == $tmpb['mon'] && $tmpa['year'] == $tmpb['year']) $cases1[$h][$event->id]['string'] .= '-'.dol_print_date($event->date_end_in_calendar, 'hour'); if ($tmpa['mday'] == $tmpb['mday'] && $tmpa['mon'] == $tmpb['mon'] && $tmpa['year'] == $tmpb['year']) $cases1[$h][$event->id]['string'] .= '-'.dol_print_date($event->date_end_in_calendar, 'hour', 'tzuserrel');
else $cases1[$h][$event->id]['string'] .= '-'.dol_print_date($event->date_end_in_calendar, 'dayhour'); else $cases1[$h][$event->id]['string'] .= '-'.dol_print_date($event->date_end_in_calendar, 'dayhour', 'tzuserrel');
} }
if ($event->label) $cases1[$h][$event->id]['string'] .= ' - '.$event->label; if ($event->label) $cases1[$h][$event->id]['string'] .= ' - '.$event->label;
$cases1[$h][$event->id]['typecode'] = $event->type_code; $cases1[$h][$event->id]['typecode'] = $event->type_code;
@ -1146,13 +1150,13 @@ function show_day_events2($username, $day, $month, $year, $monthshown, $style, &
{ {
$busy = $event->transparency; $busy = $event->transparency;
$cases2[$h][$event->id]['busy'] = $busy; $cases2[$h][$event->id]['busy'] = $busy;
$cases2[$h][$event->id]['string'] = dol_print_date($event->date_start_in_calendar, 'dayhour'); $cases2[$h][$event->id]['string'] = dol_print_date($event->date_start_in_calendar, 'dayhour', 'tzuserrel');
if ($event->date_end_in_calendar && $event->date_end_in_calendar != $event->date_start_in_calendar) if ($event->date_end_in_calendar && $event->date_end_in_calendar != $event->date_start_in_calendar)
{ {
$tmpa = dol_getdate($event->date_start_in_calendar, true); $tmpa = dol_getdate($event->date_start_in_calendar, true);
$tmpb = dol_getdate($event->date_end_in_calendar, true); $tmpb = dol_getdate($event->date_end_in_calendar, true);
if ($tmpa['mday'] == $tmpb['mday'] && $tmpa['mon'] == $tmpb['mon'] && $tmpa['year'] == $tmpb['year']) $cases2[$h][$event->id]['string'] .= '-'.dol_print_date($event->date_end_in_calendar, 'hour'); if ($tmpa['mday'] == $tmpb['mday'] && $tmpa['mon'] == $tmpb['mon'] && $tmpa['year'] == $tmpb['year']) $cases2[$h][$event->id]['string'] .= '-'.dol_print_date($event->date_end_in_calendar, 'hour', 'tzuserrel');
else $cases2[$h][$event->id]['string'] .= '-'.dol_print_date($event->date_end_in_calendar, 'dayhour'); else $cases2[$h][$event->id]['string'] .= '-'.dol_print_date($event->date_end_in_calendar, 'dayhour', 'tzuserrel');
} }
if ($event->label) $cases2[$h][$event->id]['string'] .= ' - '.$event->label; if ($event->label) $cases2[$h][$event->id]['string'] .= ' - '.$event->label;
$cases2[$h][$event->id]['typecode'] = $event->type_code; $cases2[$h][$event->id]['typecode'] = $event->type_code;

View File

@ -273,9 +273,9 @@ if ($object->id > 0)
print '<div class="underbanner clearboth"></div>'; print '<div class="underbanner clearboth"></div>';
print '<table class="border centpercent tableforfield">'; print '<table class="border centpercent tableforfield">';
// Prospect/Customer // Type Prospect/Customer/Supplier
print '<tr><td class="titlefield">'.$langs->trans('ProspectCustomer').'</td><td>'; print '<tr><td class="titlefield">'.$langs->trans('NatureOfThirdParty').'</td><td>';
print $object->getLibCustProspStatut(); print $object->getTypeUrl(1);
print '</td></tr>'; print '</td></tr>';
// Prefix // Prefix

View File

@ -575,17 +575,17 @@ if ($object->fetch($id) >= 0)
print '</td>'; print '</td>';
// Source // Source
print '<td class="liste_titre">'; print '<td class="liste_titre">';
print '&nbsp'; print '&nbsp;';
print '</td>'; print '</td>';
// Date last update // Date last update
print '<td class="liste_titre">'; print '<td class="liste_titre">';
print '&nbsp'; print '&nbsp;';
print '</td>'; print '</td>';
// Date sending // Date sending
print '<td class="liste_titre">'; print '<td class="liste_titre">';
print '&nbsp'; print '&nbsp;';
print '</td>'; print '</td>';
//Statut //Statut

View File

@ -1386,7 +1386,7 @@ if ($resql)
} }
//else print $langs->trans("NoSalesRepresentativeAffected"); //else print $langs->trans("NoSalesRepresentativeAffected");
} else { } else {
print '&nbsp'; print '&nbsp;';
} }
print '</td>'; print '</td>';
if (!$i) $totalarray['nbfield']++; if (!$i) $totalarray['nbfield']++;

View File

@ -263,7 +263,7 @@ print '<div class="fichecenter"><div class="fichethirdleft">';
// ThirdParty Type // ThirdParty Type
print '<tr><td>'.$langs->trans("ThirdPartyType").'</td><td>'; print '<tr><td>'.$langs->trans("ThirdPartyType").'</td><td>';
$sortparam_typent = (empty($conf->global->SOCIETE_SORT_ON_TYPEENT) ? 'ASC' : $conf->global->SOCIETE_SORT_ON_TYPEENT); // NONE means we keep sort of original array, so we sort on position. ASC, means next function will sort on label. $sortparam_typent = (empty($conf->global->SOCIETE_SORT_ON_TYPEENT) ? 'ASC' : $conf->global->SOCIETE_SORT_ON_TYPEENT); // NONE means we keep sort of original array, so we sort on position. ASC, means next function will sort on label.
print $form->selectarray("typent_id", $formcompany->typent_array(0), $typent_id, 0, 0, 0, '', 0, 0, 0, $sortparam_typent); print $form->selectarray("typent_id", $formcompany->typent_array(0), $typent_id, 0, 0, 0, '', 0, 0, 0, $sortparam_typent, '', 1);
if ($user->admin) print ' '.info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); if ($user->admin) print ' '.info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
print '</td></tr>'; print '</td></tr>';
// Category // Category

View File

@ -271,7 +271,7 @@ print '</td></tr>';
// ThirdParty Type // ThirdParty Type
print '<tr><td>'.$langs->trans("ThirdPartyType").'</td><td>'; print '<tr><td>'.$langs->trans("ThirdPartyType").'</td><td>';
$sortparam_typent = (empty($conf->global->SOCIETE_SORT_ON_TYPEENT) ? 'ASC' : $conf->global->SOCIETE_SORT_ON_TYPEENT); // NONE means we keep sort of original array, so we sort on position. ASC, means next function will sort on label. $sortparam_typent = (empty($conf->global->SOCIETE_SORT_ON_TYPEENT) ? 'ASC' : $conf->global->SOCIETE_SORT_ON_TYPEENT); // NONE means we keep sort of original array, so we sort on position. ASC, means next function will sort on label.
print $form->selectarray("typent_id", $formcompany->typent_array(0), $typent_id, 0, 0, 0, '', 0, 0, 0, $sortparam_typent); print $form->selectarray("typent_id", $formcompany->typent_array(0), $typent_id, 0, 0, 0, '', 0, 0, 0, $sortparam_typent, '', 1);
if ($user->admin) print ' '.info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); if ($user->admin) print ' '.info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
print '</td></tr>'; print '</td></tr>';
// Category // Category

View File

@ -933,7 +933,7 @@ $companystatic = new Societe($db);
$invoicerectmp = new FactureRec($db); $invoicerectmp = new FactureRec($db);
$now = dol_now(); $now = dol_now();
$nowlasthour = dol_last_hour($now); $nowlasthour = dol_get_last_hour($now);
/* /*
@ -1245,7 +1245,9 @@ if ($action == 'create')
print '<table class="border centpercent tableforfield">'; print '<table class="border centpercent tableforfield">';
print '<tr><td class="titlefield">'.$langs->trans("Author").'</td><td>'.$author->getFullName($langs)."</td></tr>"; print '<tr><td class="titlefield">'.$langs->trans("Author").'</td><td>';
print $author->getNomUrl(-1);
print "</td></tr>";
print '<tr><td>'.$langs->trans("AmountHT").'</td>'; print '<tr><td>'.$langs->trans("AmountHT").'</td>';
print '<td>'.price($object->total_ht, '', $langs, 1, -1, -1, $conf->currency).'</td>'; print '<td>'.price($object->total_ht, '', $langs, 1, -1, -1, $conf->currency).'</td>';

View File

@ -287,7 +287,9 @@ if ($object->id > 0)
// Type // Type
print '<tr><td class="titlefield">'.$langs->trans('Type').'</td><td colspan="3">'; print '<tr><td class="titlefield">'.$langs->trans('Type').'</td><td colspan="3">';
print '<span class="badgeneutral">';
print $object->getLibType(); print $object->getLibType();
print '</span>';
if ($object->module_source) { if ($object->module_source) {
print ' <span class="opacitymediumbycolor">('.$langs->trans("POS").' '.$object->module_source.' - '.$langs->trans("Terminal").' '.$object->pos_source.')</span>'; print ' <span class="opacitymediumbycolor">('.$langs->trans("POS").' '.$object->module_source.' - '.$langs->trans("Terminal").' '.$object->pos_source.')</span>';
} }

View File

@ -264,7 +264,7 @@ print '</td></tr>';
// ThirdParty Type // ThirdParty Type
print '<tr><td>'.$langs->trans("ThirdPartyType").'</td><td>'; print '<tr><td>'.$langs->trans("ThirdPartyType").'</td><td>';
$sortparam_typent = (empty($conf->global->SOCIETE_SORT_ON_TYPEENT) ? 'ASC' : $conf->global->SOCIETE_SORT_ON_TYPEENT); // NONE means we keep sort of original array, so we sort on position. ASC, means next function will sort on label. $sortparam_typent = (empty($conf->global->SOCIETE_SORT_ON_TYPEENT) ? 'ASC' : $conf->global->SOCIETE_SORT_ON_TYPEENT); // NONE means we keep sort of original array, so we sort on position. ASC, means next function will sort on label.
print $form->selectarray("typent_id", $formcompany->typent_array(0), $typent_id, 0, 0, 0, '', 0, 0, 0, $sortparam_typent); print $form->selectarray("typent_id", $formcompany->typent_array(0), $typent_id, 0, 0, 0, '', 0, 0, 0, $sortparam_typent, '', 1);
if ($user->admin) print ' '.info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1); if ($user->admin) print ' '.info_admin($langs->trans("YouCanChangeValuesForThisListFromDictionarySetup"), 1);
print '</td></tr>'; print '</td></tr>';

View File

@ -148,7 +148,7 @@ llxHeader('', $langs->trans('ListPayment'));
if (GETPOST("orphelins", "alpha")) { if (GETPOST("orphelins", "alpha")) {
// Payments not linked to an invoice. Should not happend. For debug only. // Payments not linked to an invoice. Should not happend. For debug only.
$sql = "SELECT p.ref, p.datep, p.amount, p.statut, p.num_paiement"; $sql = "SELECT p.rowid, p.ref, p.datep, p.amount, p.statut, p.num_paiement";
$sql .= ", c.code as paiement_code"; $sql .= ", c.code as paiement_code";
// Add fields from hooks // Add fields from hooks
@ -166,7 +166,7 @@ if (GETPOST("orphelins", "alpha")) {
$sql .= $hookmanager->resPrint; $sql .= $hookmanager->resPrint;
} else { } else {
// DISTINCT is to avoid duplicate when there is a link to sales representatives // DISTINCT is to avoid duplicate when there is a link to sales representatives
$sql = "SELECT DISTINCT p.ref, p.datep, p.fk_bank, p.amount, p.statut, p.num_paiement"; $sql = "SELECT DISTINCT p.rowid, p.ref, p.datep, p.fk_bank, p.amount, p.statut, p.num_paiement";
$sql .= ", c.code as paiement_code"; $sql .= ", c.code as paiement_code";
$sql .= ", ba.rowid as bid, ba.ref as bref, ba.label as blabel, ba.number, ba.account_number as account_number, ba.fk_accountancy_journal as accountancy_journal"; $sql .= ", ba.rowid as bid, ba.ref as bref, ba.label as blabel, ba.number, ba.account_number as account_number, ba.fk_accountancy_journal as accountancy_journal";
$sql .= ", s.rowid as socid, s.nom as name, s.email"; $sql .= ", s.rowid as socid, s.nom as name, s.email";
@ -390,7 +390,7 @@ while ($i < min($num, $limit)) {
$objp = $db->fetch_object($resql); $objp = $db->fetch_object($resql);
$object->id = $objp->rowid; $object->id = $objp->rowid;
$object->ref = $objp->ref; $object->ref = ($objp->ref ? $objp->ref : $objp->rowid);
$companystatic->id = $objp->socid; $companystatic->id = $objp->socid;
$companystatic->name = $objp->name; $companystatic->name = $objp->name;
@ -497,6 +497,14 @@ while ($i < min($num, $limit)) {
// Show total line // Show total line
include DOL_DOCUMENT_ROOT.'/core/tpl/list_print_total.tpl.php'; include DOL_DOCUMENT_ROOT.'/core/tpl/list_print_total.tpl.php';
// If no record found
if ($num == 0)
{
$colspan = 1;
foreach ($arrayfields as $key => $val) { if (!empty($val['checked'])) $colspan++; }
print '<tr><td colspan="'.$colspan.'" class="opacitymedium">'.$langs->trans("NoRecordFound").'</td></tr>';
}
print "</table>"; print "</table>";
print "</div>"; print "</div>";
print "</form>"; print "</form>";

View File

@ -98,7 +98,13 @@ if (empty($reshook))
// Seems to no be used and replaced with $action == 'infocredit' // Seems to no be used and replaced with $action == 'infocredit'
if ($action == 'confirm_credite' && GETPOST('confirm', 'alpha') == 'yes') if ($action == 'confirm_credite' && GETPOST('confirm', 'alpha') == 'yes')
{ {
if ($object->statut == 2) {
$res = -1;
setEventMessages('WithdrawalCantBeCreditedTwice', array(), 'errors');
} else {
$res = $object->set_credite(); $res = $object->set_credite();
}
if ($res >= 0) if ($res >= 0)
{ {
header("Location: card.php?id=".$id); header("Location: card.php?id=".$id);
@ -145,7 +151,13 @@ if (empty($reshook))
{ {
$dt = dol_mktime(12, 0, 0, GETPOST('remonth', 'int'), GETPOST('reday', 'int'), GETPOST('reyear', 'int')); $dt = dol_mktime(12, 0, 0, GETPOST('remonth', 'int'), GETPOST('reday', 'int'), GETPOST('reyear', 'int'));
if ($object->statut == 2) {
$error = 1;
setEventMessages('WithdrawalCantBeCreditedTwice', array(), 'errors');
} else {
$error = $object->set_infocredit($user, $dt); $error = $object->set_infocredit($user, $dt);
}
if ($error) if ($error)
{ {
setEventMessages($object->error, $object->errors, 'errors'); setEventMessages($object->error, $object->errors, 'errors');

View File

@ -746,7 +746,7 @@ while ($i < min($num, $limit))
} }
//else print $langs->trans("NoSalesRepresentativeAffected"); //else print $langs->trans("NoSalesRepresentativeAffected");
} else { } else {
print '&nbsp'; print '&nbsp;';
} }
print '</td>'; print '</td>';
} }

View File

@ -291,9 +291,6 @@ class box_dolibarr_state_board extends ModeleBoxes
$boxstat .= '<a class="boxstatsindicator thumbstat nobold nounderline"><div class="boxstatsempty"></div></a>'; $boxstat .= '<a class="boxstatsindicator thumbstat nobold nounderline"><div class="boxstatsempty"></div></a>';
$boxstat .= '<a class="boxstatsindicator thumbstat nobold nounderline"><div class="boxstatsempty"></div></a>'; $boxstat .= '<a class="boxstatsindicator thumbstat nobold nounderline"><div class="boxstatsempty"></div></a>';
$boxstat .= '</td></tr>';
$boxstat .= '</table>';
$this->info_box_contents[0][0] = array( $this->info_box_contents[0][0] = array(
'td' => '', 'td' => '',
'textnoformat' => $boxstat 'textnoformat' => $boxstat

View File

@ -2,7 +2,7 @@
/* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org> /* Copyright (C) 2003 Rodolphe Quiedeville <rodolphe@quiedeville.org>
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com> * Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2015 Frederic France <frederic.france@free.fr> * Copyright (C) 2015-2021 Frederic France <frederic.france@netlogic.fr>
* *
* This program is free software; you can redistribute it and/or modify * 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 * it under the terms of the GNU General Public License as published by
@ -196,7 +196,7 @@ class box_produits extends ModeleBoxes
$this->info_box_contents[$line][] = array( $this->info_box_contents[$line][] = array(
'td' => 'class="right" width="18"', 'td' => 'class="right" width="18"',
'text' => '<span class="statusrefsell">'.$productstatic->LibStatut($objp->tosell, 3, 0).'<span>', 'text' => '<span class="statusrefsell">'.$productstatic->LibStatut($objp->tosell, 3, 0).'</span>',
'asis' => 1 'asis' => 1
); );

View File

@ -3,7 +3,7 @@
* Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net> * Copyright (C) 2004-2011 Laurent Destailleur <eldy@users.sourceforge.net>
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com> * Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2005-2012 Maxime Kohlhaas <mko@atm-consulting.fr> * Copyright (C) 2005-2012 Maxime Kohlhaas <mko@atm-consulting.fr>
* Copyright (C) 2015-2019 Frédéric France <frederic.france@netlogic.fr> * Copyright (C) 2015-2021 Frédéric France <frederic.france@netlogic.fr>
* Copyright (C) 2015 Juanjo Menent <jmenent@2byte.es> * Copyright (C) 2015 Juanjo Menent <jmenent@2byte.es>
* *
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
@ -206,23 +206,24 @@ class box_produits_alerte_stock extends ModeleBoxes
$this->info_box_contents[$line][] = array( $this->info_box_contents[$line][] = array(
'td' => 'class="right" width="18"', 'td' => 'class="right" width="18"',
'text' => '<span class="statusrefsell">'.$productstatic->LibStatut($objp->tosell, 3, 0).'<span>', 'text' => '<span class="statusrefsell">'.$productstatic->LibStatut($objp->tosell, 3, 0).'</span>',
'asis' => 1 'asis' => 1
); );
$this->info_box_contents[$line][] = array( $this->info_box_contents[$line][] = array(
'td' => 'class="right" width="18"', 'td' => 'class="right" width="18"',
'text' => '<span class="statusrefbuy">'.$productstatic->LibStatut($objp->tobuy, 3, 0).'<span>', 'text' => '<span class="statusrefbuy">'.$productstatic->LibStatut($objp->tobuy, 3, 0).'</span>',
'asis' => 1 'asis' => 1
); );
$line++; $line++;
} }
if ($num == 0) if ($num == 0) {
$this->info_box_contents[$line][0] = array( $this->info_box_contents[$line][0] = array(
'td' => 'class="center"', 'td' => 'class="center"',
'text'=>$langs->trans("NoTooLowStockProducts"), 'text'=>$langs->trans("NoTooLowStockProducts"),
); );
}
$this->db->free($result); $this->db->free($result);
} else { } else {

View File

@ -4915,7 +4915,7 @@ abstract class CommonObject
$this->result['filename']=$ecmfile->filename;*/ $this->result['filename']=$ecmfile->filename;*/
//var_dump($obj->update_main_doc_field);exit; //var_dump($obj->update_main_doc_field);exit;
// Update the last_main_doc field into main object (if documenent generator has property ->update_main_doc_field set) // Update the last_main_doc field into main object (if document generator has property ->update_main_doc_field set)
$update_main_doc_field = 0; $update_main_doc_field = 0;
if (!empty($obj->update_main_doc_field)) $update_main_doc_field = 1; if (!empty($obj->update_main_doc_field)) $update_main_doc_field = 1;
if ($update_main_doc_field && !empty($this->table_element)) if ($update_main_doc_field && !empty($this->table_element))

View File

@ -17,7 +17,7 @@
* Copyright (C) 2012-2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr> * Copyright (C) 2012-2015 Raphaël Doursenaud <rdoursenaud@gpcsolutions.fr>
* Copyright (C) 2014-2020 Alexandre Spangaro <aspangaro@open-dsi.fr> * Copyright (C) 2014-2020 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2018 Ferran Marcet <fmarcet@2byte.es> * Copyright (C) 2018 Ferran Marcet <fmarcet@2byte.es>
* Copyright (C) 2018-2019 Frédéric France <frederic.france@netlogic.fr> * Copyright (C) 2018-2021 Frédéric France <frederic.france@netlogic.fr>
* Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com> * Copyright (C) 2018 Nicolas ZABOURI <info@inovea-conseil.com>
* Copyright (C) 2018 Christophe Battarel <christophe@altairis.fr> * Copyright (C) 2018 Christophe Battarel <christophe@altairis.fr>
* Copyright (C) 2018 Josep Lluis Amador <joseplluis@lliuretic.cat> * Copyright (C) 2018 Josep Lluis Amador <joseplluis@lliuretic.cat>
@ -1800,10 +1800,9 @@ class Form
} }
$out .= ' data-html="'; $out .= ' data-html="';
$outhtml = ''; $outhtml = '';
// if (!empty($obj->photo)) // if (!empty($obj->photo)) {
// {
$outhtml .= $userstatic->getNomUrl(-3, '', 0, 1, 24, 1, 'login', '', 1).' '; $outhtml .= $userstatic->getNomUrl(-3, '', 0, 1, 24, 1, 'login', '', 1).' ';
// } // }
if ($showstatus >= 0 && $obj->status == 0) $outhtml .= '<strike class="opacitymediumxxx">'; if ($showstatus >= 0 && $obj->status == 0) $outhtml .= '<strike class="opacitymediumxxx">';
$outhtml .= $labeltoshow; $outhtml .= $labeltoshow;
if ($showstatus >= 0 && $obj->status == 0) $outhtml .= '</strike>'; if ($showstatus >= 0 && $obj->status == 0) $outhtml .= '</strike>';
@ -4249,7 +4248,7 @@ class Form
$output .= '<option value="-1">&nbsp;</option>'; $output .= '<option value="-1">&nbsp;</option>';
foreach ($cate_arbo as $key => $value) foreach ($cate_arbo as $key => $value)
{ {
if ($cate_arbo[$key]['id'] == $selected || ($selected == 'auto' && count($cate_arbo) == 1)) if ($cate_arbo[$key]['id'] == $selected || ($selected === 'auto' && count($cate_arbo) == 1))
{ {
$add = 'selected '; $add = 'selected ';
} else { } else {
@ -5586,9 +5585,11 @@ class Form
*/ */
public function selectDateToDate($set_time = '', $set_time_end = '', $prefix = 're', $empty = 0) public function selectDateToDate($set_time = '', $set_time_end = '', $prefix = 're', $empty = 0)
{ {
$ret = $this->selectDate($set_time, $prefix.'_start', 0, 0, $empty); global $langs;
$ret .= '<br/>';
$ret .= $this->selectDate($set_time_end, $prefix.'_end', 0, 0, $empty); $ret = $this->selectDate($set_time, $prefix.'_start', 0, 0, $empty, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans("from"), 'tzuserrel');
$ret .= '<br>';
$ret .= $this->selectDate($set_time_end, $prefix.'_end', 0, 0, $empty, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans("to"), 'tzuserrel');
return $ret; return $ret;
} }
@ -5703,7 +5704,7 @@ class Form
if (strval($set_time) != '' && $set_time != -1) if (strval($set_time) != '' && $set_time != -1)
{ {
//$formated_date=dol_print_date($set_time,$conf->format_date_short); //$formated_date=dol_print_date($set_time,$conf->format_date_short);
$formated_date = dol_print_date($set_time, $langs->trans("FormatDateShortInput")); // FormatDateShortInput for dol_print_date / FormatDateShortJavaInput that is same for javascript $formated_date = dol_print_date($set_time, $langs->trans("FormatDateShortInput"), $gm); // FormatDateShortInput for dol_print_date / FormatDateShortJavaInput that is same for javascript
} }
// Calendrier popup version eldy // Calendrier popup version eldy
@ -6431,7 +6432,7 @@ class Form
* @param string $htmlname Name of html select area. Must start with "multi" if this is a multiselect * @param string $htmlname Name of html select area. Must start with "multi" if this is a multiselect
* @param array $array Array like array(key => value) or array(key=>array('label'=>..., 'data-...'=>..., 'disabled'=>..., 'css'=>...)) * @param array $array Array like array(key => value) or array(key=>array('label'=>..., 'data-...'=>..., 'disabled'=>..., 'css'=>...))
* @param string|string[] $id Preselected key or preselected keys for multiselect * @param string|string[] $id Preselected key or preselected keys for multiselect
* @param int|string $show_empty 0 no empty value allowed, 1 or string to add an empty value into list (key is -1 and value is '' or '&nbsp;' if 1, key is -1 and value is the text if it is a placeholder string), <0 to add an empty value with key that is this value. * @param int|string $show_empty 0 no empty value allowed, 1 or string to add an empty value into list (If 1: key is -1 and value is '' or '&nbsp;', If placeholder string: key is -1 and value is the string), <0 to add an empty value with key that is this value.
* @param int $key_in_label 1 to show key into label with format "[key] value" * @param int $key_in_label 1 to show key into label with format "[key] value"
* @param int $value_as_key 1 to use value as key * @param int $value_as_key 1 to use value as key
* @param string $moreparam Add more parameters onto the select tag. For example 'style="width: 95%"' to avoid select2 component to go over parent container * @param string $moreparam Add more parameters onto the select tag. For example 'style="width: 95%"' to avoid select2 component to go over parent container
@ -6447,7 +6448,7 @@ class Form
* @return string HTML select string. * @return string HTML select string.
* @see multiselectarray(), selectArrayAjax(), selectArrayFilter() * @see multiselectarray(), selectArrayAjax(), selectArrayFilter()
*/ */
public static function selectarray($htmlname, $array, $id = '', $show_empty = 0, $key_in_label = 0, $value_as_key = 0, $moreparam = '', $translate = 0, $maxlen = 0, $disabled = 0, $sort = '', $morecss = '', $addjscombo = 0, $moreparamonempty = '', $disablebademail = 0, $nohtmlescape = 0) public static function selectarray($htmlname, $array, $id = '', $show_empty = 0, $key_in_label = 0, $value_as_key = 0, $moreparam = '', $translate = 0, $maxlen = 0, $disabled = 0, $sort = '', $morecss = '', $addjscombo = 1, $moreparamonempty = '', $disablebademail = 0, $nohtmlescape = 0)
{ {
global $conf, $langs; global $conf, $langs;
@ -6461,11 +6462,7 @@ class Form
$out = ''; $out = '';
// Add code for jquery to use multiselect // Add code for jquery to use multiselect
if ($addjscombo && $jsbeautify) if ($addjscombo && $jsbeautify) {
{
$minLengthToAutocomplete = 0;
$tmpplugin = empty($conf->global->MAIN_USE_JQUERY_MULTISELECT) ? (constant('REQUIRE_JQUERY_MULTISELECT') ?constant('REQUIRE_JQUERY_MULTISELECT') : 'select2') : $conf->global->MAIN_USE_JQUERY_MULTISELECT;
// Enhance with select2 // Enhance with select2
include_once DOL_DOCUMENT_ROOT.'/core/lib/ajax.lib.php'; include_once DOL_DOCUMENT_ROOT.'/core/lib/ajax.lib.php';
$out .= ajax_combobox($htmlname); $out .= ajax_combobox($htmlname);
@ -6475,16 +6472,14 @@ class Form
$out .= ' name="'.preg_replace('/^\./', '', $htmlname).'" '.($moreparam ? $moreparam : ''); $out .= ' name="'.preg_replace('/^\./', '', $htmlname).'" '.($moreparam ? $moreparam : '');
$out .= '>'; $out .= '>';
if ($show_empty) if ($show_empty) {
{
$textforempty = ' '; $textforempty = ' ';
if (!empty($conf->use_javascript_ajax)) $textforempty = '&nbsp;'; // If we use ajaxcombo, we need &nbsp; here to avoid to have an empty element that is too small. if (!empty($conf->use_javascript_ajax)) $textforempty = '&nbsp;'; // If we use ajaxcombo, we need &nbsp; here to avoid to have an empty element that is too small.
if (!is_numeric($show_empty)) $textforempty = $show_empty; if (!is_numeric($show_empty)) $textforempty = $show_empty;
$out .= '<option class="optiongrey" '.($moreparamonempty ? $moreparamonempty.' ' : '').'value="'.($show_empty < 0 ? $show_empty : -1).'"'.($id == $show_empty ? ' selected' : '').'>'.$textforempty.'</option>'."\n"; $out .= '<option class="optiongrey" '.($moreparamonempty ? $moreparamonempty.' ' : '').'value="'.($show_empty < 0 ? $show_empty : -1).'"'.($id == $show_empty ? ' selected' : '').'>'.$textforempty.'</option>'."\n";
} }
if (is_array($array)) if (is_array($array)) {
{
// Translate // Translate
if ($translate) if ($translate)
{ {

View File

@ -204,7 +204,7 @@ class FormActions
$newcardbutton = ''; $newcardbutton = '';
if (!empty($conf->agenda->enabled) && !empty($user->rights->agenda->myactions->create)) if (!empty($conf->agenda->enabled) && !empty($user->rights->agenda->myactions->create))
{ {
$url = DOL_URL_ROOT.'/comm/action/card.php?action=create&amp;datep='.urlencode(dol_print_date(dol_now(), 'dayhourlog'), 'tzuser').'&amp;origin='.urlencode($typeelement).'&amp;originid='.$object->id.((!empty($object->socid) && $object->socid > 0) ? '&amp;socid='.$object->socid : ((!empty($socid) && $socid > 0) ? '&amp;socid='.$socid : '')).($projectid > 0 ? '&amp;projectid='.$projectid : '').'&amp;backtopage='.urlencode($urlbacktopage); $url = DOL_URL_ROOT.'/comm/action/card.php?action=create&amp;datep='.urlencode(dol_print_date(dol_now(), 'dayhourlog', 'tzuser')).'&amp;origin='.urlencode($typeelement).'&amp;originid='.$object->id.((!empty($object->socid) && $object->socid > 0) ? '&amp;socid='.$object->socid : ((!empty($socid) && $socid > 0) ? '&amp;socid='.$socid : '')).($projectid > 0 ? '&amp;projectid='.$projectid : '').'&amp;backtopage='.urlencode($urlbacktopage);
$newcardbutton .= dolGetButtonTitle($langs->trans("AddEvent"), '', 'fa fa-plus-circle', $url); $newcardbutton .= dolGetButtonTitle($langs->trans("AddEvent"), '', 'fa fa-plus-circle', $url);
} }

View File

@ -336,7 +336,7 @@ class FormOther
* @param integer $selected Preselected value * @param integer $selected Preselected value
* @param string $htmlname Name of combo list * @param string $htmlname Name of combo list
* @param int $nocateg Show also an entry "Not categorized" * @param int $nocateg Show also an entry "Not categorized"
* @param int $showempty Add also an empty line * @param int|string $showempty Add also an empty line
* @param string $morecss More CSS * @param string $morecss More CSS
* @return string Html combo list code * @return string Html combo list code
* @see select_all_categories() * @see select_all_categories()
@ -368,7 +368,13 @@ class FormOther
// Print a select with each of them // Print a select with each of them
$moreforfilter .= '<select class="flat minwidth100'.($morecss ? ' '.$morecss : '').'" id="select_categ_'.$htmlname.'" name="'.$htmlname.'">'; $moreforfilter .= '<select class="flat minwidth100'.($morecss ? ' '.$morecss : '').'" id="select_categ_'.$htmlname.'" name="'.$htmlname.'">';
if ($showempty) $moreforfilter .= '<option value="0">&nbsp;</option>'; // Should use -1 to say nothing if ($showempty) {
$textforempty = ' ';
if (!empty($conf->use_javascript_ajax)) $textforempty = '&nbsp;'; // If we use ajaxcombo, we need &nbsp; here to avoid to have an empty element that is too small.
if (!is_numeric($showempty)) $textforempty = $showempty;
$moreforfilter .= '<option class="optiongrey" '.($moreparamonempty ? $moreparamonempty.' ' : '').'value="'.($showempty < 0 ? $showempty : -1).'"'.($selected == $showempty ? ' selected' : '').'>'.$textforempty.'</option>'."\n";
//$moreforfilter .= '<option value="0" '.($moreparamonempty ? $moreparamonempty.' ' : '').' class="optiongrey">'.(is_numeric($showempty) ? '&nbsp;' : $showempty).'</option>'; // Should use -1 to say nothing
}
if (is_array($tab_categs)) if (is_array($tab_categs))
{ {
@ -398,7 +404,7 @@ class FormOther
* @param string $htmlname Name of combo list (example: 'search_sale') * @param string $htmlname Name of combo list (example: 'search_sale')
* @param User $user Object user * @param User $user Object user
* @param int $showstatus 0=show user status only if status is disabled, 1=always show user status into label, -1=never show user status * @param int $showstatus 0=show user status only if status is disabled, 1=always show user status into label, -1=never show user status
* @param int $showempty 1=show also an empty value * @param int|string $showempty 1=show also an empty value
* @param string $morecss More CSS * @param string $morecss More CSS
* @param int $norepresentative Show also an entry "Not categorized" * @param int $norepresentative Show also an entry "Not categorized"
* @return string Html combo list code * @return string Html combo list code
@ -427,7 +433,12 @@ class FormOther
// Select each sales and print them in a select input // Select each sales and print them in a select input
$out .= '<select class="flat'.($morecss ? ' '.$morecss : '').'" id="'.$htmlname.'" name="'.$htmlname.'">'; $out .= '<select class="flat'.($morecss ? ' '.$morecss : '').'" id="'.$htmlname.'" name="'.$htmlname.'">';
if ($showempty) $out .= '<option value="0">&nbsp;</option>'; if ($showempty) {
$textforempty = ' ';
if (!empty($conf->use_javascript_ajax)) $textforempty = '&nbsp;'; // If we use ajaxcombo, we need &nbsp; here to avoid to have an empty element that is too small.
if (!is_numeric($showempty)) $textforempty = $showempty;
$out .= '<option class="optiongrey" value="'.($showempty < 0 ? $showempty : -1).'"'.($selected == $showempty ? ' selected' : '').'>'.$textforempty.'</option>'."\n";
}
// Get list of users allowed to be viewed // Get list of users allowed to be viewed
$sql_usr = "SELECT u.rowid, u.lastname, u.firstname, u.statut as status, u.login, u.photo, u.gender, u.entity, u.admin"; $sql_usr = "SELECT u.rowid, u.lastname, u.firstname, u.statut as status, u.login, u.photo, u.gender, u.entity, u.admin";
@ -499,11 +510,7 @@ class FormOther
$out .= '<option value="'.$obj_usr->rowid.'"'; $out .= '<option value="'.$obj_usr->rowid.'"';
if ($obj_usr->rowid == $selected) $out .= ' selected'; if ($obj_usr->rowid == $selected) $out .= ' selected';
$out .= ' data-html="'; $out .= ' data-html="';
$outhtml = ''; $outhtml = $userstatic->getNomUrl(-3, '', 0, 1, 24, 1, 'login', '', 1).' ';
if (!empty($obj_usr->photo))
{
$outhtml .= $userstatic->getNomUrl(-3, '', 0, 1, 24, 1, 'login', '', 1).' ';
}
if ($showstatus >= 0 && $obj_usr->status == 0) $outhtml .= '<strike class="opacitymediumxxx">'; if ($showstatus >= 0 && $obj_usr->status == 0) $outhtml .= '<strike class="opacitymediumxxx">';
$outhtml .= $labeltoshow; $outhtml .= $labeltoshow;
if ($showstatus >= 0 && $obj_usr->status == 0) $outhtml .= '</strike>'; if ($showstatus >= 0 && $obj_usr->status == 0) $outhtml .= '</strike>';

View File

@ -111,6 +111,11 @@ class Menubase
*/ */
public $title; public $title;
/**
* @var string Prefix
*/
public $prefix;
/** /**
* @var string Lang file to load for translation * @var string Lang file to load for translation
*/ */
@ -248,6 +253,7 @@ class Menubase
$sql .= "url,"; $sql .= "url,";
$sql .= "target,"; $sql .= "target,";
$sql .= "titre,"; $sql .= "titre,";
$sql .= "prefix,";
$sql .= "langs,"; $sql .= "langs,";
$sql .= "perms,"; $sql .= "perms,";
$sql .= "enabled,"; $sql .= "enabled,";
@ -266,6 +272,7 @@ class Menubase
$sql .= " '".$this->db->escape($this->url)."',"; $sql .= " '".$this->db->escape($this->url)."',";
$sql .= " '".$this->db->escape($this->target)."',"; $sql .= " '".$this->db->escape($this->target)."',";
$sql .= " '".$this->db->escape($this->title)."',"; $sql .= " '".$this->db->escape($this->title)."',";
$sql .= " '".$this->db->escape($this->prefix)."',";
$sql .= " '".$this->db->escape($this->langs)."',"; $sql .= " '".$this->db->escape($this->langs)."',";
$sql .= " '".$this->db->escape($this->perms)."',"; $sql .= " '".$this->db->escape($this->perms)."',";
$sql .= " '".$this->db->escape($this->enabled)."',"; $sql .= " '".$this->db->escape($this->enabled)."',";
@ -319,6 +326,7 @@ class Menubase
$this->url = trim($this->url); $this->url = trim($this->url);
$this->target = trim($this->target); $this->target = trim($this->target);
$this->title = trim($this->title); $this->title = trim($this->title);
$this->prefix = trim($this->prefix);
$this->langs = trim($this->langs); $this->langs = trim($this->langs);
$this->perms = trim($this->perms); $this->perms = trim($this->perms);
$this->enabled = trim($this->enabled); $this->enabled = trim($this->enabled);
@ -341,6 +349,7 @@ class Menubase
$sql .= " url='".$this->db->escape($this->url)."',"; $sql .= " url='".$this->db->escape($this->url)."',";
$sql .= " target='".$this->db->escape($this->target)."',"; $sql .= " target='".$this->db->escape($this->target)."',";
$sql .= " titre='".$this->db->escape($this->title)."',"; $sql .= " titre='".$this->db->escape($this->title)."',";
$sql .= " prefix='".$this->db->escape($this->prefix)."',";
$sql .= " langs='".$this->db->escape($this->langs)."',"; $sql .= " langs='".$this->db->escape($this->langs)."',";
$sql .= " perms='".$this->db->escape($this->perms)."',"; $sql .= " perms='".$this->db->escape($this->perms)."',";
$sql .= " enabled='".$this->db->escape($this->enabled)."',"; $sql .= " enabled='".$this->db->escape($this->enabled)."',";
@ -385,6 +394,7 @@ class Menubase
$sql .= " t.url,"; $sql .= " t.url,";
$sql .= " t.target,"; $sql .= " t.target,";
$sql .= " t.titre as title,"; $sql .= " t.titre as title,";
$sql .= " t.prefix,";
$sql .= " t.langs,"; $sql .= " t.langs,";
$sql .= " t.perms,"; $sql .= " t.perms,";
$sql .= " t.enabled,"; $sql .= " t.enabled,";
@ -416,6 +426,7 @@ class Menubase
$this->url = $obj->url; $this->url = $obj->url;
$this->target = $obj->target; $this->target = $obj->target;
$this->title = $obj->title; $this->title = $obj->title;
$this->prefix = $obj->prefix;
$this->langs = $obj->langs; $this->langs = $obj->langs;
$this->perms = $obj->perms; $this->perms = $obj->perms;
$this->enabled = str_replace("\"", "'", $obj->enabled); $this->enabled = str_replace("\"", "'", $obj->enabled);
@ -505,8 +516,7 @@ class Menubase
$leftmenu = $myleftmenu; // To export to dol_eval function $leftmenu = $myleftmenu; // To export to dol_eval function
$newTabMenu = array(); $newTabMenu = array();
foreach ($tabMenu as $val) foreach ($tabMenu as $val) {
{
if ($val['type'] == 'top') $newTabMenu[] = $val; if ($val['type'] == 'top') $newTabMenu[] = $val;
} }
@ -554,15 +564,13 @@ class Menubase
// Now complete $this->newmenu->list when fk_menu value is -1 (left menu added by modules with no top menu) // Now complete $this->newmenu->list when fk_menu value is -1 (left menu added by modules with no top menu)
foreach ($tabMenu as $key => $val) foreach ($tabMenu as $key => $val)
{ {
//var_dump($tabMenu);
if ($val['fk_menu'] == -1 && $val['fk_mainmenu'] == $mainmenu) // We found a menu entry not linked to parent with good mainmenu if ($val['fk_menu'] == -1 && $val['fk_mainmenu'] == $mainmenu) // We found a menu entry not linked to parent with good mainmenu
{ {
//print 'Try to add menu (current is mainmenu='.$mainmenu.' leftmenu='.$leftmenu.') for '.join(',',$val).' fk_mainmenu='.$val['fk_mainmenu'].' fk_leftmenu='.$val['fk_leftmenu'].'<br>'; //print 'Try to add menu (current is mainmenu='.$mainmenu.' leftmenu='.$leftmenu.') for '.join(',',$val).' fk_mainmenu='.$val['fk_mainmenu'].' fk_leftmenu='.$val['fk_leftmenu'].'<br>';
//var_dump($this->newmenu->liste);exit; //var_dump($this->newmenu->liste);exit;
if (empty($val['fk_leftmenu'])) if (empty($val['fk_leftmenu'])) {
{ $this->newmenu->add($val['url'], $val['titre'], 0, $val['perms'], $val['target'], $val['mainmenu'], $val['leftmenu'], $val['position'], '', '', '', $val['prefix']);
$this->newmenu->add($val['url'], $val['titre'], 0, $val['perms'], $val['target'], $val['mainmenu'], $val['leftmenu'], $val['position']);
//var_dump($this->newmenu->liste); //var_dump($this->newmenu->liste);
} else { } else {
// Search first menu with this couple (mainmenu,leftmenu)=(fk_mainmenu,fk_leftmenu) // Search first menu with this couple (mainmenu,leftmenu)=(fk_mainmenu,fk_leftmenu)
@ -579,8 +587,7 @@ class Menubase
break; break;
} }
} }
if ($valparent['mainmenu'] == $val['fk_mainmenu'] && $valparent['leftmenu'] == $val['fk_leftmenu']) if ($valparent['mainmenu'] == $val['fk_mainmenu'] && $valparent['leftmenu'] == $val['fk_leftmenu']) {
{
//print "We found parent: keyparent='.$keyparent.' - level=".$valparent['level'].' - '.join(',',$valparent).'<br>'; //print "We found parent: keyparent='.$keyparent.' - level=".$valparent['level'].' - '.join(',',$valparent).'<br>';
// Now we look to find last subelement of this parent (we add at end) // Now we look to find last subelement of this parent (we add at end)
$searchlastsub = ($valparent['level'] + 1); $searchlastsub = ($valparent['level'] + 1);
@ -589,8 +596,9 @@ class Menubase
} }
} }
//print 'We must insert menu entry between entry '.$lastid.' and '.$nextid.'<br>'; //print 'We must insert menu entry between entry '.$lastid.' and '.$nextid.'<br>';
if ($found) $this->newmenu->insert($lastid, $val['url'], $val['titre'], $searchlastsub, $val['perms'], $val['target'], $val['mainmenu'], $val['leftmenu'], $val['position']); if ($found) {
else { $this->newmenu->insert($lastid, $val['url'], $val['titre'], $searchlastsub, $val['perms'], $val['target'], $val['mainmenu'], $val['leftmenu'], $val['position'], '', '', '', $val['prefix']);
} else {
dol_syslog("Error. Modules ".$val['module']." has defined a menu entry with a parent='fk_mainmenu=".$val['fk_leftmenu'].",fk_leftmenu=".$val['fk_leftmenu']."' and position=".$val['position'].'. The parent was not found. May be you forget it into your definition of menu, or may be the parent has a "position" that is after the child (fix field "position" of parent or child in this case).', LOG_WARNING); dol_syslog("Error. Modules ".$val['module']." has defined a menu entry with a parent='fk_mainmenu=".$val['fk_leftmenu'].",fk_leftmenu=".$val['fk_leftmenu']."' and position=".$val['position'].'. The parent was not found. May be you forget it into your definition of menu, or may be the parent has a "position" that is after the child (fix field "position" of parent or child in this case).', LOG_WARNING);
//print "Parent menu not found !!<br>"; //print "Parent menu not found !!<br>";
} }
@ -620,7 +628,7 @@ class Menubase
$mainmenu = $mymainmenu; // To export to dol_eval function $mainmenu = $mymainmenu; // To export to dol_eval function
$leftmenu = $myleftmenu; // To export to dol_eval function $leftmenu = $myleftmenu; // To export to dol_eval function
$sql = "SELECT m.rowid, m.type, m.module, m.fk_menu, m.fk_mainmenu, m.fk_leftmenu, m.url, m.titre, m.langs, m.perms, m.enabled, m.target, m.mainmenu, m.leftmenu, m.position"; $sql = "SELECT m.rowid, m.type, m.module, m.fk_menu, m.fk_mainmenu, m.fk_leftmenu, m.url, m.titre, m.prefix, m.langs, m.perms, m.enabled, m.target, m.mainmenu, m.leftmenu, m.position";
$sql .= " FROM ".MAIN_DB_PREFIX."menu as m"; $sql .= " FROM ".MAIN_DB_PREFIX."menu as m";
$sql .= " WHERE m.entity IN (0,".$conf->entity.")"; $sql .= " WHERE m.entity IN (0,".$conf->entity.")";
$sql .= " AND m.menu_handler IN ('".$this->db->escape($menu_handler)."','all')"; $sql .= " AND m.menu_handler IN ('".$this->db->escape($menu_handler)."','all')";
@ -700,12 +708,15 @@ class Menubase
$tabMenu[$b]['module'] = $menu['module']; $tabMenu[$b]['module'] = $menu['module'];
$tabMenu[$b]['fk_menu'] = $menu['fk_menu']; $tabMenu[$b]['fk_menu'] = $menu['fk_menu'];
$tabMenu[$b]['url'] = $menu['url']; $tabMenu[$b]['url'] = $menu['url'];
if (!preg_match("/^(http:\/\/|https:\/\/)/i", $tabMenu[$b]['url'])) if (!preg_match("/^(http:\/\/|https:\/\/)/i", $tabMenu[$b]['url'])) {
{ if (preg_match('/\?/', $tabMenu[$b]['url'])) {
if (preg_match('/\?/', $tabMenu[$b]['url'])) $tabMenu[$b]['url'] .= '&amp;idmenu='.$menu['rowid']; $tabMenu[$b]['url'] .= '&amp;idmenu='.$menu['rowid'];
else $tabMenu[$b]['url'] .= '?idmenu='.$menu['rowid']; } else {
$tabMenu[$b]['url'] .= '?idmenu='.$menu['rowid'];
}
} }
$tabMenu[$b]['titre'] = $title; $tabMenu[$b]['titre'] = $title;
$tabMenu[$b]['prefix'] = $menu['prefix'];
$tabMenu[$b]['target'] = $menu['target']; $tabMenu[$b]['target'] = $menu['target'];
$tabMenu[$b]['mainmenu'] = $menu['mainmenu']; $tabMenu[$b]['mainmenu'] = $menu['mainmenu'];
$tabMenu[$b]['leftmenu'] = $menu['leftmenu']; $tabMenu[$b]['leftmenu'] = $menu['leftmenu'];
@ -750,9 +761,8 @@ class Menubase
for ($x = 0; $x < $num; $x++) for ($x = 0; $x < $num; $x++)
{ {
//si un element a pour pere : $pere //si un element a pour pere : $pere
if ((($tab[$x]['fk_menu'] >= 0 && $tab[$x]['fk_menu'] == $pere)) && $tab[$x]['enabled']) if ((($tab[$x]['fk_menu'] >= 0 && $tab[$x]['fk_menu'] == $pere)) && $tab[$x]['enabled']) {
{ $this->newmenu->add($tab[$x]['url'], $tab[$x]['titre'], ($level - 1), $tab[$x]['perms'], $tab[$x]['target'], $tab[$x]['mainmenu'], $tab[$x]['leftmenu'], 0, '', '', '', $tab[$x]['prefix']);
$this->newmenu->add($tab[$x]['url'], $tab[$x]['titre'], ($level - 1), $tab[$x]['perms'], $tab[$x]['target'], $tab[$x]['mainmenu'], $tab[$x]['leftmenu']);
$this->recur($tab, $tab[$x]['rowid'], ($level + 1)); $this->recur($tab, $tab[$x]['rowid'], ($level + 1));
} }
} }

View File

@ -76,15 +76,15 @@ if (empty($conf->dol_no_mouse_hover)) {
} }
print ' print '
jQuery(".classfortooltiponclicktext").dialog( jQuery(".classfortooltiponclicktext").dialog({
{ closeOnEscape: true, classes: { "ui-dialog": "highlight" }, closeOnEscape: true, classes: { "ui-dialog": "highlight" },
maxHeight: window.innerHeight-60, width: '.($conf->browser->layout == 'phone' ? max($_SESSION['dol_screenwidth'] - 20, 320) : 700).', maxHeight: window.innerHeight-60, width: '.($conf->browser->layout == 'phone' ? max($_SESSION['dol_screenwidth'] - 20, 320) : 700).',
modal: true, modal: true,
autoOpen: false }).css("z-index: 5000"); autoOpen: false
}).css("z-index: 5000");
jQuery(".classfortooltiponclick").click(function () { jQuery(".classfortooltiponclick").click(function () {
console.log("We click on tooltip for element with dolid="+$(this).attr(\'dolid\')); console.log("We click on tooltip for element with dolid="+$(this).attr(\'dolid\'));
if ($(this).attr(\'dolid\')) if ($(this).attr(\'dolid\')) {
{
obj=$("#idfortooltiponclick_"+$(this).attr(\'dolid\')); /* obj is a div component */ obj=$("#idfortooltiponclick_"+$(this).attr(\'dolid\')); /* obj is a div component */
obj.dialog("open"); obj.dialog("open");
return false; return false;

View File

@ -1206,27 +1206,23 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon = '', $noprin
global $form; global $form;
global $param, $massactionbutton; global $param, $massactionbutton;
$start_year = GETPOST('dateevent_startyear'); $start_year = GETPOST('dateevent_startyear', 'int');
$start_month = GETPOST('dateevent_startmonth'); $start_month = GETPOST('dateevent_startmonth', 'int');
$start_day = GETPOST('dateevent_startday'); $start_day = GETPOST('dateevent_startday', 'int');
$end_year = GETPOST('dateevent_endyear'); $end_year = GETPOST('dateevent_endyear', 'int');
$end_month = GETPOST('dateevent_endmonth'); $end_month = GETPOST('dateevent_endmonth', 'int');
$end_day = GETPOST('dateevent_endday'); $end_day = GETPOST('dateevent_endday', 'int');
$tms_start = ''; $tms_start = '';
$tms_end = ''; $tms_end = '';
if (!empty($start_year) && !empty($start_month) && !empty($start_day)) { if (!empty($start_year) && !empty($start_month) && !empty($start_day)) {
$search_start = $start_year.'-'.$start_month.'-'.$start_day; $tms_start = dol_mktime(0, 0, 0, $start_month, $start_day, $start_year, 'tzuserrel');
$tms_start = strtotime($search_start);
} }
if (!empty($end_year) && !empty($end_month) && !empty($end_day)) { if (!empty($end_year) && !empty($end_month) && !empty($end_day)) {
$search_end = $end_year.'-'.$end_month.'-'.$end_day.' 23:59:59'; $tms_end = dol_mktime(23, 59, 59, $end_month, $end_day, $end_year, 'tzuserrel');
$tms_end = strtotime($search_end);
} }
if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha')) { // All test are required to be compatible with all browsers if (GETPOST('button_removefilter_x', 'alpha') || GETPOST('button_removefilter.x', 'alpha') || GETPOST('button_removefilter', 'alpha')) { // All test are required to be compatible with all browsers
$search_start = '';
$tms_start = ''; $tms_start = '';
$search_end = '';
$tms_end = ''; $tms_end = '';
} }
dol_include_once('/comm/action/class/actioncomm.class.php'); dol_include_once('/comm/action/class/actioncomm.class.php');
@ -1328,14 +1324,14 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon = '', $noprin
} }
} }
if (!empty($search_start) && !empty($search_end)) { if (!empty($tms_start) && !empty($tms_end)) {
$sql .= " AND ((a.datep BETWEEN '$search_start' AND '$search_end') OR (a.datep2 BETWEEN '$search_start' AND '$search_end'))"; $sql .= " AND ((a.datep BETWEEN '".$db->idate($tms_start)."' AND '".$db->idate($tms_end)."') OR (a.datep2 BETWEEN '".$db->idate($tms_start)."' AND '".$db->idate($tms_end)."'))";
} }
elseif (empty($search_start) && !empty($search_end)) { elseif (empty($tms_start) && !empty($tms_end)) {
$sql .= " AND ((a.datep <= '$search_end') OR (a.datep2 <= '$search_end'))"; $sql .= " AND ((a.datep <= '".$db->idate($tms_end)."') OR (a.datep2 <= '".$db->idate($tms_end)."'))";
} }
elseif (!empty($search_start) && empty($search_end)) { elseif (!empty($tms_start) && empty($tms_end)) {
$sql .= " AND ((a.datep >= '$search_start') OR (a.datep2 >= '$search_start'))"; $sql .= " AND ((a.datep >= '".$db->idate($tms_start)."') OR (a.datep2 >= '".$db->idate($tms_start)."'))";
} }
if (is_array($actioncode) && !empty($actioncode)) { if (is_array($actioncode) && !empty($actioncode)) {
@ -1491,7 +1487,9 @@ function show_actions_done($conf, $langs, $db, $filterobj, $objcon = '', $noprin
$out .= $formactions->select_type_actions($actioncode, "actioncode", '', empty($conf->global->AGENDA_USE_EVENT_TYPE) ? 1 : -1, 0, (empty($conf->global->AGENDA_USE_MULTISELECT_TYPE) ? 0 : 1), 1); $out .= $formactions->select_type_actions($actioncode, "actioncode", '', empty($conf->global->AGENDA_USE_EVENT_TYPE) ? 1 : -1, 0, (empty($conf->global->AGENDA_USE_MULTISELECT_TYPE) ? 0 : 1), 1);
$out .= '</td>'; $out .= '</td>';
$out .= '<td class="liste_titre maxwidth100onsmartphone"><input type="text" class="maxwidth100onsmartphone" name="search_agenda_label" value="'.$filters['search_agenda_label'].'"></td>'; $out .= '<td class="liste_titre maxwidth100onsmartphone"><input type="text" class="maxwidth100onsmartphone" name="search_agenda_label" value="'.$filters['search_agenda_label'].'"></td>';
$out .= '<td class="liste_titre center">'.$form->selectDateToDate($tms_start, $tms_end, 'dateevent', 1).'</td>'; $out .= '<td class="liste_titre center">';
$out .= $form->selectDateToDate($tms_start, $tms_end, 'dateevent', 1);
$out .= '</td>';
$out .= '<td class="liste_titre"></td>'; $out .= '<td class="liste_titre"></td>';
$out .= '<td class="liste_titre"></td>'; $out .= '<td class="liste_titre"></td>';
$out .= '<td class="liste_titre"></td>'; $out .= '<td class="liste_titre"></td>';

View File

@ -3268,7 +3268,7 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
'filter', 'file-code', 'file-export', 'file-import', 'file-upload', 'folder', 'folder-open', 'globe', 'globe-americas', 'grip', 'grip_title', 'group', 'filter', 'file-code', 'file-export', 'file-import', 'file-upload', 'folder', 'folder-open', 'globe', 'globe-americas', 'grip', 'grip_title', 'group',
'help', 'holiday', 'help', 'holiday',
'intervention', 'label', 'language', 'link', 'list', 'listlight', 'loan', 'lot', 'intervention', 'label', 'language', 'link', 'list', 'listlight', 'loan', 'lot',
'map-marker-alt', 'member', 'money-bill-alt', 'mrp', 'note', 'next', 'margin', 'map-marker-alt', 'member', 'money-bill-alt', 'mrp', 'note', 'next',
'object_accounting', 'object_account', 'object_accountline', 'object_action', 'object_barcode', 'object_bill', 'object_billa', 'object_billd', 'object_bom', 'object_accounting', 'object_account', 'object_accountline', 'object_action', 'object_barcode', 'object_bill', 'object_billa', 'object_billd', 'object_bom',
'object_category', 'object_conversation', 'object_bookmark', 'object_bug', 'object_clock', 'object_dolly', 'object_dollyrevert', 'object_generic', 'object_folder', 'object_category', 'object_conversation', 'object_bookmark', 'object_bug', 'object_clock', 'object_dolly', 'object_dollyrevert', 'object_generic', 'object_folder',
'object_list-alt', 'object_calendar', 'object_calendarweek', 'object_calendarmonth', 'object_calendarday', 'object_calendarperuser', 'object_list-alt', 'object_calendar', 'object_calendarweek', 'object_calendarmonth', 'object_calendarday', 'object_calendarperuser',
@ -3364,11 +3364,11 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = false, $
} else { } else {
$fakey = 'fa-'.$pictowithouttext; $fakey = 'fa-'.$pictowithouttext;
} }
if ($pictowithouttext == 'payment') { if (in_array($pictowithouttext, array('contract'))) {
$fasize = '0.9em'; $fasize = '0.92em';
} }
if ($pictowithouttext == 'loan') { if (in_array($pictowithouttext, array('intervention', 'payment', 'loan'))) {
$fasize = '0.95em'; $fasize = '0.80em';
} }
// Define $marginleftonlyshort // Define $marginleftonlyshort
@ -4108,21 +4108,21 @@ function dol_print_error($db = '', $error = '', $errors = null)
$out .= "<b>".$langs->trans("Date").":</b> ".dol_print_date(time(), 'dayhourlog')."<br>\n"; $out .= "<b>".$langs->trans("Date").":</b> ".dol_print_date(time(), 'dayhourlog')."<br>\n";
$out .= "<b>".$langs->trans("Dolibarr").":</b> ".DOL_VERSION." - https://www.dolibarr.org<br>\n"; $out .= "<b>".$langs->trans("Dolibarr").":</b> ".DOL_VERSION." - https://www.dolibarr.org<br>\n";
if (isset($conf->global->MAIN_FEATURES_LEVEL)) $out .= "<b>".$langs->trans("LevelOfFeature").":</b> ".$conf->global->MAIN_FEATURES_LEVEL."<br>\n"; if (isset($conf->global->MAIN_FEATURES_LEVEL)) $out .= "<b>".$langs->trans("LevelOfFeature").":</b> ".dol_htmlentities($conf->global->MAIN_FEATURES_LEVEL, ENT_COMPAT)."<br>\n";
if (function_exists("phpversion")) if (function_exists("phpversion"))
{ {
$out .= "<b>".$langs->trans("PHP").":</b> ".phpversion()."<br>\n"; $out .= "<b>".$langs->trans("PHP").":</b> ".phpversion()."<br>\n";
} }
$out .= "<b>".$langs->trans("Server").":</b> ".dol_htmlentities($_SERVER["SERVER_SOFTWARE"])."<br>\n"; $out .= "<b>".$langs->trans("Server").":</b> ".(isset($_SERVER["SERVER_SOFTWARE"]) ? dol_htmlentities($_SERVER["SERVER_SOFTWARE"], ENT_COMPAT) : '')."<br>\n";
if (function_exists("php_uname")) if (function_exists("php_uname"))
{ {
$out .= "<b>".$langs->trans("OS").":</b> ".php_uname()."<br>\n"; $out .= "<b>".$langs->trans("OS").":</b> ".php_uname()."<br>\n";
} }
$out .= "<b>".$langs->trans("UserAgent").":</b> ".dol_htmlentities($_SERVER["HTTP_USER_AGENT"], ENT_COMPAT, 'UTF-8')."<br>\n"; $out .= "<b>".$langs->trans("UserAgent").":</b> ".(isset($_SERVER["HTTP_USER_AGENT"]) ? dol_htmlentities($_SERVER["HTTP_USER_AGENT"], ENT_COMPAT) : '')."<br>\n";
$out .= "<br>\n"; $out .= "<br>\n";
$out .= "<b>".$langs->trans("RequestedUrl").":</b> ".dol_htmlentities($_SERVER["REQUEST_URI"], ENT_COMPAT, 'UTF-8')."<br>\n"; $out .= "<b>".$langs->trans("RequestedUrl").":</b> ".dol_htmlentities($_SERVER["REQUEST_URI"], ENT_COMPAT)."<br>\n";
$out .= "<b>".$langs->trans("Referer").":</b> ".(isset($_SERVER["HTTP_REFERER"]) ? dol_htmlentities($_SERVER["HTTP_REFERER"], ENT_COMPAT, 'UTF-8') : '')."<br>\n"; $out .= "<b>".$langs->trans("Referer").":</b> ".(isset($_SERVER["HTTP_REFERER"]) ? dol_htmlentities($_SERVER["HTTP_REFERER"], ENT_COMPAT) : '')."<br>\n";
$out .= "<b>".$langs->trans("MenuManager").":</b> ".(isset($conf->standard_menu) ? dol_htmlentities($conf->standard_menu) : '')."<br>\n"; $out .= "<b>".$langs->trans("MenuManager").":</b> ".(isset($conf->standard_menu) ? dol_htmlentities($conf->standard_menu, ENT_COMPAT) : '')."<br>\n";
$out .= "<br>\n"; $out .= "<br>\n";
$syslog .= "url=".dol_escape_htmltag($_SERVER["REQUEST_URI"]); $syslog .= "url=".dol_escape_htmltag($_SERVER["REQUEST_URI"]);
$syslog .= ", query_string=".dol_escape_htmltag($_SERVER["QUERY_STRING"]); $syslog .= ", query_string=".dol_escape_htmltag($_SERVER["QUERY_STRING"]);

View File

@ -43,7 +43,11 @@ function import_prepare_head($param, $maxstep = 0)
$i = 1; $i = 1;
while ($i <= $maxstep) while ($i <= $maxstep)
{ {
if ($i < 6) {
$head[$h][0] = DOL_URL_ROOT.'/imports/import.php?step='.$i.$param; $head[$h][0] = DOL_URL_ROOT.'/imports/import.php?step='.$i.$param;
} else {
$head[$h][0] = DOL_URL_ROOT.'/imports/import.php?step=5'.$param; // For step6, link is to step 5
}
$head[$h][1] = $langs->trans("Step")." ".$i; $head[$h][1] = $langs->trans("Step")." ".$i;
$head[$h][2] = 'step'.$i; $head[$h][2] = 'step'.$i;
$h++; $h++;

View File

@ -219,15 +219,14 @@ if (!function_exists('dol_loginfunction'))
$width = 0; $width = 0;
$urllogo = DOL_URL_ROOT.'/theme/common/login_logo.png'; $urllogo = DOL_URL_ROOT.'/theme/common/login_logo.png';
if (!empty($mysoc->logo_small) && is_readable($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_small)) if (!empty($mysoc->logo_small) && is_readable($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_small)) {
{
$urllogo = DOL_URL_ROOT.'/viewimage.php?cache=1&amp;modulepart=mycompany&amp;file='.urlencode('logos/thumbs/'.$mysoc->logo_small); $urllogo = DOL_URL_ROOT.'/viewimage.php?cache=1&amp;modulepart=mycompany&amp;file='.urlencode('logos/thumbs/'.$mysoc->logo_small);
} elseif (!empty($mysoc->logo) && is_readable($conf->mycompany->dir_output.'/logos/'.$mysoc->logo)) } elseif (!empty($mysoc->logo) && is_readable($conf->mycompany->dir_output.'/logos/'.$mysoc->logo)) {
{
$urllogo = DOL_URL_ROOT.'/viewimage.php?cache=1&amp;modulepart=mycompany&amp;file='.urlencode('logos/'.$mysoc->logo); $urllogo = DOL_URL_ROOT.'/viewimage.php?cache=1&amp;modulepart=mycompany&amp;file='.urlencode('logos/'.$mysoc->logo);
$width = 128; $width = 128;
} elseif (is_readable(DOL_DOCUMENT_ROOT.'/theme/dolibarr_logo.svg')) } elseif (!empty($mysoc->logo_squarred_small) && is_readable($conf->mycompany->dir_output.'/logos/thumbs/'.$mysoc->logo_squarred_small)) {
{ $urllogo = DOL_URL_ROOT.'/viewimage.php?cache=1&amp;modulepart=mycompany&amp;file='.urlencode('logos/thumbs/'.$mysoc->logo_squarred_small);
} elseif (is_readable(DOL_DOCUMENT_ROOT.'/theme/dolibarr_logo.svg')) {
$urllogo = DOL_URL_ROOT.'/theme/dolibarr_logo.svg'; $urllogo = DOL_URL_ROOT.'/theme/dolibarr_logo.svg';
} }

View File

@ -1808,11 +1808,11 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM
if ($mainmenu == 'tools') { if ($mainmenu == 'tools') {
if (empty($user->socid)) { // limit to internal users if (empty($user->socid)) { // limit to internal users
$langs->load("mails"); $langs->load("mails");
$newmenu->add("/admin/mails_templates.php?leftmenu=email_templates", $langs->trans("EMailTemplates"), 0, 1, '', $mainmenu, 'email_templates'); $newmenu->add("/admin/mails_templates.php?leftmenu=email_templates", $langs->trans("EMailTemplates"), 0, 1, '', $mainmenu, 'email_templates', 0, '', '', '', img_picto('', 'email', 'class="paddingright pictofixedwidth"'));
} }
if (!empty($conf->mailing->enabled)) { if (!empty($conf->mailing->enabled)) {
$newmenu->add("/comm/mailing/index.php?leftmenu=mailing", $langs->trans("EMailings"), 0, $user->rights->mailing->lire, '', $mainmenu, 'mailing'); $newmenu->add("/comm/mailing/index.php?leftmenu=mailing", $langs->trans("EMailings"), 0, $user->rights->mailing->lire, '', $mainmenu, 'mailing', 0, '', '', '', img_picto('', 'email', 'class="paddingright pictofixedwidth"'));
$newmenu->add("/comm/mailing/card.php?leftmenu=mailing&amp;action=create", $langs->trans("NewMailing"), 1, $user->rights->mailing->creer); $newmenu->add("/comm/mailing/card.php?leftmenu=mailing&amp;action=create", $langs->trans("NewMailing"), 1, $user->rights->mailing->creer);
$newmenu->add("/comm/mailing/list.php?leftmenu=mailing", $langs->trans("List"), 1, $user->rights->mailing->lire); $newmenu->add("/comm/mailing/list.php?leftmenu=mailing", $langs->trans("List"), 1, $user->rights->mailing->lire);
} }
@ -1839,7 +1839,7 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM
// Load translation files required by the page // Load translation files required by the page
$langs->loadLangs(array("members", "compta")); $langs->loadLangs(array("members", "compta"));
$newmenu->add("/adherents/index.php?leftmenu=members&amp;mainmenu=members", $langs->trans("Members"), 0, $user->rights->adherent->lire, '', $mainmenu, 'members'); $newmenu->add("/adherents/index.php?leftmenu=members&amp;mainmenu=members", $langs->trans("Members"), 0, $user->rights->adherent->lire, '', $mainmenu, 'members', 0, '', '', '', img_picto('', 'member', 'class="paddingright pictofixedwidth"'));
$newmenu->add("/adherents/card.php?leftmenu=members&amp;action=create", $langs->trans("NewMember"), 1, $user->rights->adherent->creer); $newmenu->add("/adherents/card.php?leftmenu=members&amp;action=create", $langs->trans("NewMember"), 1, $user->rights->adherent->creer);
$newmenu->add("/adherents/list.php?leftmenu=members", $langs->trans("List"), 1, $user->rights->adherent->lire); $newmenu->add("/adherents/list.php?leftmenu=members", $langs->trans("List"), 1, $user->rights->adherent->lire);
$newmenu->add("/adherents/list.php?leftmenu=members&amp;statut=-1", $langs->trans("MenuMembersToValidate"), 2, $user->rights->adherent->lire); $newmenu->add("/adherents/list.php?leftmenu=members&amp;statut=-1", $langs->trans("MenuMembersToValidate"), 2, $user->rights->adherent->lire);
@ -1889,7 +1889,6 @@ function print_left_eldy_menu($db, $menu_array_before, $menu_array_after, &$tabM
//print $paramkey; //print $paramkey;
if (!empty($conf->global->$paramkey)) { if (!empty($conf->global->$paramkey)) {
$link = "/ftp/index.php?idmenu=".$_SESSION["idmenu"]."&numero_ftp=".$i; $link = "/ftp/index.php?idmenu=".$_SESSION["idmenu"]."&numero_ftp=".$i;
$newmenu->add($link, dol_trunc($conf->global->$paramkey, 24)); $newmenu->add($link, dol_trunc($conf->global->$paramkey, 24));
} }
$i++; $i++;

View File

@ -316,7 +316,7 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
/** /**
* @var array Minimum version of PHP required by module. * @var array Minimum version of PHP required by module.
* e.g.: PHP ≥ 5.4 = array(5, 4) * e.g.: PHP ≥ 5.6 = array(5, 6)
*/ */
public $phpmin; public $phpmin;
@ -353,14 +353,12 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
// phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore // phpcs:disable PEAR.NamingConventions.ValidFunctionName.PublicUnderscore
/** /**
* Enables a module. * Enables a module.
* Inserts all informations into database * Inserts all informations into database.
* *
* @param array $array_sql SQL requests to be executed when enabling module * @param array $array_sql SQL requests to be executed when enabling module
* @param string $options String with options when disabling module: * @param string $options String with options when disabling module:
* - 'noboxes' = Do not insert boxes - * - 'noboxes' = Do not insert boxes
* 'newboxdefonly' = For boxes, insert def of * - 'newboxdefonly' = For boxes, insert def of boxes only and not boxes activation
* boxes only and not boxes activation
*
* @return int 1 if OK, 0 if KO * @return int 1 if OK, 0 if KO
*/ */
protected function _init($array_sql, $options = '') protected function _init($array_sql, $options = '')
@ -1869,8 +1867,9 @@ class DolibarrModules // Can not be abstract, because we need to instantiate it
$menu->mainmenu = isset($this->menu[$key]['mainmenu']) ? $this->menu[$key]['mainmenu'] : (isset($menu->fk_mainmenu) ? $menu->fk_mainmenu : ''); $menu->mainmenu = isset($this->menu[$key]['mainmenu']) ? $this->menu[$key]['mainmenu'] : (isset($menu->fk_mainmenu) ? $menu->fk_mainmenu : '');
$menu->leftmenu = isset($this->menu[$key]['leftmenu']) ? $this->menu[$key]['leftmenu'] : ''; $menu->leftmenu = isset($this->menu[$key]['leftmenu']) ? $this->menu[$key]['leftmenu'] : '';
$menu->title = $this->menu[$key]['titre']; $menu->title = $this->menu[$key]['titre'];
$menu->prefix = isset($this->menu[$key]['prefix']) ? $this->menu[$key]['prefix'] : '';
$menu->url = $this->menu[$key]['url']; $menu->url = $this->menu[$key]['url'];
$menu->langs = $this->menu[$key]['langs']; $menu->langs = isset($this->menu[$key]['langs']) ? $this->menu[$key]['langs'] : '';
$menu->position = $this->menu[$key]['position']; $menu->position = $this->menu[$key]['position'];
$menu->perms = $this->menu[$key]['perms']; $menu->perms = $this->menu[$key]['perms'];
$menu->target = isset($this->menu[$key]['target']) ? $this->menu[$key]['target'] : ''; $menu->target = isset($this->menu[$key]['target']) ? $this->menu[$key]['target'] : '';

View File

@ -126,7 +126,7 @@ class pdf_eratosthene extends ModelePDFCommandes
public $emetteur; public $emetteur;
/** /**
* @var array of document table collumns * @var array of document table columns
*/ */
public $cols; public $cols;

View File

@ -55,6 +55,11 @@ class pdf_strato extends ModelePDFContract
*/ */
public $description; public $description;
/**
* @var int Save the name of generated file as the main doc when generating a doc with this template
*/
public $update_main_doc_field;
/** /**
* @var string document type * @var string document type
*/ */
@ -131,6 +136,7 @@ class pdf_strato extends ModelePDFContract
$this->db = $db; $this->db = $db;
$this->name = 'strato'; $this->name = 'strato';
$this->description = $langs->trans("StandardContractsTemplate"); $this->description = $langs->trans("StandardContractsTemplate");
$this->update_main_doc_field = 1; // Save the name of generated file as the main doc when generating a doc with this template
// Page size for A4 format // Page size for A4 format
$this->type = 'pdf'; $this->type = 'pdf';

View File

@ -3,7 +3,7 @@
* Copyright (C) 2005-2014 Regis Houssin <regis.houssin@inodbox.com> * Copyright (C) 2005-2014 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2007 Franky Van Liedekerke <franky.van.liedekerke@telenet.be> * Copyright (C) 2007 Franky Van Liedekerke <franky.van.liedekerke@telenet.be>
* Copyright (C) 2008 Chiptronik * Copyright (C) 2008 Chiptronik
* Copyright (C) 2011-2019 Philippe Grand <philippe.grand@atoo-net.com> * Copyright (C) 2011-2021 Philippe Grand <philippe.grand@atoo-net.com>
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com> * Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
* Copyright (C) 2020 John BOTELLA * Copyright (C) 2020 John BOTELLA
@ -54,6 +54,11 @@ class pdf_storm extends ModelePDFDeliveryOrder
*/ */
public $description; public $description;
/**
* @var int Save the name of generated file as the main doc when generating a doc with this template
*/
public $update_main_doc_field;
/** /**
* @var string document type * @var string document type
*/ */
@ -61,9 +66,9 @@ class pdf_storm extends ModelePDFDeliveryOrder
/** /**
* @var array Minimum version of PHP required by module. * @var array Minimum version of PHP required by module.
* e.g.: PHP ≥ 5.5 = array(5, 5) * e.g.: PHP ≥ 5.6 = array(5, 6)
*/ */
public $phpmin = array(5, 5); public $phpmin = array(5, 6);
/** /**
* Dolibarr version of the loaded document * Dolibarr version of the loaded document
@ -127,6 +132,7 @@ class pdf_storm extends ModelePDFDeliveryOrder
$this->db = $db; $this->db = $db;
$this->name = "Storm"; $this->name = "Storm";
$this->description = $langs->trans("DocumentModelStorm"); $this->description = $langs->trans("DocumentModelStorm");
$this->update_main_doc_field = 1; // Save the name of generated file as the main doc when generating a doc with this template
// Page size for A4 format // Page size for A4 format
$this->type = 'pdf'; $this->type = 'pdf';

View File

@ -3,7 +3,7 @@
* Copyright (C) 2005-2014 Regis Houssin <regis.houssin@inodbox.com> * Copyright (C) 2005-2014 Regis Houssin <regis.houssin@inodbox.com>
* Copyright (C) 2007 Franky Van Liedekerke <franky.van.liedekerke@telenet.be> * Copyright (C) 2007 Franky Van Liedekerke <franky.van.liedekerke@telenet.be>
* Copyright (C) 2008 Chiptronik * Copyright (C) 2008 Chiptronik
* Copyright (C) 2011-2020 Philippe Grand <philippe.grand@atoo-net.com> * Copyright (C) 2011-2021 Philippe Grand <philippe.grand@atoo-net.com>
* Copyright (C) 2015 Marcos García <marcosgdf@gmail.com> * Copyright (C) 2015 Marcos García <marcosgdf@gmail.com>
* This program is free software; you can redistribute it and/or modify * This program is free software; you can redistribute it and/or modify
@ -53,6 +53,11 @@ class pdf_typhon extends ModelePDFDeliveryOrder
*/ */
public $description; public $description;
/**
* @var int Save the name of generated file as the main doc when generating a doc with this template
*/
public $update_main_doc_field;
/** /**
* @var string document type * @var string document type
*/ */
@ -126,6 +131,7 @@ class pdf_typhon extends ModelePDFDeliveryOrder
$this->db = $db; $this->db = $db;
$this->name = "Typhon"; $this->name = "Typhon";
$this->description = $langs->trans("DocumentModelTyphon"); $this->description = $langs->trans("DocumentModelTyphon");
$this->update_main_doc_field = 1; // Save the name of generated file as the main doc when generating a doc with this template
// Page size for A4 format // Page size for A4 format
$this->type = 'pdf'; $this->type = 'pdf';

View File

@ -51,6 +51,11 @@ class pdf_espadon extends ModelePdfExpedition
*/ */
public $description; public $description;
/**
* @var int Save the name of generated file as the main doc when generating a doc with this template
*/
public $update_main_doc_field;
/** /**
* @var string document type * @var string document type
*/ */
@ -122,6 +127,7 @@ class pdf_espadon extends ModelePdfExpedition
$this->db = $db; $this->db = $db;
$this->name = "espadon"; $this->name = "espadon";
$this->description = $langs->trans("DocumentModelStandardPDF"); $this->description = $langs->trans("DocumentModelStandardPDF");
$this->update_main_doc_field = 1; // Save the name of generated file as the main doc when generating a doc with this template
$this->type = 'pdf'; $this->type = 'pdf';
$formatarray = pdf_getFormat(); $formatarray = pdf_getFormat();

View File

@ -52,6 +52,11 @@ class pdf_merou extends ModelePdfExpedition
*/ */
public $description; public $description;
/**
* @var int Save the name of generated file as the main doc when generating a doc with this template
*/
public $update_main_doc_field;
/** /**
* @var string document type * @var string document type
*/ */
@ -123,6 +128,7 @@ class pdf_merou extends ModelePdfExpedition
$this->db = $db; $this->db = $db;
$this->name = "merou"; $this->name = "merou";
$this->description = $langs->trans("DocumentModelMerou"); $this->description = $langs->trans("DocumentModelMerou");
$this->update_main_doc_field = 1; // Save the name of generated file as the main doc when generating a doc with this template
$this->type = 'pdf'; $this->type = 'pdf';
$formatarray = pdf_getFormat(); $formatarray = pdf_getFormat();

View File

@ -52,6 +52,11 @@ class pdf_rouget extends ModelePdfExpedition
*/ */
public $description; public $description;
/**
* @var int Save the name of generated file as the main doc when generating a doc with this template
*/
public $update_main_doc_field;
/** /**
* @var string document type * @var string document type
*/ */
@ -123,6 +128,7 @@ class pdf_rouget extends ModelePdfExpedition
$this->db = $db; $this->db = $db;
$this->name = "rouget"; $this->name = "rouget";
$this->description = $langs->trans("DocumentModelStandardPDF"); $this->description = $langs->trans("DocumentModelStandardPDF");
$this->update_main_doc_field = 1; // Save the name of generated file as the main doc when generating a doc with this template
$this->type = 'pdf'; $this->type = 'pdf';
$formatarray = pdf_getFormat(); $formatarray = pdf_getFormat();

View File

@ -59,6 +59,11 @@ class pdf_standard extends ModeleExpenseReport
*/ */
public $description; public $description;
/**
* @var int Save the name of generated file as the main doc when generating a doc with this template
*/
public $update_main_doc_field;
/** /**
* @var string document type * @var string document type
*/ */
@ -133,6 +138,7 @@ class pdf_standard extends ModeleExpenseReport
$this->db = $db; $this->db = $db;
$this->name = ""; $this->name = "";
$this->description = $langs->trans('PDFStandardExpenseReports'); $this->description = $langs->trans('PDFStandardExpenseReports');
$this->update_main_doc_field = 1; // Save the name of generated file as the main doc when generating a doc with this template
// Page size for A4 format // Page size for A4 format
$this->type = 'pdf'; $this->type = 'pdf';

View File

@ -128,7 +128,7 @@ class pdf_sponge extends ModelePDFFactures
/** /**
* @var array of document table collumns * @var array of document table columns
*/ */
public $cols; public $cols;

View File

@ -54,6 +54,11 @@ class pdf_soleil extends ModelePDFFicheinter
*/ */
public $description; public $description;
/**
* @var int Save the name of generated file as the main doc when generating a doc with this template
*/
public $update_main_doc_field;
/** /**
* @var string document type * @var string document type
*/ */
@ -124,6 +129,7 @@ class pdf_soleil extends ModelePDFFicheinter
$this->db = $db; $this->db = $db;
$this->name = 'soleil'; $this->name = 'soleil';
$this->description = $langs->trans("DocumentModelStandardPDF"); $this->description = $langs->trans("DocumentModelStandardPDF");
$this->update_main_doc_field = 1; // Save the name of generated file as the main doc when generating a doc with this template
// Page size for A4 format // Page size for A4 format
$this->type = 'pdf'; $this->type = 'pdf';

View File

@ -618,6 +618,7 @@ class ImportCsv extends ModeleImports
if (!empty($objimport->array_import_regex[0][$val]) && ($newval != '')) if (!empty($objimport->array_import_regex[0][$val]) && ($newval != ''))
{ {
// If test is "Must exist in a field@table or field@table:..." // If test is "Must exist in a field@table or field@table:..."
$reg = array();
if (preg_match('/^(.+)@([^:]+)(:.+)?$/', $objimport->array_import_regex[0][$val], $reg)) if (preg_match('/^(.+)@([^:]+)(:.+)?$/', $objimport->array_import_regex[0][$val], $reg))
{ {
$field = $reg[1]; $field = $reg[1];
@ -844,7 +845,7 @@ class ImportCsv extends ModeleImports
$sqlend .= ', '.$user->id; $sqlend .= ', '.$user->id;
} }
$sql = $sqlstart.$sqlend.')'; $sql = $sqlstart.$sqlend.')';
dol_syslog("import_csv.modules", LOG_DEBUG); //dol_syslog("import_csv.modules", LOG_DEBUG);
// Run insert request // Run insert request
if ($sql) if ($sql)

View File

@ -636,6 +636,7 @@ class ImportXlsx extends ModeleImports
// Test regexp // Test regexp
if (!empty($objimport->array_import_regex[0][$val]) && ($newval != '')) { if (!empty($objimport->array_import_regex[0][$val]) && ($newval != '')) {
// If test is "Must exist in a field@table or field@table:..." // If test is "Must exist in a field@table or field@table:..."
$reg = array();
if (preg_match('/^(.+)@([^:]+)(:.+)?$/', $objimport->array_import_regex[0][$val], $reg)) { if (preg_match('/^(.+)@([^:]+)(:.+)?$/', $objimport->array_import_regex[0][$val], $reg)) {
$field = $reg[1]; $field = $reg[1];
$table = $reg[2]; $table = $reg[2];
@ -845,7 +846,7 @@ class ImportXlsx extends ModeleImports
$sqlend .= ', ' . $user->id; $sqlend .= ', ' . $user->id;
} }
$sql = $sqlstart . $sqlend . ')'; $sql = $sqlstart . $sqlend . ')';
dol_syslog("import_xlsx.modules", LOG_DEBUG); //dol_syslog("import_xlsx.modules", LOG_DEBUG);
// Run insert request // Run insert request
if ($sql) { if ($sql) {

View File

@ -66,7 +66,7 @@ class modAccounting extends DolibarrModules
$this->depends = array("modFacture", "modBanque", "modTax"); // List of modules id that must be enabled if this module is enabled $this->depends = array("modFacture", "modBanque", "modTax"); // List of modules id that must be enabled if this module is enabled
$this->requiredby = array(); // List of modules id to disable if this one is disabled $this->requiredby = array(); // List of modules id to disable if this one is disabled
$this->conflictwith = array("modComptabilite"); // List of modules are in conflict with this module $this->conflictwith = array("modComptabilite"); // List of modules are in conflict with this module
$this->phpmin = array(5, 4); // Minimum version of PHP required by module $this->phpmin = array(5, 6); // Minimum version of PHP required by module
$this->need_dolibarr_version = array(3, 9); // Minimum version of Dolibarr required by module $this->need_dolibarr_version = array(3, 9); // Minimum version of Dolibarr required by module
$this->langfiles = array("accountancy", "compta"); $this->langfiles = array("accountancy", "compta");

View File

@ -74,7 +74,7 @@ class modAdherent extends DolibarrModules
$this->requiredby = array(); // List of module ids to disable if this one is disabled $this->requiredby = array(); // List of module ids to disable if this one is disabled
$this->conflictwith = array('modMailmanSpip'); // List of module class names as string this module is in conflict with $this->conflictwith = array('modMailmanSpip'); // List of module class names as string this module is in conflict with
$this->langfiles = array("members", "companies"); $this->langfiles = array("members", "companies");
$this->phpmin = array(5, 4); // Minimum version of PHP required by module $this->phpmin = array(5, 6); // Minimum version of PHP required by module
// Constants // Constants
$this->const = array(); $this->const = array();

View File

@ -73,7 +73,7 @@ class modAgenda extends DolibarrModules
$this->requiredby = array(); // List of module ids to disable if this one is disabled $this->requiredby = array(); // List of module ids to disable if this one is disabled
$this->conflictwith = array(); // List of module class names as string this module is in conflict with $this->conflictwith = array(); // List of module class names as string this module is in conflict with
$this->langfiles = array("companies"); $this->langfiles = array("companies");
$this->phpmin = array(5, 4); // Minimum version of PHP required by module $this->phpmin = array(5, 6); // Minimum version of PHP required by module
// Module parts // Module parts
$this->module_parts = array(); $this->module_parts = array();
@ -221,6 +221,7 @@ class modAgenda extends DolibarrModules
'fk_menu'=>'r=0', 'fk_menu'=>'r=0',
'type'=>'left', 'type'=>'left',
'titre'=>'Actions', 'titre'=>'Actions',
'prefix' => img_picto('', $this->picto, 'class="paddingright pictofixedwidth"'),
'mainmenu'=>'agenda', 'mainmenu'=>'agenda',
'url'=>'/comm/action/index.php?mainmenu=agenda&amp;leftmenu=agenda', 'url'=>'/comm/action/index.php?mainmenu=agenda&amp;leftmenu=agenda',
'langs'=>'agenda', 'langs'=>'agenda',

View File

@ -83,7 +83,7 @@ class modApi extends DolibarrModules
$this->depends = array(); // List of modules id that must be enabled if this module is enabled $this->depends = array(); // List of modules id that must be enabled if this module is enabled
$this->requiredby = array('modZapier'); // List of modules id to disable if this one is disabled $this->requiredby = array('modZapier'); // List of modules id to disable if this one is disabled
$this->conflictwith = array(); // List of modules id this module is in conflict with $this->conflictwith = array(); // List of modules id this module is in conflict with
$this->phpmin = array(5, 4); // Minimum version of PHP required by module $this->phpmin = array(5, 6); // Minimum version of PHP required by module
$this->langfiles = array("other"); $this->langfiles = array("other");
// Constants // Constants

View File

@ -90,7 +90,7 @@ class modAsset extends DolibarrModules
$this->requiredby = array(); // List of module ids to disable if this one is disabled $this->requiredby = array(); // List of module ids to disable if this one is disabled
$this->conflictwith = array(); // List of module class names as string this module is in conflict with $this->conflictwith = array(); // List of module class names as string this module is in conflict with
$this->langfiles = array("assets"); $this->langfiles = array("assets");
$this->phpmin = array(5, 4); // Minimum version of PHP required by module $this->phpmin = array(5, 6); // Minimum version of PHP required by module
$this->need_dolibarr_version = array(7, 0); // Minimum version of Dolibarr required by module $this->need_dolibarr_version = array(7, 0); // Minimum version of Dolibarr required by module
$this->warnings_activation = array(); // Warning to show when we activate module. array('always'='text') or array('FR'='textfr','ES'='textes'...) $this->warnings_activation = array(); // Warning to show when we activate module. array('always'='text') or array('FR'='textfr','ES'='textes'...)
$this->warnings_activation_ext = array(); // Warning to show when we activate an external module. array('always'='text') or array('FR'='textfr','ES'='textes'...) $this->warnings_activation_ext = array(); // Warning to show when we activate an external module. array('always'='text') or array('FR'='textfr','ES'='textes'...)

View File

@ -47,7 +47,7 @@ class modBlockedLog extends DolibarrModules
// It is used to group modules in module setup page // It is used to group modules in module setup page
$this->family = "base"; $this->family = "base";
// Module position in the family on 2 digits ('01', '10', '20', ...) // Module position in the family on 2 digits ('01', '10', '20', ...)
$this->module_position = '75'; $this->module_position = '76';
// Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module) // Module label (no space allowed), used if translation string 'ModuleXXXName' not found (where XXX is value of numeric property 'numero' of module)
$this->name = preg_replace('/^mod/i', '', get_class($this)); $this->name = preg_replace('/^mod/i', '', get_class($this));
$this->description = "Enable a log on some business events into a non reversible log. This module may be mandatory for some countries."; $this->description = "Enable a log on some business events into a non reversible log. This module may be mandatory for some countries.";

View File

@ -108,7 +108,7 @@ class modBom extends DolibarrModules
$this->requiredby = array('modMrp'); // List of module class names as string to disable if this one is disabled. Example: array('modModuleToDisable1', ...) $this->requiredby = array('modMrp'); // List of module class names as string to disable if this one is disabled. Example: array('modModuleToDisable1', ...)
$this->conflictwith = array(); // List of module class names as string this module is in conflict with. Example: array('modModuleToDisable1', ...) $this->conflictwith = array(); // List of module class names as string this module is in conflict with. Example: array('modModuleToDisable1', ...)
$this->langfiles = array("mrp"); $this->langfiles = array("mrp");
//$this->phpmin = array(5,4); // Minimum version of PHP required by module //$this->phpmin = array(5, 6)); // Minimum version of PHP required by module
$this->need_dolibarr_version = array(9, 0); // Minimum version of Dolibarr required by module $this->need_dolibarr_version = array(9, 0); // Minimum version of Dolibarr required by module
$this->warnings_activation = array(); // Warning to show when we activate module. array('always'='text') or array('FR'='textfr','ES'='textes'...) $this->warnings_activation = array(); // Warning to show when we activate module. array('always'='text') or array('FR'='textfr','ES'='textes'...)
$this->warnings_activation_ext = array(); // Warning to show when we activate an external module. array('always'='text') or array('FR'='textfr','ES'='textes'...) $this->warnings_activation_ext = array(); // Warning to show when we activate an external module. array('always'='text') or array('FR'='textfr','ES'='textes'...)

View File

@ -66,7 +66,7 @@ class modCashDesk extends DolibarrModules
$this->hidden = false; // A condition to hide module $this->hidden = false; // A condition to hide module
$this->depends = array('always'=>"modBanque", 'always'=>"modFacture", 'always'=>"modProduct", 'FR'=>'modBlockedLog'); // List of modules id that must be enabled if this module is enabled $this->depends = array('always'=>"modBanque", 'always'=>"modFacture", 'always'=>"modProduct", 'FR'=>'modBlockedLog'); // List of modules id that must be enabled if this module is enabled
$this->requiredby = array(); // List of modules id to disable if this one is disabled $this->requiredby = array(); // List of modules id to disable if this one is disabled
$this->phpmin = array(5, 4); // Minimum version of PHP required by module $this->phpmin = array(5, 6); // Minimum version of PHP required by module
$this->need_dolibarr_version = array(2, 4); // Minimum version of Dolibarr required by module $this->need_dolibarr_version = array(2, 4); // Minimum version of Dolibarr required by module
$this->langfiles = array("cashdesk"); $this->langfiles = array("cashdesk");
$this->warnings_activation = array('FR'=>'WarningNoteModulePOSForFrenchLaw'); // Warning to show when we activate module. array('always'='text') or array('FR'='text') $this->warnings_activation = array('FR'=>'WarningNoteModulePOSForFrenchLaw'); // Warning to show when we activate module. array('always'='text') or array('FR'='text')

View File

@ -91,7 +91,7 @@ class modEmailCollector extends DolibarrModules
$this->requiredby = array(); // List of module ids to disable if this one is disabled $this->requiredby = array(); // List of module ids to disable if this one is disabled
$this->conflictwith = array(); // List of module class names as string this module is in conflict with $this->conflictwith = array(); // List of module class names as string this module is in conflict with
$this->langfiles = array("admin"); $this->langfiles = array("admin");
$this->phpmin = array(5, 4); // Minimum version of PHP required by module $this->phpmin = array(5, 6); // Minimum version of PHP required by module
$this->need_dolibarr_version = array(7, 0); // Minimum version of Dolibarr required by module $this->need_dolibarr_version = array(7, 0); // Minimum version of Dolibarr required by module
$this->warnings_activation = array(); // Warning to show when we activate module. array('always'='text') or array('FR'='textfr','ES'='textes'...) $this->warnings_activation = array(); // Warning to show when we activate module. array('always'='text') or array('FR'='textfr','ES'='textes'...)
$this->warnings_activation_ext = array(); // Warning to show when we activate an external module. array('always'='text') or array('FR'='textfr','ES'='textes'...) $this->warnings_activation_ext = array(); // Warning to show when we activate an external module. array('always'='text') or array('FR'='textfr','ES'='textes'...)

View File

@ -65,7 +65,7 @@ class modExpenseReport extends DolibarrModules
$this->depends = array(); // List of module class names as string that must be enabled if this module is enabled $this->depends = array(); // List of module class names as string that must be enabled if this module is enabled
// $this->conflictwith = array("modDeplacement"); // Deactivate for access on old information // $this->conflictwith = array("modDeplacement"); // Deactivate for access on old information
$this->requiredby = array(); // List of modules id to disable if this one is disabled $this->requiredby = array(); // List of modules id to disable if this one is disabled
$this->phpmin = array(5, 4); // Minimum version of PHP required by module $this->phpmin = array(5, 6); // Minimum version of PHP required by module
$this->need_dolibarr_version = array(3, 7); // Minimum version of Dolibarr required by module $this->need_dolibarr_version = array(3, 7); // Minimum version of Dolibarr required by module
$this->langfiles = array("companies", "trips"); $this->langfiles = array("companies", "trips");

View File

@ -69,7 +69,7 @@ class modGeoIPMaxmind extends DolibarrModules
$this->depends = array(); // List of module class names as string that must be enabled if this module is enabled $this->depends = array(); // List of module class names as string that must be enabled if this module is enabled
$this->requiredby = array(); // List of module ids to disable if this one is disabled $this->requiredby = array(); // List of module ids to disable if this one is disabled
$this->conflictwith = array(); // List of module class names as string this module is in conflict with $this->conflictwith = array(); // List of module class names as string this module is in conflict with
$this->phpmin = array(5, 4); $this->phpmin = array(5, 6);
$this->phpmax = array(); $this->phpmax = array();
$this->need_dolibarr_version = array(2, 7, -1); // Minimum version of Dolibarr required by module $this->need_dolibarr_version = array(2, 7, -1); // Minimum version of Dolibarr required by module
$this->need_javascript_ajax = 1; $this->need_javascript_ajax = 1;

View File

@ -77,7 +77,7 @@ class modGravatar extends DolibarrModules
$this->depends = array(); // List of module class names as string that must be enabled if this module is enabled $this->depends = array(); // List of module class names as string that must be enabled if this module is enabled
$this->requiredby = array(); // List of module ids to disable if this one is disabled $this->requiredby = array(); // List of module ids to disable if this one is disabled
$this->conflictwith = array(); // List of module class names as string this module is in conflict with $this->conflictwith = array(); // List of module class names as string this module is in conflict with
$this->phpmin = array(5, 4); // Minimum version of PHP required by module $this->phpmin = array(5, 6); // Minimum version of PHP required by module
$this->need_dolibarr_version = array(2, 7); // Minimum version of Dolibarr required by module $this->need_dolibarr_version = array(2, 7); // Minimum version of Dolibarr required by module
$this->langfiles = array(); $this->langfiles = array();

View File

@ -71,7 +71,7 @@ class modHRM extends DolibarrModules
$this->depends = array(); // List of module class names as string that must be enabled if this module is enabled $this->depends = array(); // List of module class names as string that must be enabled if this module is enabled
$this->requiredby = array(/*"modSalaries, modExpenseReport, modHoliday"*/); // List of module ids to disable if this one is disabled $this->requiredby = array(/*"modSalaries, modExpenseReport, modHoliday"*/); // List of module ids to disable if this one is disabled
$this->conflictwith = array(); // List of module class names as string this module is in conflict with $this->conflictwith = array(); // List of module class names as string this module is in conflict with
$this->phpmin = array(5, 4); // Minimum version of PHP required by module $this->phpmin = array(5, 6); // Minimum version of PHP required by module
$this->need_dolibarr_version = array(3, 9); // Minimum version of Dolibarr required by module $this->need_dolibarr_version = array(3, 9); // Minimum version of Dolibarr required by module
$this->langfiles = array("hrm"); $this->langfiles = array("hrm");

View File

@ -87,7 +87,7 @@ class modHoliday extends DolibarrModules
$this->depends = array(); // List of module class names as string that must be enabled if this module is enabled $this->depends = array(); // List of module class names as string that must be enabled if this module is enabled
$this->requiredby = array(); // List of module ids to disable if this one is disabled $this->requiredby = array(); // List of module ids to disable if this one is disabled
$this->conflictwith = array(); // List of module class names as string this module is in conflict with $this->conflictwith = array(); // List of module class names as string this module is in conflict with
$this->phpmin = array(5, 4); // Minimum version of PHP required by module $this->phpmin = array(5, 6); // Minimum version of PHP required by module
$this->need_dolibarr_version = array(3, 0); // Minimum version of Dolibarr required by module $this->need_dolibarr_version = array(3, 0); // Minimum version of Dolibarr required by module
$this->langfiles = array("holiday"); $this->langfiles = array("holiday");

View File

@ -64,7 +64,7 @@ class modImport extends DolibarrModules
$this->depends = array(); // List of module class names as string that must be enabled if this module is enabled $this->depends = array(); // List of module class names as string that must be enabled if this module is enabled
$this->requiredby = array(); // List of module ids to disable if this one is disabled $this->requiredby = array(); // List of module ids to disable if this one is disabled
$this->conflictwith = array(); // List of module class names as string this module is in conflict with $this->conflictwith = array(); // List of module class names as string this module is in conflict with
$this->phpmin = array(5, 4); // Minimum version of PHP required by module - Need auto_detect_line_endings php option to solve MAC pbs. $this->phpmin = array(5, 6); // Minimum version of PHP required by module - Need auto_detect_line_endings php option to solve MAC pbs.
$this->phpmax = array(); $this->phpmax = array();
$this->need_dolibarr_version = array(2, 7, -1); // Minimum version of Dolibarr required by module $this->need_dolibarr_version = array(2, 7, -1); // Minimum version of Dolibarr required by module
$this->need_javascript_ajax = 1; $this->need_javascript_ajax = 1;

View File

@ -68,7 +68,7 @@ class modIncoterm extends DolibarrModules
$this->depends = array(); // List of module class names as string that must be enabled if this module is enabled $this->depends = array(); // List of module class names as string that must be enabled if this module is enabled
$this->requiredby = array(); // List of module ids to disable if this one is disabled $this->requiredby = array(); // List of module ids to disable if this one is disabled
$this->conflictwith = array(); // List of module class names as string this module is in conflict with $this->conflictwith = array(); // List of module class names as string this module is in conflict with
$this->phpmin = array(5, 4); // Minimum version of PHP required by module $this->phpmin = array(5, 6); // Minimum version of PHP required by module
$this->need_dolibarr_version = array(3, 0); // Minimum version of Dolibarr required by module $this->need_dolibarr_version = array(3, 0); // Minimum version of Dolibarr required by module
$this->langfiles = array("incoterm"); $this->langfiles = array("incoterm");

View File

@ -61,7 +61,7 @@ class modLabel extends DolibarrModules
$this->depends = array(); // List of module class names as string that must be enabled if this module is enabled $this->depends = array(); // List of module class names as string that must be enabled if this module is enabled
$this->requiredby = array(); // List of module ids to disable if this one is disabled $this->requiredby = array(); // List of module ids to disable if this one is disabled
$this->conflictwith = array(); // List of module class names as string this module is in conflict with $this->conflictwith = array(); // List of module class names as string this module is in conflict with
$this->phpmin = array(5, 4); // Minimum version of PHP required by module $this->phpmin = array(5, 6); // Minimum version of PHP required by module
// Config pages // Config pages
// $this->config_page_url = array("label.php"); // $this->config_page_url = array("label.php");

View File

@ -67,7 +67,7 @@ class modLdap extends DolibarrModules
$this->depends = array(); // List of module class names as string that must be enabled if this module is enabled $this->depends = array(); // List of module class names as string that must be enabled if this module is enabled
$this->requiredby = array(); // List of module ids to disable if this one is disabled $this->requiredby = array(); // List of module ids to disable if this one is disabled
$this->conflictwith = array(); // List of module class names as string this module is in conflict with $this->conflictwith = array(); // List of module class names as string this module is in conflict with
$this->phpmin = array(5, 4); // Minimum version of PHP required by module $this->phpmin = array(5, 6); // Minimum version of PHP required by module
// Constants // Constants
$this->const = array( $this->const = array(

View File

@ -67,7 +67,7 @@ class modLoan extends DolibarrModules
$this->depends = array(); // List of module class names as string that must be enabled if this module is enabled $this->depends = array(); // List of module class names as string that must be enabled if this module is enabled
$this->requiredby = array(); // List of module ids to disable if this one is disabled $this->requiredby = array(); // List of module ids to disable if this one is disabled
$this->conflictwith = array(); // List of module class names as string this module is in conflict with $this->conflictwith = array(); // List of module class names as string this module is in conflict with
$this->phpmin = array(5, 4); // Minimum version of PHP required by module $this->phpmin = array(5, 6); // Minimum version of PHP required by module
$this->langfiles = array("loan"); $this->langfiles = array("loan");
// Constants // Constants

View File

@ -66,7 +66,7 @@ class modMailing extends DolibarrModules
$this->depends = array(); // List of module class names as string that must be enabled if this module is enabled $this->depends = array(); // List of module class names as string that must be enabled if this module is enabled
$this->requiredby = array(); // List of module ids to disable if this one is disabled $this->requiredby = array(); // List of module ids to disable if this one is disabled
$this->conflictwith = array(); // List of module class names as string this module is in conflict with $this->conflictwith = array(); // List of module class names as string this module is in conflict with
$this->phpmin = array(5, 4); // Minimum version of PHP required by module $this->phpmin = array(5, 6); // Minimum version of PHP required by module
$this->langfiles = array("mails"); $this->langfiles = array("mails");
// Config pages // Config pages

View File

@ -66,7 +66,7 @@ class modMailmanSpip extends DolibarrModules
$this->depends = array('modAdherent'); // List of module class names as string that must be enabled if this module is enabled $this->depends = array('modAdherent'); // List of module class names as string that must be enabled if this module is enabled
$this->requiredby = array(); // List of module ids to disable if this one is disabled $this->requiredby = array(); // List of module ids to disable if this one is disabled
$this->conflictwith = array(); // List of module class names as string this module is in conflict with $this->conflictwith = array(); // List of module class names as string this module is in conflict with
$this->phpmin = array(5, 4); // Minimum version of PHP required by module $this->phpmin = array(5, 6); // Minimum version of PHP required by module
// Config pages // Config pages
$this->config_page_url = array('mailman.php'); $this->config_page_url = array('mailman.php');

View File

@ -72,7 +72,7 @@ class modMargin extends DolibarrModules
$this->depends = array("modPropale", "modProduct"); // List of module class names as string that must be enabled if this module is enabled $this->depends = array("modPropale", "modProduct"); // List of module class names as string that must be enabled if this module is enabled
$this->requiredby = array(); // List of module ids to disable if this one is disabled $this->requiredby = array(); // List of module ids to disable if this one is disabled
$this->conflictwith = array(); // List of module class names as string this module is in conflict with $this->conflictwith = array(); // List of module class names as string this module is in conflict with
$this->phpmin = array(5, 4); // Minimum version of PHP required by module $this->phpmin = array(5, 6); // Minimum version of PHP required by module
$this->need_dolibarr_version = array(3, 2); // Minimum version of Dolibarr required by module $this->need_dolibarr_version = array(3, 2); // Minimum version of Dolibarr required by module
$this->langfiles = array("margins"); $this->langfiles = array("margins");
@ -107,6 +107,7 @@ class modMargin extends DolibarrModules
'fk_menu'=>'fk_mainmenu=billing', // Put 0 if this is a top menu 'fk_menu'=>'fk_mainmenu=billing', // Put 0 if this is a top menu
'type'=>'left', // This is a Top menu entry 'type'=>'left', // This is a Top menu entry
'titre'=>'Margins', 'titre'=>'Margins',
'prefix' => img_picto('', $this->picto, 'class="paddingright pictofixedwidth"'),
'mainmenu'=>'billing', 'mainmenu'=>'billing',
'leftmenu'=>'margins', 'leftmenu'=>'margins',
'url'=>'/margin/index.php', 'url'=>'/margin/index.php',
@ -115,7 +116,8 @@ class modMargin extends DolibarrModules
'enabled'=>'$conf->margin->enabled', // Define condition to show or hide menu entry. Use '$conf->monmodule->enabled' if entry must be visible if module is enabled. 'enabled'=>'$conf->margin->enabled', // Define condition to show or hide menu entry. Use '$conf->monmodule->enabled' if entry must be visible if module is enabled.
'perms'=>'$user->rights->margins->liretous', // Use 'perms'=>'$user->rights->monmodule->level1->level2' if you want your menu with a permission rules 'perms'=>'$user->rights->margins->liretous', // Use 'perms'=>'$user->rights->monmodule->level1->level2' if you want your menu with a permission rules
'target'=>'', 'target'=>'',
'user'=>2); // 0=Menu for internal users, 1=external users, 2=both 'user'=>2, // 0=Menu for internal users, 1=external users, 2=both
);
$r++; $r++;
// Permissions // Permissions

View File

@ -122,7 +122,7 @@ class modMrp extends DolibarrModules
$this->requiredby = array(); // List of module class names as string to disable if this one is disabled. Example: array('modModuleToDisable1', ...) $this->requiredby = array(); // List of module class names as string to disable if this one is disabled. Example: array('modModuleToDisable1', ...)
$this->conflictwith = array(); // List of module class names as string this module is in conflict with. Example: array('modModuleToDisable1', ...) $this->conflictwith = array(); // List of module class names as string this module is in conflict with. Example: array('modModuleToDisable1', ...)
$this->langfiles = array("mrp"); $this->langfiles = array("mrp");
$this->phpmin = array(5, 5); // Minimum version of PHP required by module $this->phpmin = array(5, 6); // Minimum version of PHP required by module
$this->need_dolibarr_version = array(8, 0); // Minimum version of Dolibarr required by module $this->need_dolibarr_version = array(8, 0); // Minimum version of Dolibarr required by module
$this->warnings_activation = array(); // Warning to show when we activate module. array('always'='text') or array('FR'='textfr','ES'='textes'...) $this->warnings_activation = array(); // Warning to show when we activate module. array('always'='text') or array('FR'='textfr','ES'='textes'...)
$this->warnings_activation_ext = array(); // Warning to show when we activate an external module. array('always'='text') or array('FR'='textfr','ES'='textes'...) $this->warnings_activation_ext = array(); // Warning to show when we activate an external module. array('always'='text') or array('FR'='textfr','ES'='textes'...)

View File

@ -88,7 +88,7 @@ class modMultiCurrency extends DolibarrModules
$this->depends = array(); // List of modules id that must be enabled if this module is enabled $this->depends = array(); // List of modules id that must be enabled if this module is enabled
$this->requiredby = array(); // List of modules id to disable if this one is disabled $this->requiredby = array(); // List of modules id to disable if this one is disabled
$this->conflictwith = array(); // List of modules id this module is in conflict with $this->conflictwith = array(); // List of modules id this module is in conflict with
$this->phpmin = array(5, 4); // Minimum version of PHP required by module $this->phpmin = array(5, 6); // Minimum version of PHP required by module
$this->need_dolibarr_version = array(3, 0); // Minimum version of Dolibarr required by module $this->need_dolibarr_version = array(3, 0); // Minimum version of Dolibarr required by module
$this->langfiles = array("multicurrency"); $this->langfiles = array("multicurrency");

View File

@ -63,7 +63,7 @@ class modNotification extends DolibarrModules
$this->depends = array(); // List of module class names as string that must be enabled if this module is enabled $this->depends = array(); // List of module class names as string that must be enabled if this module is enabled
$this->requiredby = array(); // List of module ids to disable if this one is disabled $this->requiredby = array(); // List of module ids to disable if this one is disabled
$this->conflictwith = array(); // List of module class names as string this module is in conflict with $this->conflictwith = array(); // List of module class names as string this module is in conflict with
$this->phpmin = array(5, 4); // Minimum version of PHP required by module $this->phpmin = array(5, 6); // Minimum version of PHP required by module
$this->langfiles = array("mails"); $this->langfiles = array("mails");
// Config pages // Config pages

View File

@ -71,7 +71,7 @@ class modOauth extends DolibarrModules
$this->depends = array(); // List of module class names as string that must be enabled if this module is enabled $this->depends = array(); // List of module class names as string that must be enabled if this module is enabled
$this->requiredby = array(); // List of module ids to disable if this one is disabled $this->requiredby = array(); // List of module ids to disable if this one is disabled
$this->conflictwith = array(); // List of module class names as string this module is in conflict with $this->conflictwith = array(); // List of module class names as string this module is in conflict with
$this->phpmin = array(5, 4); // Minimum version of PHP required by module // Minimum version of PHP required by module $this->phpmin = array(5, 6); // Minimum version of PHP required by module // Minimum version of PHP required by module
$this->need_dolibarr_version = array(3, 7, -2); // Minimum version of Dolibarr required by module $this->need_dolibarr_version = array(3, 7, -2); // Minimum version of Dolibarr required by module
$this->conflictwith = array(); $this->conflictwith = array();
$this->langfiles = array("oauth"); $this->langfiles = array("oauth");

View File

@ -76,7 +76,7 @@ class modOpenSurvey extends DolibarrModules
$this->depends = array(); // List of module class names as string that must be enabled if this module is enabled $this->depends = array(); // List of module class names as string that must be enabled if this module is enabled
$this->requiredby = array(); // List of module ids to disable if this one is disabled $this->requiredby = array(); // List of module ids to disable if this one is disabled
$this->conflictwith = array(); // List of module class names as string this module is in conflict with $this->conflictwith = array(); // List of module class names as string this module is in conflict with
$this->phpmin = array(5, 4); // Minimum version of PHP required by module $this->phpmin = array(5, 6); // Minimum version of PHP required by module
$this->need_dolibarr_version = array(3, 4, 0); // Minimum version of Dolibarr required by module $this->need_dolibarr_version = array(3, 4, 0); // Minimum version of Dolibarr required by module
// Constants // Constants
@ -126,6 +126,7 @@ class modOpenSurvey extends DolibarrModules
'fk_menu'=>'fk_mainmenu=tools', // Use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode 'fk_menu'=>'fk_mainmenu=tools', // Use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode
'type'=>'left', 'type'=>'left',
'titre'=>'Survey', 'titre'=>'Survey',
'prefix' => img_picto('', $this->picto, 'class="paddingright pictofixedwidth"'),
'mainmenu'=>'tools', 'mainmenu'=>'tools',
'leftmenu'=>'opensurvey', 'leftmenu'=>'opensurvey',
'url'=>'/opensurvey/index.php?mainmenu=tools&leftmenu=opensurvey', 'url'=>'/opensurvey/index.php?mainmenu=tools&leftmenu=opensurvey',

View File

@ -73,7 +73,7 @@ class modPayBox extends DolibarrModules
$this->depends = array(); // List of module class names as string that must be enabled if this module is enabled $this->depends = array(); // List of module class names as string that must be enabled if this module is enabled
$this->requiredby = array(); // List of module ids to disable if this one is disabled $this->requiredby = array(); // List of module ids to disable if this one is disabled
$this->conflictwith = array(); // List of module class names as string this module is in conflict with $this->conflictwith = array(); // List of module class names as string this module is in conflict with
$this->phpmin = array(5, 4); // Minimum version of PHP required by module $this->phpmin = array(5, 6); // Minimum version of PHP required by module
$this->need_dolibarr_version = array(2, 6); // Minimum version of Dolibarr required by module $this->need_dolibarr_version = array(2, 6); // Minimum version of Dolibarr required by module
$this->langfiles = array("paybox"); $this->langfiles = array("paybox");

View File

@ -68,7 +68,7 @@ class modPaymentByBankTransfer extends DolibarrModules
$this->depends = array("modFournisseur", "modBanque"); // List of module class names as string that must be enabled if this module is enabled $this->depends = array("modFournisseur", "modBanque"); // List of module class names as string that must be enabled if this module is enabled
$this->requiredby = array(); // List of module ids to disable if this one is disabled $this->requiredby = array(); // List of module ids to disable if this one is disabled
$this->conflictwith = array(); // List of module class names as string this module is in conflict with $this->conflictwith = array(); // List of module class names as string this module is in conflict with
$this->phpmin = array(5, 4); // Minimum version of PHP required by module $this->phpmin = array(5, 6); // Minimum version of PHP required by module
// Config pages // Config pages
$this->config_page_url = array("paymentbybanktransfer.php"); $this->config_page_url = array("paymentbybanktransfer.php");

View File

@ -74,7 +74,7 @@ class modPaypal extends DolibarrModules
$this->depends = array(); // List of module class names as string that must be enabled if this module is enabled $this->depends = array(); // List of module class names as string that must be enabled if this module is enabled
$this->requiredby = array('modPaypalPlus'); // List of module ids to disable if this one is disabled $this->requiredby = array('modPaypalPlus'); // List of module ids to disable if this one is disabled
$this->conflictwith = array(); // List of module class names as string this module is in conflict with $this->conflictwith = array(); // List of module class names as string this module is in conflict with
$this->phpmin = array(5, 4); // Minimum version of PHP required by module $this->phpmin = array(5, 6); // Minimum version of PHP required by module
$this->need_dolibarr_version = array(3, 0); // Minimum version of Dolibarr required by module $this->need_dolibarr_version = array(3, 0); // Minimum version of Dolibarr required by module
$this->langfiles = array("paypal"); $this->langfiles = array("paypal");

View File

@ -67,7 +67,7 @@ class modPrelevement extends DolibarrModules
$this->depends = array("modFacture", "modBanque"); // List of module class names as string that must be enabled if this module is enabled $this->depends = array("modFacture", "modBanque"); // List of module class names as string that must be enabled if this module is enabled
$this->requiredby = array(); // List of module ids to disable if this one is disabled $this->requiredby = array(); // List of module ids to disable if this one is disabled
$this->conflictwith = array(); // List of module class names as string this module is in conflict with $this->conflictwith = array(); // List of module class names as string this module is in conflict with
$this->phpmin = array(5, 4); // Minimum version of PHP required by module $this->phpmin = array(5, 6); // Minimum version of PHP required by module
// Config pages // Config pages
$this->config_page_url = array("prelevement.php"); $this->config_page_url = array("prelevement.php");

View File

@ -70,7 +70,7 @@ class modPrinting extends DolibarrModules
$this->depends = array(); // List of module class names as string that must be enabled if this module is enabled $this->depends = array(); // List of module class names as string that must be enabled if this module is enabled
$this->requiredby = array(); // List of module ids to disable if this one is disabled $this->requiredby = array(); // List of module ids to disable if this one is disabled
$this->conflictwith = array(); // List of module class names as string this module is in conflict with $this->conflictwith = array(); // List of module class names as string this module is in conflict with
$this->phpmin = array(5, 4); // Minimum version of PHP required by module $this->phpmin = array(5, 6); // Minimum version of PHP required by module
$this->need_dolibarr_version = array(3, 7, -2); // Minimum version of Dolibarr required by module $this->need_dolibarr_version = array(3, 7, -2); // Minimum version of Dolibarr required by module
$this->conflictwith = array(); $this->conflictwith = array();
$this->langfiles = array("printing"); $this->langfiles = array("printing");

View File

@ -70,7 +70,7 @@ class modProduct extends DolibarrModules
$this->depends = array(); // List of module class names as string that must be enabled if this module is enabled $this->depends = array(); // List of module class names as string that must be enabled if this module is enabled
$this->requiredby = array("modStock", "modBarcode", "modProductBatch", "modVariants"); // List of module ids to disable if this one is disabled $this->requiredby = array("modStock", "modBarcode", "modProductBatch", "modVariants"); // List of module ids to disable if this one is disabled
$this->conflictwith = array(); // List of module class names as string this module is in conflict with $this->conflictwith = array(); // List of module class names as string this module is in conflict with
$this->phpmin = array(5, 4); // Minimum version of PHP required by module $this->phpmin = array(5, 6); // Minimum version of PHP required by module
// Config pages // Config pages
$this->config_page_url = array("product.php@product"); $this->config_page_url = array("product.php@product");

View File

@ -72,7 +72,7 @@ class modProductBatch extends DolibarrModules
$this->depends = array("modProduct", "modStock", "modExpedition", "modFournisseur"); // List of module class names as string that must be enabled if this module is enabled $this->depends = array("modProduct", "modStock", "modExpedition", "modFournisseur"); // List of module class names as string that must be enabled if this module is enabled
$this->requiredby = array(); // List of module ids to disable if this one is disabled $this->requiredby = array(); // List of module ids to disable if this one is disabled
$this->conflictwith = array(); // List of module class names as string this module is in conflict with $this->conflictwith = array(); // List of module class names as string this module is in conflict with
$this->phpmin = array(5, 4); // Minimum version of PHP required by module $this->phpmin = array(5, 6); // Minimum version of PHP required by module
$this->need_dolibarr_version = array(3, 0); // Minimum version of Dolibarr required by module $this->need_dolibarr_version = array(3, 0); // Minimum version of Dolibarr required by module
$this->langfiles = array("productbatch"); $this->langfiles = array("productbatch");

View File

@ -68,7 +68,7 @@ class modProjet extends DolibarrModules
$this->depends = array(); // List of module class names as string that must be enabled if this module is enabled $this->depends = array(); // List of module class names as string that must be enabled if this module is enabled
$this->requiredby = array(); // List of module ids to disable if this one is disabled $this->requiredby = array(); // List of module ids to disable if this one is disabled
$this->conflictwith = array(); // List of module class names as string this module is in conflict with $this->conflictwith = array(); // List of module class names as string this module is in conflict with
$this->phpmin = array(5, 4); // Minimum version of PHP required by module $this->phpmin = array(5, 6); // Minimum version of PHP required by module
$this->langfiles = array('projects'); $this->langfiles = array('projects');
// Constants // Constants

View File

@ -69,7 +69,7 @@ class modPropale extends DolibarrModules
$this->depends = array("modSociete"); // List of module class names as string that must be enabled if this module is enabled $this->depends = array("modSociete"); // List of module class names as string that must be enabled if this module is enabled
$this->requiredby = array(); // List of module ids to disable if this one is disabled $this->requiredby = array(); // List of module ids to disable if this one is disabled
$this->conflictwith = array(); // List of module class names as string this module is in conflict with $this->conflictwith = array(); // List of module class names as string this module is in conflict with
$this->phpmin = array(5, 4); // Minimum version of PHP required by module $this->phpmin = array(5, 6); // Minimum version of PHP required by module
$this->config_page_url = array("propal.php"); $this->config_page_url = array("propal.php");
$this->langfiles = array("propal", "bills", "companies", "deliveries", "products"); $this->langfiles = array("propal", "bills", "companies", "deliveries", "products");

View File

@ -71,7 +71,7 @@ class modReceiptPrinter extends DolibarrModules
$this->depends = array(); // List of module class names as string that must be enabled if this module is enabled $this->depends = array(); // List of module class names as string that must be enabled if this module is enabled
$this->requiredby = array(); // List of module ids to disable if this one is disabled $this->requiredby = array(); // List of module ids to disable if this one is disabled
$this->conflictwith = array(); // List of module class names as string this module is in conflict with $this->conflictwith = array(); // List of module class names as string this module is in conflict with
$this->phpmin = array(5, 4); // Minimum version of PHP required by module $this->phpmin = array(5, 6); // Minimum version of PHP required by module
$this->need_dolibarr_version = array(3, 9, -2); // Minimum version of Dolibarr required by module $this->need_dolibarr_version = array(3, 9, -2); // Minimum version of Dolibarr required by module
$this->conflictwith = array(); $this->conflictwith = array();
$this->langfiles = array("receiptprinter"); $this->langfiles = array("receiptprinter");

View File

@ -122,7 +122,7 @@ class modRecruitment extends DolibarrModules
$this->requiredby = array(); // List of module class names as string to disable if this one is disabled. Example: array('modModuleToDisable1', ...) $this->requiredby = array(); // List of module class names as string to disable if this one is disabled. Example: array('modModuleToDisable1', ...)
$this->conflictwith = array(); // List of module class names as string this module is in conflict with. Example: array('modModuleToDisable1', ...) $this->conflictwith = array(); // List of module class names as string this module is in conflict with. Example: array('modModuleToDisable1', ...)
$this->langfiles = array("recruitment"); $this->langfiles = array("recruitment");
$this->phpmin = array(5, 5); // Minimum version of PHP required by module $this->phpmin = array(5, 6); // Minimum version of PHP required by module
$this->need_dolibarr_version = array(11, -3); // Minimum version of Dolibarr required by module $this->need_dolibarr_version = array(11, -3); // Minimum version of Dolibarr required by module
$this->warnings_activation = array(); // Warning to show when we activate module. array('always'='text') or array('FR'='textfr','ES'='textes'...) $this->warnings_activation = array(); // Warning to show when we activate module. array('always'='text') or array('FR'='textfr','ES'='textes'...)
$this->warnings_activation_ext = array(); // Warning to show when we activate an external module. array('always'='text') or array('FR'='textfr','ES'='textes'...) $this->warnings_activation_ext = array(); // Warning to show when we activate an external module. array('always'='text') or array('FR'='textfr','ES'='textes'...)
@ -270,6 +270,7 @@ class modRecruitment extends DolibarrModules
'fk_menu'=>'fk_mainmenu=hrm', // '' if this is a top menu. For left menu, use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode 'fk_menu'=>'fk_mainmenu=hrm', // '' if this is a top menu. For left menu, use 'fk_mainmenu=xxx' or 'fk_mainmenu=xxx,fk_leftmenu=yyy' where xxx is mainmenucode and yyy is a leftmenucode
'type'=>'left', // This is a Top menu entry 'type'=>'left', // This is a Top menu entry
'titre'=>'Recruitment', 'titre'=>'Recruitment',
'prefix' => img_picto('', $this->picto, 'class="paddingright pictofixedwidth"'),
'mainmenu'=>'hrm', 'mainmenu'=>'hrm',
'leftmenu'=>'recruitmentjobposition', 'leftmenu'=>'recruitmentjobposition',
'url'=>'/recruitment/recruitmentindex.php', 'url'=>'/recruitment/recruitmentindex.php',

View File

@ -95,7 +95,7 @@ class modResource extends DolibarrModules
// List of modules id to disable if this one is disabled // List of modules id to disable if this one is disabled
$this->requiredby = array('modPlace'); $this->requiredby = array('modPlace');
// Minimum version of PHP required by module // Minimum version of PHP required by module
$this->phpmin = array(5, 4); $this->phpmin = array(5, 6);
$this->langfiles = array("resource"); // langfiles@resource $this->langfiles = array("resource"); // langfiles@resource
// Constants // Constants
@ -188,6 +188,7 @@ class modResource extends DolibarrModules
'fk_menu'=>'fk_mainmenu=tools', 'fk_menu'=>'fk_mainmenu=tools',
'type'=>'left', 'type'=>'left',
'titre'=> 'MenuResourceIndex', 'titre'=> 'MenuResourceIndex',
'prefix' => img_picto('', $this->picto, 'class="paddingright pictofixedwidth"'),
'mainmenu'=>'tools', 'mainmenu'=>'tools',
'leftmenu'=> 'resource', 'leftmenu'=> 'resource',
'url'=> '/resource/list.php', 'url'=> '/resource/list.php',

View File

@ -75,7 +75,7 @@ class modSalaries extends DolibarrModules
$this->depends = array(); // List of module class names as string that must be enabled if this module is enabled $this->depends = array(); // List of module class names as string that must be enabled if this module is enabled
$this->requiredby = array(); // List of module ids to disable if this one is disabled $this->requiredby = array(); // List of module ids to disable if this one is disabled
$this->conflictwith = array(); // List of module class names as string this module is in conflict with $this->conflictwith = array(); // List of module class names as string this module is in conflict with
$this->phpmin = array(5, 4); // Minimum version of PHP required by module $this->phpmin = array(5, 6); // Minimum version of PHP required by module
$this->langfiles = array("salaries", "bills"); $this->langfiles = array("salaries", "bills");
// Constants // Constants

View File

@ -68,7 +68,7 @@ class modService extends DolibarrModules
$this->depends = array(); // List of module class names as string that must be enabled if this module is enabled $this->depends = array(); // List of module class names as string that must be enabled if this module is enabled
$this->requiredby = array(); // List of module ids to disable if this one is disabled $this->requiredby = array(); // List of module ids to disable if this one is disabled
$this->conflictwith = array(); // List of module class names as string this module is in conflict with $this->conflictwith = array(); // List of module class names as string this module is in conflict with
$this->phpmin = array(5, 4); // Minimum version of PHP required by module $this->phpmin = array(5, 6); // Minimum version of PHP required by module
// Config pages // Config pages
$this->config_page_url = array("product.php@product"); $this->config_page_url = array("product.php@product");

View File

@ -69,7 +69,7 @@ class modSocialNetworks extends DolibarrModules
$this->depends = array(); // List of module class names as string that must be enabled if this module is enabled $this->depends = array(); // List of module class names as string that must be enabled if this module is enabled
$this->requiredby = array(); // List of module ids to disable if this one is disabled $this->requiredby = array(); // List of module ids to disable if this one is disabled
$this->conflictwith = array(); // List of module class names as string this module is in conflict with $this->conflictwith = array(); // List of module class names as string this module is in conflict with
$this->phpmin = array(5, 4); // Minimum version of PHP required by module $this->phpmin = array(5, 6); // Minimum version of PHP required by module
$this->langfiles = array(); $this->langfiles = array();
// Constants // Constants

View File

@ -70,7 +70,7 @@ class modSociete extends DolibarrModules
$this->depends = array(); // List of module class names as string that must be enabled if this module is enabled $this->depends = array(); // List of module class names as string that must be enabled if this module is enabled
$this->requiredby = array("modExpedition", "modFacture", "modFournisseur", "modFicheinter", "modPropale", "modContrat", "modCommande"); // List of module ids to disable if this one is disabled $this->requiredby = array("modExpedition", "modFacture", "modFournisseur", "modFicheinter", "modPropale", "modContrat", "modCommande"); // List of module ids to disable if this one is disabled
$this->conflictwith = array(); // List of module class names as string this module is in conflict with $this->conflictwith = array(); // List of module class names as string this module is in conflict with
$this->phpmin = array(5, 4); // Minimum version of PHP required by module $this->phpmin = array(5, 6); // Minimum version of PHP required by module
$this->langfiles = array("companies", 'bills', "compta", "admin", "banks"); $this->langfiles = array("companies", 'bills', "compta", "admin", "banks");
// Constants // Constants

View File

@ -69,7 +69,7 @@ class modStock extends DolibarrModules
$this->depends = array("modProduct"); // List of module class names as string that must be enabled if this module is enabled $this->depends = array("modProduct"); // List of module class names as string that must be enabled if this module is enabled
$this->requiredby = array("modProductBatch"); // List of module ids to disable if this one is disabled $this->requiredby = array("modProductBatch"); // List of module ids to disable if this one is disabled
$this->conflictwith = array(); // List of module class names as string this module is in conflict with $this->conflictwith = array(); // List of module class names as string this module is in conflict with
$this->phpmin = array(5, 4); // Minimum version of PHP required by module $this->phpmin = array(5, 6); // Minimum version of PHP required by module
$this->langfiles = array("stocks"); $this->langfiles = array("stocks");
// Constants // Constants

View File

@ -72,7 +72,7 @@ class modStripe extends DolibarrModules
$this->hidden = false; // A condition to hide module $this->hidden = false; // A condition to hide module
$this->depends = array(); // List of modules id that must be enabled if this module is enabled $this->depends = array(); // List of modules id that must be enabled if this module is enabled
$this->requiredby = array(); // List of modules id to disable if this one is disabled $this->requiredby = array(); // List of modules id to disable if this one is disabled
$this->phpmin = array(5, 4); // Minimum version of PHP required by module $this->phpmin = array(5, 6); // Minimum version of PHP required by module
$this->need_dolibarr_version = array(5, 0); // Minimum version of Dolibarr required by module $this->need_dolibarr_version = array(5, 0); // Minimum version of Dolibarr required by module
$this->langfiles = array("stripe"); $this->langfiles = array("stripe");
@ -112,6 +112,7 @@ class modStripe extends DolibarrModules
'fk_menu'=>'fk_mainmenu=bank', 'fk_menu'=>'fk_mainmenu=bank',
'type'=>'left', 'type'=>'left',
'titre'=>'StripeAccount', 'titre'=>'StripeAccount',
'prefix' => img_picto('', $this->picto, 'class="paddingright pictofixedwidth"'),
'mainmenu'=>'bank', 'mainmenu'=>'bank',
'leftmenu'=>'stripe', 'leftmenu'=>'stripe',
'url' => '', 'url' => '',

View File

@ -70,7 +70,7 @@ class modSupplierProposal extends DolibarrModules
$this->depends = array('modFournisseur'); // List of module class names as string that must be enabled if this module is enabled $this->depends = array('modFournisseur'); // List of module class names as string that must be enabled if this module is enabled
$this->requiredby = array(); // List of module ids to disable if this one is disabled $this->requiredby = array(); // List of module ids to disable if this one is disabled
$this->conflictwith = array(); // List of module class names as string this module is in conflict with $this->conflictwith = array(); // List of module class names as string this module is in conflict with
$this->phpmin = array(5, 4); // Minimum version of PHP required by module $this->phpmin = array(5, 6); // Minimum version of PHP required by module
$this->langfiles = array("supplier_proposal"); $this->langfiles = array("supplier_proposal");
// Constants // Constants

Some files were not shown because too many files have changed in this diff Show More