Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
commit
663dfe2984
3 changed files with 9 additions and 8 deletions
|
|
@ -4,7 +4,7 @@
|
|||
* Copyright (C) 2004-2020 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2019 Nicolas ZABOURI <info@inovea-conseil.com>
|
||||
* Copyright (C) 2021 Frédéric France <frederic.france@netlgic.fr>
|
||||
* Copyright (C) 2021-2023 Frédéric France <frederic.france@netlgic.fr>
|
||||
* Copyright (C) 2021-2023 Waël Almoman <info@almoman.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
|
@ -53,11 +53,11 @@ $result = restrictedArea($user, 'adherent');
|
|||
* Actions
|
||||
*/
|
||||
|
||||
$userid = GETPOST('userid', 'int');
|
||||
if (GETPOST('addbox')) {
|
||||
// Add box (when submit is done from a form when ajax disabled)
|
||||
require_once DOL_DOCUMENT_ROOT.'/core/class/infobox.class.php';
|
||||
$zone = GETPOST('areacode', 'int');
|
||||
$userid = GETPOST('userid', 'int');
|
||||
$boxorder = GETPOST('boxorder', 'aZ09');
|
||||
$boxorder .= GETPOST('boxcombo', 'aZ09');
|
||||
$result = InfoBox::saveboxorder($db, $zone, $boxorder, $userid);
|
||||
|
|
@ -95,7 +95,7 @@ if ($conf->use_javascript_ajax) {
|
|||
|
||||
$boxgraph .='<div class="div-table-responsive-no-min">';
|
||||
$boxgraph .='<table class="noborder nohover centpercent">';
|
||||
$boxgraph .='<tr class="liste_titre"><th colspan="2">'.$langs->trans("Statistics").($numberyears ? ' ('.$year-$numberyears.' - '.$year.')' : '').'</th></tr>';
|
||||
$boxgraph .='<tr class="liste_titre"><th colspan="2">'.$langs->trans("Statistics").($numberyears ? ' ('.($year-$numberyears).' - '.$year.')' : '').'</th></tr>';
|
||||
$boxgraph .='<tr><td class="center" colspan="2">';
|
||||
|
||||
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherentstats.class.php';
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@
|
|||
/* Copyright (C) 2003-2007 Rodolphe Quiedeville <rodolphe@quiedeville.org>
|
||||
* Copyright (C) 2004-2017 Laurent Destailleur <eldy@users.sourceforge.net>
|
||||
* Copyright (C) 2005-2012 Regis Houssin <regis.houssin@inodbox.com>
|
||||
* Copyright (C) 2015-2020 Frederic France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2015-2023 Frederic France <frederic.france@netlogic.fr>
|
||||
* Copyright (C) 2021-2023 Waël Almoman <info@almoman.com>
|
||||
*
|
||||
* This program is free software; you can redistribute it and/or modify
|
||||
|
|
@ -88,10 +88,11 @@ class box_members_by_type extends ModeleBoxes
|
|||
require_once DOL_DOCUMENT_ROOT . '/adherents/class/adherent_type.class.php';
|
||||
$staticmember = new Adherent($this->db);
|
||||
|
||||
$now = dol_now();
|
||||
$year = date('Y');
|
||||
$numberyears = getDolGlobalInt("MAIN_NB_OF_YEAR_IN_MEMBERSHIP_WIDGET_GRAPH");
|
||||
|
||||
$this->info_box_head = array('text' => $langs->trans("BoxTitleMembersByType").($numberyears ? ' ('.$year-$numberyears.' - '.$year.')' : ''));
|
||||
$this->info_box_head = array('text' => $langs->trans("BoxTitleMembersByType").($numberyears ? ' ('.($year-$numberyears).' - '.$year.')' : ''));
|
||||
|
||||
if ($user->rights->adherent->lire) {
|
||||
require_once DOL_DOCUMENT_ROOT.'/adherents/class/adherentstats.class.php';
|
||||
|
|
@ -117,13 +118,13 @@ class box_members_by_type extends ModeleBoxes
|
|||
'text' => $labelstatus,
|
||||
);
|
||||
// Up to date
|
||||
$labelstatus = $staticmember->LibStatut($staticmember::STATUS_VALIDATED, 1, dol_now() + 86400, 1);
|
||||
$labelstatus = $staticmember->LibStatut($staticmember::STATUS_VALIDATED, 1, $now + 86400, 1);
|
||||
$this->info_box_contents[$line][] = array(
|
||||
'td' => 'class="right tdoverflowmax100" width="10%" title="'.dol_escape_htmltag($labelstatus).'"',
|
||||
'text' => $labelstatus,
|
||||
);
|
||||
// Expired
|
||||
$labelstatus = $staticmember->LibStatut($staticmember::STATUS_VALIDATED, 1, dol_now() - 86400, 1);
|
||||
$labelstatus = $staticmember->LibStatut($staticmember::STATUS_VALIDATED, 1, $now - 86400, 1);
|
||||
$this->info_box_contents[$line][] = array(
|
||||
'td' => 'class="right tdoverflowmax100" width="10%" title="'.dol_escape_htmltag($labelstatus).'"',
|
||||
'text' => $labelstatus
|
||||
|
|
|
|||
|
|
@ -7728,7 +7728,7 @@ class Form
|
|||
$out = '';
|
||||
$outarray = array();
|
||||
|
||||
$selectFields = " p.rowid, p.ref, p.firstname, p.lastname";
|
||||
$selectFields = " p.rowid, p.ref, p.firstname, p.lastname, p.fk_adherent_type";
|
||||
|
||||
$sql = "SELECT ";
|
||||
$sql .= $selectFields;
|
||||
|
|
|
|||
Loading…
Reference in a new issue