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

This commit is contained in:
Laurent Destailleur 2024-01-23 10:44:10 +01:00
commit 28b3e656a9
13 changed files with 93 additions and 140 deletions

View File

@ -79,7 +79,7 @@ $catid = GETPOST("catid", 'int');
$socid = GETPOST('socid', 'int');
$search_filter = GETPOST("search_filter", 'alpha');
$search_status = GETPOST("search_status", 'intcomma'); // statut
$search_status = GETPOST("search_status", 'intcomma'); // status
$search_datec_start = dol_mktime(0, 0, 0, GETPOST('search_datec_start_month', 'int'), GETPOST('search_datec_start_day', 'int'), GETPOST('search_datec_start_year', 'int'));
$search_datec_end = dol_mktime(23, 59, 59, GETPOST('search_datec_end_month', 'int'), GETPOST('search_datec_end_day', 'int'), GETPOST('search_datec_end_year', 'int'));
$search_datem_start = dol_mktime(0, 0, 0, GETPOST('search_datem_start_month', 'int'), GETPOST('search_datem_start_day', 'int'), GETPOST('search_datem_start_year', 'int'));
@ -374,7 +374,7 @@ if ((!empty($search_categ) && $search_categ > 0) || !empty($catid)) {
$sql .= " d.rowid, d.ref, d.login, d.lastname, d.firstname, d.gender, d.societe as company, d.fk_soc,";
$sql .= " d.civility, d.datefin, d.address, d.zip, d.town, d.state_id, d.country,";
$sql .= " d.email, d.phone, d.phone_perso, d.phone_mobile, d.birth, d.public, d.photo,";
$sql .= " d.fk_adherent_type as type_id, d.morphy, d.statut, d.datec as date_creation, d.tms as date_update,";
$sql .= " d.fk_adherent_type as type_id, d.morphy, d.statut as status, d.datec as date_creation, d.tms as date_update,";
$sql .= " d.note_private, d.note_public, d.import_key,";
$sql .= " s.nom,";
$sql .= " ".$db->ifsql("d.societe IS NULL", "s.nom", "d.societe")." as companyname,";
@ -967,9 +967,16 @@ if (!empty($arrayfields['d.tms']['checked'])) {
print '</td>';
}
// Import Key
if (!empty($arrayfields['d.import_key']['checked'])) {
print '<td class="liste_titre center">';
print '<input class="flat searchstring maxwidth50" type="text" name="search_import_key" value="'.dol_escape_htmltag($search_import_key).'">';
print '</td>';
}
// Status
if (!empty($arrayfields['d.statut']['checked'])) {
print '<td class="liste_titre right parentonrightofpage">';
print '<td class="liste_titre center parentonrightofpage">';
$liststatus = array(
Adherent::STATUS_DRAFT => $langs->trans("Draft"),
Adherent::STATUS_VALIDATED => $langs->trans("Validated"),
@ -980,13 +987,6 @@ if (!empty($arrayfields['d.statut']['checked'])) {
print '</td>';
}
// Import Key
if (!empty($arrayfields['d.import_key']['checked'])) {
print '<td class="liste_titre center">';
print '<input class="flat searchstring maxwidth50" type="text" name="search_import_key" value="'.dol_escape_htmltag($search_import_key).'">';
print '</td>';
}
// Action column
if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
print '<td class="liste_titre center maxwidthsearch">';
@ -1008,7 +1008,7 @@ if (getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
$totalarray['nbfield']++;
}
if (getDolGlobalString('MAIN_SHOW_TECHNICAL_ID')) {
print_liste_field_titre("ID", $_SERVER["PHP_SELF"], '', '', $param, 'align="center"', $sortfield, $sortorder);
print_liste_field_titre("ID", $_SERVER["PHP_SELF"], '', '', $param, '', $sortfield, $sortorder, 'center ');
$totalarray['nbfield']++;
}
if (!empty($arrayfields['d.ref']['checked'])) {
@ -1096,27 +1096,27 @@ $reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters); // No
print $hookmanager->resPrint;
if (!empty($arrayfields['d.datec']['checked'])) {
print_liste_field_titre($arrayfields['d.datec']['label'], $_SERVER["PHP_SELF"], "d.datec", "", $param, 'align="center" class="nowrap"', $sortfield, $sortorder);
print_liste_field_titre($arrayfields['d.datec']['label'], $_SERVER["PHP_SELF"], "d.datec", "", $param, '', $sortfield, $sortorder, 'center nowrap ');
$totalarray['nbfield']++;
}
if (!empty($arrayfields['d.birth']['checked'])) {
print_liste_field_titre($arrayfields['d.birth']['label'], $_SERVER["PHP_SELF"], "d.birth", "", $param, 'align="center" class="nowrap"', $sortfield, $sortorder);
print_liste_field_titre($arrayfields['d.birth']['label'], $_SERVER["PHP_SELF"], "d.birth", "", $param, '', $sortfield, $sortorder, 'center nowrap ');
$totalarray['nbfield']++;
}
if (!empty($arrayfields['d.tms']['checked'])) {
print_liste_field_titre($arrayfields['d.tms']['label'], $_SERVER["PHP_SELF"], "d.tms", "", $param, 'align="center" class="nowrap"', $sortfield, $sortorder);
$totalarray['nbfield']++;
}
if (!empty($arrayfields['d.statut']['checked'])) {
print_liste_field_titre($arrayfields['d.statut']['label'], $_SERVER["PHP_SELF"], "d.statut,t.subscription,d.datefin", "", $param, 'class="right"', $sortfield, $sortorder);
print_liste_field_titre($arrayfields['d.tms']['label'], $_SERVER["PHP_SELF"], "d.tms", "", $param, '', $sortfield, $sortorder, 'center nowrap ');
$totalarray['nbfield']++;
}
if (!empty($arrayfields['d.import_key']['checked'])) {
print_liste_field_titre($arrayfields['d.import_key']['label'], $_SERVER["PHP_SELF"], "d.import_key", "", $param, '', $sortfield, $sortorder, 'center ');
$totalarray['nbfield']++;
}
if (!empty($arrayfields['d.statut']['checked'])) {
print_liste_field_titre($arrayfields['d.statut']['label'], $_SERVER["PHP_SELF"], "d.statut,t.subscription,d.datefin", "", $param, '', $sortfield, $sortorder, 'center ');
$totalarray['nbfield']++;
}
if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', 'align="center"', $sortfield, $sortorder, 'maxwidthsearch ');
print_liste_field_titre($selectedfields, $_SERVER["PHP_SELF"], "", '', '', '', $sortfield, $sortorder, 'maxwidthsearch center ');
$totalarray['nbfield']++;
}
print "</tr>\n";
@ -1143,7 +1143,8 @@ while ($i < $imaxinloop) {
$memberstatic->lastname = $obj->lastname;
$memberstatic->firstname = $obj->firstname;
$memberstatic->gender = $obj->gender;
$memberstatic->statut = $obj->statut;
$memberstatic->statut = $obj->status;
$memberstatic->status = $obj->status;
$memberstatic->datefin = $datefin;
$memberstatic->socid = $obj->fk_soc;
$memberstatic->photo = $obj->photo;
@ -1374,7 +1375,7 @@ while ($i < $imaxinloop) {
// End of subscription date
$datefin = $db->jdate($obj->datefin);
if (!empty($arrayfields['d.datefin']['checked'])) {
print '<td class="nowrap center">';
print '<td class="nowraponall center">';
if ($datefin) {
print dol_print_date($datefin, 'day');
if ($memberstatic->hasDelay()) {
@ -1384,7 +1385,7 @@ while ($i < $imaxinloop) {
} else {
if (!empty($obj->subscription)) {
print '<span class="opacitymedium">'.$langs->trans("SubscriptionNotReceived").'</span>';
if ($obj->statut > 0) {
if ($obj->status > 0) {
print " ".img_warning();
}
} else {
@ -1429,15 +1430,7 @@ while ($i < $imaxinloop) {
$totalarray['nbfield']++;
}
}
// Status
if (!empty($arrayfields['d.statut']['checked'])) {
print '<td class="nowrap right">';
print $memberstatic->LibStatut($obj->statut, $obj->subscription, $datefin, 5);
print '</td>';
if (!$i) {
$totalarray['nbfield']++;
}
}
// Import key
if (!empty($arrayfields['d.import_key']['checked'])) {
print '<td class="tdoverflowmax100 center" title="'.dol_escape_htmltag($obj->import_key).'">';
print dol_escape_htmltag($obj->import_key);
@ -1446,6 +1439,15 @@ while ($i < $imaxinloop) {
$totalarray['nbfield']++;
}
}
// Status
if (!empty($arrayfields['d.statut']['checked'])) {
print '<td class="nowrap center">';
print $memberstatic->LibStatut($obj->status, $obj->subscription, $datefin, 5);
print '</td>';
if (!$i) {
$totalarray['nbfield']++;
}
}
// Action column
if (!getDolGlobalString('MAIN_CHECKBOX_LEFT_COLUMN')) {
print '<td class="center">';

View File

@ -30,7 +30,7 @@ require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherent_type.class.php';
require_once DOL_DOCUMENT_ROOT.'/adherents/class/subscription.class.php';
require_once DOL_DOCUMENT_ROOT.'/compta/bank/class/account.class.php';
$langs->loadLangs(array("members", "companies"));
$langs->loadLangs(array("members", "companies", "banks"));
$action = GETPOST('action', 'aZ09') ? GETPOST('action', 'aZ09') : 'view'; // The action 'create'/'add', 'edit'/'update', 'view', ...
$massaction = GETPOST('massaction', 'alpha'); // The bulk action (combo box choice into lists)
@ -172,7 +172,7 @@ $accountstatic = new Account($db);
$now = dol_now();
// List of subscriptions
$sql = "SELECT d.rowid, d.login, d.firstname, d.lastname, d.societe, d.photo, d.statut,";
$sql = "SELECT d.rowid, d.login, d.firstname, d.lastname, d.societe, d.photo, d.statut as status,";
$sql .= " d.gender, d.email, d.morphy,";
$sql .= " c.rowid as crowid, c.fk_type, c.subscription,";
$sql .= " c.dateadh, c.datef, c.datec as date_creation, c.tms as date_update,";
@ -611,7 +611,8 @@ while ($i < $imaxinloop) {
$adherent->firstname = $obj->firstname;
$adherent->ref = $obj->rowid;
$adherent->id = $obj->rowid;
$adherent->statut = $obj->statut;
$adherent->statut = $obj->status;
$adherent->status = $obj->status;
$adherent->login = $obj->login;
$adherent->photo = $obj->photo;
$adherent->gender = $obj->gender;
@ -672,14 +673,14 @@ while ($i < $imaxinloop) {
}
// Ref
if (!empty($arrayfields['d.ref']['checked'])) {
print '<td>'.$subscription->getNomUrl(1).'</td>';
print '<td class="nowraponall">'.$subscription->getNomUrl(1).'</td>';
if (!$i) {
$totalarray['nbfield']++;
}
}
// Type
if (!empty($arrayfields['d.fk_type']['checked'])) {
print '<td class="nowraponall">';
print '<td class="tdoverflowmax100">';
if ($typeid > 0) {
print $adht->getNomUrl(1);
}
@ -739,14 +740,14 @@ while ($i < $imaxinloop) {
// Date start
if (!empty($arrayfields['c.dateadh']['checked'])) {
print '<td class="center">'.dol_print_date($db->jdate($obj->dateadh), 'day')."</td>\n";
print '<td class="center nowraponall">'.dol_print_date($db->jdate($obj->dateadh), 'day')."</td>\n";
if (!$i) {
$totalarray['nbfield']++;
}
}
// Date end
if (!empty($arrayfields['c.datef']['checked'])) {
print '<td class="center">'.dol_print_date($db->jdate($obj->datef), 'day')."</td>\n";
print '<td class="center nowraponall">'.dol_print_date($db->jdate($obj->datef), 'day')."</td>\n";
if (!$i) {
$totalarray['nbfield']++;
}

View File

@ -21,7 +21,7 @@
/**
* \file htdocs/admin/expensereport_ik.php
* \ingroup expensereport
* \brief Page to display expense tax ik
* \brief Page to display expense tax ik. Used when MAIN_USE_EXPENSE_IK is set.
*/
// Load Dolibarr environment
@ -38,7 +38,7 @@ $error = 0;
$action = GETPOST('action', 'aZ09');
$id = GETPOST('id', 'int');
$id = GETPOSTINT('id');
$ikoffset = (float) price2num(GETPOST('ikoffset', 'alpha'));
$coef = (float) price2num(GETPOST('coef', 'alpha'));
$fk_c_exp_tax_cat = GETPOSTINT('fk_c_exp_tax_cat');
@ -167,6 +167,7 @@ foreach ($rangesbycateg as $fk_c_exp_tax_cat => $Tab) {
echo $range->ik->ikoffset;
}
echo '</td>';
// Coef
echo '<td class="nowraponall">';
if ($action == 'edit' && $range->ik->id == $id && $range->rowid == $fk_range && $range->fk_c_exp_tax_cat == $fk_c_exp_tax_cat) {

View File

@ -166,7 +166,7 @@ if (empty($reshook)) {
$tab_apply = array(
'A' => $langs->trans('All'),
'G' => $langs->trans('Group'),
'G' => $langs->trans('UserGroup'),
'U' => $langs->trans('User')
);
$tab_rules_type = array(
@ -176,22 +176,24 @@ if (empty($reshook)) {
'EX_EXP' => $langs->trans('OnExpense')
);
}
/*
* View
*/
llxHeader('', $langs->trans("ExpenseReportsSetup"));
$form = new Form($db);
/*
* View
*/
$linkback = '<a href="' . DOL_URL_ROOT . '/admin/modules.php?restore_lastsearch_values=1">' . $langs->trans("BackToModuleList") . '</a>';
print load_fiche_titre($langs->trans("ExpenseReportsSetup"), $linkback, 'title_setup');
llxHeader('', $langs->trans("ExpenseReportsSetup"));
$head = expensereport_admin_prepare_head();
print dol_get_fiche_head($head, 'expenserules', $langs->trans("ExpenseReportsRules"), -1, 'trip');
$form = new Form($db);
echo '<span class="opacitymedium">' . $langs->trans('ExpenseReportRulesDesc') . '</span>';
print '<br><br>';
$linkback = '<a href="' . DOL_URL_ROOT . '/admin/modules.php?restore_lastsearch_values=1">' . $langs->trans("BackToModuleList") . '</a>';
print load_fiche_titre($langs->trans("ExpenseReportsSetup"), $linkback, 'title_setup');
$head = expensereport_admin_prepare_head();
print dol_get_fiche_head($head, 'expenserules', $langs->trans("ExpenseReportsRules"), -1, 'trip');
echo '<span class="opacitymedium">' . $langs->trans('ExpenseReportRulesDesc') . '</span>';
print '<br><br>';
if ($action != 'edit') {
echo '<form action="' . $_SERVER['PHP_SELF'] . '" method="post">';
@ -232,26 +234,29 @@ if ($action != 'edit') {
}
echo '<form action="' . $_SERVER['PHP_SELF'] . '" method="post">';
echo '<input type="hidden" name="token" value="' . newToken() . '" />';
echo '<form action="' . $_SERVER['PHP_SELF'] . '" method="post">';
echo '<input type="hidden" name="token" value="' . newToken() . '" />';
if ($action == 'edit') {
echo '<input type="hidden" name="id" value="' . $object->id . '" />';
echo '<input type="hidden" name="action" value="save" />';
}
echo '<table class="noborder centpercent">';
print dol_fiche_end();
echo '<tr class="liste_titre expensereportrules">';
echo '<th class="linecolapplyto">' . $langs->trans('ExpenseReportApplyTo') . '</th>';
echo '<th class="linecoltype">' . $langs->trans('Type') . '</th>';
echo '<th class="linecollimiton">' . $langs->trans('ExpenseReportLimitOn') . '</th>';
echo '<th class="linecoldatestart">' . $langs->trans('ExpenseReportDateStart') . '</th>';
echo '<th class="linecoldateend">' . $langs->trans('ExpenseReportDateEnd') . '</th>';
echo '<th class="linecollimitamount">' . $langs->trans('ExpenseReportLimitAmount') . '</th>';
echo '<th class="linecolrestrictive">' . $langs->trans('ExpenseReportRestrictive') . '</th>';
echo '<th>&nbsp;</th>';
echo '</tr>';
echo '<table class="noborder centpercent">';
echo '<tr class="liste_titre expensereportrules">';
echo '<th class="linecolapplyto">' . $langs->trans('ExpenseReportApplyTo') . '</th>';
echo '<th class="linecoltype">' . $langs->trans('Type') . '</th>';
echo '<th class="linecollimiton">' . $langs->trans('ExpenseReportLimitOn') . '</th>';
echo '<th class="linecoldatestart">' . $langs->trans('ExpenseReportDateStart') . '</th>';
echo '<th class="linecoldateend">' . $langs->trans('ExpenseReportDateEnd') . '</th>';
echo '<th class="linecollimitamount">' . $langs->trans('ExpenseReportLimitAmount') . '</th>';
echo '<th class="linecolrestrictive">' . $langs->trans('ExpenseReportRestrictive') . '</th>';
echo '<th>&nbsp;</th>';
echo '</tr>';
foreach ($rules as $rule) {
echo '<tr class="oddeven linetrdata" id="'.$rule->id.'">';
@ -273,7 +278,6 @@ foreach ($rules as $rule) {
}
echo '</td>';
echo '<td class="linecoltype">';
if ($action == 'edit' && $object->id == $rule->id) {
echo $form->selectExpense($object->fk_c_type_fees, 'fk_c_type_fees', 0, 1, 1);
@ -351,11 +355,14 @@ foreach ($rules as $rule) {
echo '</tr>';
}
if (count($rules) == 0) {
print '<tr class="none"><td colspan="8"><span class="opacitymedium">'.$langs->trans("None").'</span></td></tr>';
}
echo '</table>';
echo '</form>';
echo '</table>';
echo '</form>';
echo '<script type="text/javascript"> $(function() {
echo '<script type="text/javascript"> $(function() {
$("#apply_to").change(function() {
var value = $(this).val();
if (value == "A") {

View File

@ -39,7 +39,7 @@ if ($user->socid > 0) {
}
$backtopage = GETPOST('backtopage', 'alpha');
$cancel = GETPOST('cancel', 'aplha');
$cancel = GETPOST('cancel', 'alpha');
$action = GETPOST('action', 'aZ09');
// Security check

View File

@ -94,7 +94,7 @@ $search_date_when_end = dol_mktime(23, 59, 59, $search_date_when_endmonth, $sear
$search_recurring = GETPOST('search_recurring', 'int');
$search_frequency = GETPOST('search_frequency', 'alpha');
$search_unit_frequency = GETPOST('search_unit_frequency', 'alpha');
$search_nb_gen_done = GETPOST('search_nb_gen_done', 'aplha');
$search_nb_gen_done = GETPOST('search_nb_gen_done', 'alpha');
$search_status = GETPOST('search_status', 'int');
$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit;

View File

@ -10374,7 +10374,8 @@ class Form
global $langs;
$out = '';
$sql = "SELECT id, code, label FROM " . $this->db->prefix() . "c_type_fees";
$sql = "SELECT id, code, label";
$sql .= " FROM ".$this->db->prefix()."c_type_fees";
$sql .= " WHERE active = 1";
$resql = $this->db->query($sql);
@ -10397,6 +10398,8 @@ class Form
$out .= '<option ' . ($selected == $obj->{$field} ? 'selected="selected"' : '') . ' value="' . $obj->{$field} . '">' . ($key != $obj->code ? $key : $obj->label) . '</option>';
}
$out .= '</select>';
$out .= ajax_combobox('select_'.$htmlname);
} else {
dol_print_error($this->db);
}

View File

@ -43,25 +43,7 @@ function check_user_password_http($usertotest, $passwordtotest, $entitytotest)
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
// Note: Test on validity is done later natively with isNotIntoValidityDateRange() by core after calling checkLoginPassEntity() that call this method
/*
$tmpuser = new User($db);
$tmpuser->fetch('', $login, '', 1, ($entitytotest > 0 ? $entitytotest : -1));
$now = dol_now();
if ($tmpuser->datestartvalidity && $db->jdate($tmpuser->datestartvalidity) >= $now) {
// Load translation files required by the page
$langs->loadLangs(array('main', 'errors'));
$_SESSION["dol_loginmesg"] = $langs->transnoentitiesnoconv("ErrorLoginDateValidity");
return '--bad-login-validity--';
}
if ($tmpuser->dateendvalidity && $db->jdate($tmpuser->dateendvalidity) <= dol_get_first_hour($now)) {
// Load translation files required by the page
$langs->loadLangs(array('main', 'errors'));
$_SESSION["dol_loginmesg"] = $langs->transnoentitiesnoconv("ErrorLoginDateValidity");
return '--bad-login-validity--';
}
*/
// Note: Test on date validity is done later natively with isNotIntoValidityDateRange() by core after calling checkLoginPassEntity() that call this method
}
return $login;

View File

@ -162,26 +162,7 @@ function check_user_password_ldap($usertotest, $passwordtotest, $entitytotest)
require_once DOL_DOCUMENT_ROOT.'/core/lib/date.lib.php';
// Note: Test on validity is done later natively with isNotIntoValidityDateRange() by core after calling checkLoginPassEntity() that call this method
/*
$tmpuser = new User($db);
$tmpuser->fetch('', $login, '', 1, ($entitytotest > 0 ? $entitytotest : -1));
$now = dol_now();
if ($tmpuser->datestartvalidity && $db->jdate($tmpuser->datestartvalidity) >= $now) {
$ldap->unbind();
// Load translation files required by the page
$langs->loadLangs(array('main', 'errors'));
$_SESSION["dol_loginmesg"] = $langs->transnoentitiesnoconv("ErrorLoginDateValidity");
return '--bad-login-validity--';
}
if ($tmpuser->dateendvalidity && $db->jdate($tmpuser->dateendvalidity) <= dol_get_first_hour($now)) {
$ldap->unbind();
// Load translation files required by the page
$langs->loadLangs(array('main', 'errors'));
$_SESSION["dol_loginmesg"] = $langs->transnoentitiesnoconv("ErrorLoginDateValidity");
return '--bad-login-validity--';
}*/
// Note: Test on date validity is done later natively with isNotIntoValidityDateRange() by core after calling checkLoginPassEntity() that call this method
// ldap2dolibarr synchronisation
if ($login && !empty($conf->ldap->enabled) && getDolGlobalInt('LDAP_SYNCHRO_ACTIVE') == Ldap::SYNCHRO_LDAP_TO_DOLIBARR) { // ldap2dolibarr synchronization

View File

@ -80,20 +80,7 @@ function check_user_password_openid($usertotest, $passwordtotest, $entitytotest)
if ($resql) {
$obj = $db->fetch_object($resql);
if ($obj) {
// Note: Test on validity is done later natively with isNotIntoValidityDateRange() by core after calling checkLoginPassEntity() that call this method
/* $now = dol_now();
if ($obj->datestartvalidity && $db->jdate($obj->datestartvalidity) > $now) {
// Load translation files required by the page
$langs->loadLangs(array('main', 'errors'));
$_SESSION["dol_loginmesg"] = $langs->transnoentitiesnoconv("ErrorLoginDateValidity");
return '--bad-login-validity--';
}
if ($obj->dateendvalidity && $db->jdate($obj->dateendvalidity) < dol_get_first_hour($now)) {
// Load translation files required by the page
$langs->loadLangs(array('main', 'errors'));
$_SESSION["dol_loginmesg"] = $langs->transnoentitiesnoconv("ErrorLoginDateValidity");
return '--bad-login-validity--';
} */
// Note: Test on date validity is done later natively with isNotIntoValidityDateRange() by core after calling checkLoginPassEntity() that call this method
$login = $obj->login;
}
}

View File

@ -98,20 +98,7 @@ function check_user_password_openid_connect($usertotest, $passwordtotest, $entit
if ($resql) {
$obj = $db->fetch_object($resql);
if ($obj) {
// Note: Test on validity is done later natively with isNotIntoValidityDateRange() by core after calling checkLoginPassEntity() that call this method
/* $now = dol_now();
if ($obj->datestartvalidity && $db->jdate($obj->datestartvalidity) > $now) {
// Load translation files required by the page
$langs->loadLangs(array('main', 'errors'));
$_SESSION["dol_loginmesg"] = $langs->transnoentitiesnoconv("ErrorLoginDateValidity");
return '--bad-login-validity--';
}
if ($obj->dateendvalidity && $db->jdate($obj->dateendvalidity) < dol_get_first_hour($now)) {
// Load translation files required by the page
$langs->loadLangs(array('main', 'errors'));
$_SESSION["dol_loginmesg"] = $langs->transnoentitiesnoconv("ErrorLoginDateValidity");
return '--bad-login-validity--';
} */
// Note: Test on date validity is done later natively with isNotIntoValidityDateRange() by core after calling checkLoginPassEntity() that call this method
$login = $obj->login;
}
}

View File

@ -273,6 +273,8 @@ class ExpenseReportIk extends CommonObject
if ($obj->fk_expense_ik > 0) {
$ik->fetch($obj->fk_expense_ik);
}
// TODO Set a $tmparay = new stdObj(); and use it to fill $ranges array
$obj->ik = $ik;
if (!isset($ranges[$obj->fk_c_exp_tax_cat])) {

View File

@ -93,7 +93,7 @@ $search_date_when_end = dol_mktime(23, 59, 59, $search_date_when_endmonth, $sear
$search_recurring = GETPOST('search_recurring', 'int');
$search_frequency = GETPOST('search_frequency', 'alpha');
$search_unit_frequency = GETPOST('search_unit_frequency', 'alpha');
$search_nb_gen_done = GETPOST('search_nb_gen_done', 'aplha');
$search_nb_gen_done = GETPOST('search_nb_gen_done', 'alpha');
$search_status = GETPOST('search_status', 'int');
$limit = GETPOST('limit', 'int') ? GETPOST('limit', 'int') : $conf->liste_limit;