Skip to content

Commit

Permalink
Merge branch 'develop' into develop
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy authored Mar 8, 2024
2 parents a2aecbc + d93fd18 commit 2a916f9
Show file tree
Hide file tree
Showing 368 changed files with 4,621 additions and 3,699 deletions.
4 changes: 4 additions & 0 deletions ChangeLog
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,10 @@ The following changes may create regressions for some external modules, but were
* All CLI tools (into /scripts) return a positive value to the shell if error (0 remains success) for a better
cross platform compatibility. On linux the exit(-1) was caught as 255, it may be now exit(1) so will be caught as 1.
* the parameter $filter of method fetchAll does not accept array of SQL but must be a string of an Universal Search Filter syntax.
* Use of dol_eval with parameter $returnvalue=0 is deprecated.
* The signature for all ->delete() method has been modified to match the modulebuilder template (so first paramis now always $user), except
the delete for thirdparty (still accept the id of thirdparty to delete as first parameter). Will probably be modified into another version.
* Route for API /thirdparties/gateways has been renamed into /thirdparties/accounts


***** ChangeLog for 19.0.1 compared to 19.0.0 *****
Expand Down
13 changes: 7 additions & 6 deletions dev/setup/pre-commit/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,16 +23,17 @@ the project: `pre-commit-config.yaml`.

### Installation in your git project

1. Install `pre-commit` tool.\
1. Install pre-commit tool.\
If you do not have python installed, install [python](https://www.python.org) first.\
If you do not have [`pip`](https://pypi.org/project/pip), install that as well.\\

Then you can install pre-commit tool: `python -m pip install pre-commit`.
Then you can install pre-commit tool:
`python3 -m pip install pre-commit`

2. In your local git clone of the project, run `pre-commit install` to add the hooks.\
or copy the file git/hooks/pre-commit manually. (recommended because this file differs
from the file installed with pre-commit install as it redirects output to the error
channel so your IDE will be able to catch the error.
2. In your local git clone of the project, run `pre-commit install` to add the hooks
or copy the file *dev/setup/git/hooks/pre-commit* manually into *.git/hooks/pre-commit*
(recommended because this file may differ from the file installed with the pre-commit install).
The good file redirects output to the error channel so your IDE will be able to catch the error.


### Tips
Expand Down
3 changes: 3 additions & 0 deletions dev/tools/apstats.php
Original file line number Diff line number Diff line change
Expand Up @@ -685,6 +685,9 @@
foreach ($phan_notices as $notice) {
if (!empty($notice['location'])) {
$path = $notice['location']['path'];
if ($path == 'internal') {
continue;
}
$line_start = $notice['location']['lines']['begin'];
$line_end = $notice['location']['lines']['end'];
if ($line_start == $line_end) {
Expand Down
16 changes: 14 additions & 2 deletions dev/tools/codespell/codespell-lines-ignore.txt
Original file line number Diff line number Diff line change
Expand Up @@ -56,7 +56,7 @@
$this->datea = $this->db->jdate($obj->datea);
$this->datee = $this->db->jdate($obj->datee);
$this->periode = $this->db->jdate($obj->period);
$tmp = array('id_users'=>$obj->id_users, 'nom'=>$obj->name, 'reponses'=>$obj->reponses);
$tmp = array('id_users' => $obj->id_users, 'nom' => $obj->name, 'reponses' => $obj->reponses);
$tmpfiles = dol_dir_list($tmpdir, 'files', 0, '\.od(s|t)$', '', 'name', SORT_ASC, 0, true); // Disable hook for the moment
//si les reponses ne concerne pas la colonne effacée, on concatenate
GETPOST("mouvement", 'alpha'),
Expand All @@ -73,6 +73,8 @@
$datee = dol_get_last_day(GETPOSTINT('yeartoexport'), GETPOSTINT('monthtoexport') ? GETPOSTINT('monthtoexport') : 12);
$datesubscription = dol_mktime(12, 0, 0, GETPOSTINT("remonth"), GETPOSTINT("reday"), GETPOSTINT("reyear"));
$ensemblereponses = $obj->reponses;
$field = preg_replace('/(:[!<>=\s]+:|:in:|:notin:|:like:|:notlike:).*$/', '', $tmpcrit); // the name of the field
$newcrit = preg_replace('/(:[!<>=\s]+:|:in:|:notin:|:like:|:notlike:)/', '', $tmpcrit);
$object->datee = $datee;
$object->periode = $dateperiod;
$return .= '<br><span class="opacitymedium">'.$langs->trans("Payement").'</span> : <span class="info-box-label">'.$this->type_payment.'</span>';
Expand All @@ -97,16 +99,19 @@
$taskstatic->datee = $db->jdate($obj->date_end);
$this->category->childs = array();
$this->datea = dol_now();
$tmpcrit = preg_replace('/^.*(:[!<>=\s]+:|:in:|:notin:|:like:|:notlike:)/', '\1', $tmpcrit); // the condition after the name of the field
'datee' => $date_end,
// mise a jour des reponses utilisateurs dans la base
if (!empty($arrayfields['t.datee']['checked'])) {
if ($user->hasRight('stock', 'mouvement', 'lire')) {
if (empty($reyear) || empty($remonth) || empty($reday)) {
jQuery("#mouvement").change(function() {
preg_match('/:([!<>=\s]+|in|notin|like|notlike):/', $tmpcrit, $reg);
print $form->selectDate($object->periode, 'period', 0, 0, 0, 'charge', 1);
print '<a class="butAction" href="'.$_SERVER["PHP_SELF"].'?id='.$id.'&action=transfert">'.$langs->trans("TransferStock").'</a>';
print '<span class="opacitymedium">'.$langs->trans("ClinkOnALinkOfColumn", $langs->transnoentitiesnoconv("Referers")).'</span>';
print '<td class="center nowraponall">'.dol_print_date($db->jdate($obj->periode), 'day').'</td>';
print '<tr><td>'.$langs->trans("AddIn").'</td><td>';
print dol_print_date($object->periode, "day");
$TWeek[$week_number] = $week_number;
$action = 'transfert';
Expand Down Expand Up @@ -174,6 +179,8 @@
if (in_array('01', $TWeek) && in_array('52', $TWeek) && $weekNb == '01') {
print $form->selectDate(strtotime(date('Y-m-d', $object->datee)), 'end', '', '', 0, '', 1, 0);
print $object->datee ? dol_print_date($object->datee, 'daytext') : '&nbsp;';
print '<input type="hidden" name="action" value="addin">';
print '<tr><td>'.$langs->trans("AddIn").'</td><td>';
print '<tr><td>'.$langs->trans("Datee").'</td>';
print_liste_field_titre($arrayfields['t.datee']['label'], $_SERVER["PHP_SELF"], "t.datee", '', $param, '', $sortfield, $sortorder, 'center ');
* @param string $datee End date (ex 23:59:59)
Expand All @@ -189,6 +196,8 @@
$datepaye = dol_mktime(GETPOSTINT("rehour"), GETPOSTINT("remin"), GETPOSTINT("resec"), GETPOSTINT("remonth"), GETPOSTINT("reday"), GETPOSTINT("reyear"), 'tzuserrel');
$ensemblereponses = $obj->reponses;
$head[$h][1] = $langs->trans('Referers');
$inj += preg_match('/on(dblclick|drop|durationchange|emptied|end|ended|error|focus|focusin|focusout|formdata|gotpointercapture|hashchange|input|invalid)[a-z]*\s*=/i', $tmpval);
$inj += preg_match('/on(dblclick|drop|durationchange|emptied|end|ended|error|focus|focusin|focusout|formdata|gotpointercapture|hashchange|input|invalid)[a-z]*\s*=/i', $val);
$morewherefilterarray[] = " t.datee <= '".$db->idate($search_date_end_end)."'";
$morewherefilterarray[] = " t.datee >= '".$db->idate($search_date_end_start)."'";
$opensurveysondage->mail_admin = $_SESSION['adresse'];
Expand Down Expand Up @@ -221,7 +230,8 @@
$sql2 .= " s.logo, s.email, s.entity, p.fk_user_creat, p.public, p.fk_statut, p.fk_opp_status, p.opp_percent, p.opp_amount, p.dateo, p.datee";
$title = $langs->trans('Batch')." ".$shortlabel." - ".$langs->trans('Referers');
$totalforvisibletasks = projectLinesPerMonth($j, $firstdaytoshow, $usertoprocess, 0, $tasksarray, $level, $projectsrole, $tasksrole, $mine, $restrictviewformytask, $isavailable, 0, $TWeek);
'cs.periode' =>array('label'=>"PeriodEndDate", 'checked'=>1, 'position'=>50),
$value = preg_replace('/([a-z\.]+)\s*([!<>=]+|in|notin|like|notlike)\s*/', '\1:\2:', $value); // Clean string 'x < 10' into 'x:<:10' so we can then explode on space to get all AND tests to do
'cs.periode' => array('label' => "PeriodEndDate", 'checked' => 1, 'position' => 50),
't.datee'=>array('label'=>"Deadline", 'checked'=>1, 'position'=>101),
't.datee'=>array('label'=>"Deadline", 'checked'=>1, 'position'=>5),
// Ligne de la periode d'analyse du rapport
Expand All @@ -233,13 +243,15 @@
foreach ($TWeek as $week_number) {
if (!empty($arrayfields['t.datee']['checked'])) {
if ($action == "transfert") {
if ($object->id > 0 && $action == 'addin') {
if (GETPOST('reday')) {
if (GETPOSTINT("reyear") && GETPOSTINT("remonth") && GETPOSTINT("reday")) {
print $form->selectDate($datee, 'datee', 0, 0, 1, '', 1, 0, 0, '', '', '', '', 1, '', $langs->trans("to"));
print '<option value="1"'.(GETPOST('mouvement') ? ' selected="selected"' : '').'>'.$langs->trans("Delete").'</option>';
print '<select name="mouvement" id="mouvement" class="minwidth100 valignmiddle">';
print '<td class="left" width="25%">'.$langs->trans("Referers").'</td>';
print '<td class="right">'.$langs->trans("NbOfMembers").' <span class="opacitymedium">('.$langs->trans("AllTime").')</span></td>';
print '<tr><td>'.$langs->trans("AddIn").'</td><td>';
print '<tr><td>'.$langs->trans("Period")."</td><td>".dol_print_date($charge->periode, 'day')."</td></tr>\n";
print ajax_combobox("mouvement");
print_liste_field_titre("Employee", $_SERVER["PHP_SELF"], "u.lastname,cs.periode", "", $param, 'class="left"', $sortfield, $sortorder);
Expand Down
Loading

0 comments on commit 2a916f9

Please sign in to comment.