-
-
Notifications
You must be signed in to change notification settings - Fork 2.8k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into fix-email-sendscript
- Loading branch information
Showing
69 changed files
with
476 additions
and
327 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ | |
* Copyright (c) 2005-2011 Laurent Destailleur <[email protected]> | ||
* Copyright (C) 2005-2009 Regis Houssin <[email protected]> | ||
* Copyright (C) 2023 Waël Almoman <[email protected]> | ||
* Copyright (C) 2024 MDW <[email protected]> | ||
* | ||
* 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 | ||
|
@@ -168,15 +169,15 @@ public function getAllByYear() | |
/** | ||
* Return count of member by status group by adh type, total and average | ||
* | ||
* @param int $numberYears Number of years to scan (0 = all) | ||
* @return array Array with total of draft, pending, uptodate, expired, resiliated for each member type | ||
* @param int $numberYears Number of years to scan (0 = all) | ||
* @return array<string,array{label:string,members_draft:int,members_pending:0,members_uptodate:int,members_expired:int,members_excluded:int,members_resiliated:int,all?:float|int,total_adhtag:float|int}> Array with total of draft, pending, uptodate, expired, resiliated for each member type | ||
*/ | ||
public function countMembersByTypeAndStatus($numberYears = 0) | ||
{ | ||
global $user; | ||
|
||
$now = dol_now(); | ||
$endYear = date('Y'); | ||
$endYear = (int) date('Y'); | ||
$startYear = $endYear - $numberYears; | ||
|
||
$sql = "SELECT t.rowid as fk_adherent_type, t.libelle as label"; | ||
|
@@ -224,7 +225,7 @@ public function countMembersByTypeAndStatus($numberYears = 0) | |
'members_resiliated' => (int) $objp->members_resiliated | ||
); | ||
$totalrow = 0; | ||
foreach ($MembersCountArray[$objp->fk_adherent_type] as $key=>$nb) { | ||
foreach ($MembersCountArray[$objp->fk_adherent_type] as $key => $nb) { | ||
if ($key != 'label') { | ||
$totalrow += $nb; | ||
$totalstatus[$key] += $nb; | ||
|
@@ -244,16 +245,17 @@ public function countMembersByTypeAndStatus($numberYears = 0) | |
/** | ||
* Return count of member by status group by adh type, total and average | ||
* | ||
* @param int $numberYears Number of years to scan (0 = all) | ||
* @return array Array with total of draft, pending, uptodate, expired, resiliated for each member tag | ||
* @param int $numberYears Number of years to scan (0 = all) | ||
* @return array<string,array{label:string,members_draft:int,members_pending:0,members_uptodate:int,members_expired:int,members_excluded:int,members_resiliated:int,all?:float|int,total_adhtag:float|int}> Array with total of draft, pending, uptodate, expired, resiliated for each member tag | ||
*/ | ||
public function countMembersByTagAndStatus($numberYears = 0) | ||
{ | ||
global $user; | ||
|
||
$now = dol_now(); | ||
$endYear = date('Y'); | ||
$endYear = (int) date('Y'); | ||
$startYear = $endYear - $numberYears; | ||
$MembersCountArray = []; | ||
|
||
$sql = "SELECT c.rowid as fk_categorie, c.label as label"; | ||
$sql .= ", COUNT(".$this->db->ifsql("d.statut = ".Adherent::STATUS_DRAFT, "'members_draft'", 'NULL').") as members_draft"; | ||
|
@@ -282,7 +284,6 @@ public function countMembersByTagAndStatus($numberYears = 0) | |
if ($result) { | ||
$num = $this->db->num_rows($result); | ||
$i = 0; | ||
$MembersCountArray = []; | ||
$totalstatus = array( | ||
'label' => 'Total', | ||
'members_draft' => 0, | ||
|
@@ -304,7 +305,7 @@ public function countMembersByTagAndStatus($numberYears = 0) | |
'members_resiliated' => (int) $objp->members_resiliated | ||
); | ||
$totalrow = 0; | ||
foreach ($MembersCountArray[$objp->fk_categorie] as $key=>$nb) { | ||
foreach ($MembersCountArray[$objp->fk_categorie] as $key => $nb) { | ||
if ($key != 'label') { | ||
$totalrow += $nb; | ||
$totalstatus[$key] += $nb; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,6 +6,7 @@ | |
* Copyright (C) 2014-2016 Juanjo Menent <[email protected]> | ||
* Copyright (C) 2018 Alexandre Spangaro <[email protected]> | ||
* Copyright (C) 2021-2023 Frédéric France <[email protected]> | ||
* Copyright (C) 2024 MDW <[email protected]> | ||
* | ||
* 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 | ||
|
@@ -203,6 +204,7 @@ | |
} | ||
} | ||
$arrayfields = dol_sort_array($arrayfields, 'position'); | ||
'@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields'; // dol_sort_array looses type for Phan | ||
//var_dump($arrayfields);exit; | ||
|
||
// Security check | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ | |
* Copyright (C) 2020 Thibault FOUCART <[email protected]> | ||
* Copyright (C) 2022 ATM Consulting <[email protected]> | ||
* Copyright (C) 2022 OpenDSI <[email protected]> | ||
* Copyright (C) 2024 MDW <[email protected]> | ||
* | ||
* 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 | ||
|
@@ -410,6 +411,7 @@ public function postLines($id, $request_data = null) | |
} | ||
|
||
$errors = []; | ||
$updateRes = 0; | ||
$this->db->begin(); | ||
|
||
foreach ($request_data as $TData) { | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,6 +5,7 @@ | |
* Copyright (C) 2015 Jean-François Ferry <[email protected]> | ||
* Copyright (C) 2018 Ferran Marcet <[email protected]> | ||
* Copyright (C) 2020 Tobias Sekan <[email protected]> | ||
* Copyright (C) 2024 MDW <[email protected]> | ||
* | ||
* 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 | ||
|
@@ -125,6 +126,7 @@ | |
|
||
$object->fields = dol_sort_array($object->fields, 'position'); | ||
$arrayfields = dol_sort_array($arrayfields, 'position'); | ||
'@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields'; // dol_sort_array looses type for Phan | ||
|
||
$permissiontoadd = $user->hasRight('banque', 'modifier'); | ||
$permissiontodelete = $user->hasRight('banque', 'configurer'); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -3,6 +3,7 @@ | |
* Copyright (C) 2017 Laurent Destailleur <[email protected]> | ||
* Copyright (C) 2018 Frédéric France <[email protected]> | ||
* Copyright (C) 2020 Tobias Sekan <[email protected]> | ||
* Copyright (C) 2024 MDW <[email protected]> | ||
* | ||
* 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 | ||
|
@@ -172,6 +173,7 @@ | |
); | ||
|
||
$arrayfields = dol_sort_array($arrayfields, 'position'); | ||
'@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields'; // dol_sort_array looses type for Phan | ||
|
||
// Security check | ||
$socid = GETPOSTINT("socid"); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,7 @@ | |
* Copyright (C) 2015-2021 Alexandre Spangaro <[email protected]> | ||
* Copyright (C) 2016 Meziane Sof <[email protected]> | ||
* Copyright (C) 2023 William Mead <[email protected]> | ||
* Copyright (C) 2024 MDW <[email protected]> | ||
* | ||
* 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 | ||
|
@@ -161,6 +162,7 @@ | |
|
||
$object->fields = dol_sort_array($object->fields, 'position'); | ||
$arrayfields = dol_sort_array($arrayfields, 'position'); | ||
'@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields'; // dol_sort_array looses type for Phan | ||
|
||
if ($socid > 0) { | ||
$tmpthirdparty = new Societe($db); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,6 +4,7 @@ | |
* Copyright (C) 2009-2012 Regis Houssin <[email protected]> | ||
* Copyright (C) 2014 Alexandre Spangaro <[email protected]> | ||
* Copyright (C) 2016 Juanjo Menent <[email protected]> | ||
* Copyright (C) 2024 MDW <[email protected]> | ||
* | ||
* 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 | ||
|
@@ -99,6 +100,7 @@ | |
'bc.statut' => array('label' => "Status", 'checked' => 1, 'position' => 70) | ||
); | ||
$arrayfields = dol_sort_array($arrayfields, 'position'); | ||
'@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields'; // dol_sort_array looses type for Phan | ||
|
||
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context | ||
$hookmanager->initHooks(array('chequelist')); | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,6 +9,7 @@ | |
* Copyright (C) 2018-2021 Ferran Marcet <[email protected]> | ||
* Copyright (C) 2018 Charlene Benke <[email protected]> | ||
* Copyright (C) 2020 Tobias Sekan <[email protected]> | ||
* Copyright (C) 2024 MDW <[email protected]> | ||
* | ||
* 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 | ||
|
@@ -110,6 +111,7 @@ | |
'p.statut' => array('label' => "Status", 'checked' => 1, 'position' => 90, 'enabled' => (getDolGlobalString('BILL_ADD_PAYMENT_VALIDATION'))), | ||
); | ||
$arrayfields = dol_sort_array($arrayfields, 'position'); | ||
'@phan-var-force array<string,array{label:string,checked?:int<0,1>,position?:int,help?:string}> $arrayfields'; // dol_sort_array looses type for Phan | ||
|
||
// Initialize technical object to manage hooks of page. Note that conf->hooks_modules contains array of hook context | ||
$hookmanager->initHooks(array('paymentlist')); | ||
|
Oops, something went wrong.