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 Jul 20, 2024
2 parents d7cb64c + 87065f0 commit cf024ea
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 21 deletions.
21 changes: 11 additions & 10 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -235,25 +235,26 @@ repos:
- id: shellcheck
args: [-W, "100"]

# Check sql file syntax
- repo: https://github.com/sqlfluff/sqlfluff
rev: 3.0.4
hooks:
- id: sqlfluff-lint
stages: [pre-commit, manual] # manual needed for ci
exclude: (?x)^
(htdocs/includes/.*
|htdocs/install/doctemplates/websites/.*_template
(dev/initdemo/mysqldump_.*\.sql
|htdocs/core/menus/init_menu_auguria\.sql
|htdocs/install/doctemplates/websites/website_template-.*\.sql
|(htdocs/install/mysql/data/(llx_20_c_departements\.sql
|llx_accounting_account_.*\.sql)
|(htdocs/install/mysql/migration/3\.[256]\.0-.*\.sql)
)
|htdocs/includes/.*
|htdocs/install/doctemplates/websites/.*_template
|htdocs/install/doctemplates/websites/website_template.*\.sql
|htdocs/install/mysql/data/llx_20_c_departements\.sql
|htdocs/install/mysql/data/llx_accounting_account_.*\.sql
|htdocs/install/mysql/migration/3\..*\.sql
|htdocs/install/mysql/migration/(1[0-5]|[456789])\.0\.0-.*\.sql
|htdocs/install/mysql/migration/3\.([0134789])\.0-.*\.sql
|htdocs/install/mysql/migration/repair\.sql
|htdocs/install/mysql/tables/llx_bookcal_availabilities-bookcal\.sql
|htdocs/install/mysql/tables/llx_categorie(_(account|actioncomm|contact|fournisseur|knowledgemanagement-knowledgemanagement|member|product|project|societe|ticket-ticket|user|warehouse|website_page-website)?\.key\.sql)
|htdocs/install/mysql/tables/llx_categorie.*\.key\.sql
|htdocs/install/mysql/tables/llx_rights_def\.key\.sql
|htdocs/install/pgsql/functions/functions(-(don|loan|mailing|opensurvey|partnership|recruitment|website))?\.sql
|htdocs/install/pgsql/functions/functions.*\.sql
|htdocs/modulebuilder/template/sql/.*\.sql
)$
3 changes: 3 additions & 0 deletions dev/setup/pre-commit/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,10 @@ the project: `pre-commit-config.yaml`.

1. Install pre-commit tool.\
If you do not have python installed, install [python](https://www.python.org) first.\
`sudo apt install python3`

If you do not have [`pip`](https://pypi.org/project/pip), install that as well.\\
`sudo apt install pip`

Then you can install pre-commit tool:
`python3 -m pip install pre-commit`
Expand Down
8 changes: 4 additions & 4 deletions htdocs/compta/prelevement/class/bonprelevement.class.php
Original file line number Diff line number Diff line change
Expand Up @@ -2211,13 +2211,13 @@ public function EnregDestinataireSEPA($row_code_client, $row_nom, $row_address,
$XML_DEBITOR .= ' <AmdmntInd>false</AmdmntInd>' . $CrLf;
$XML_DEBITOR .= ' </MndtRltdInf>' . $CrLf;
$XML_DEBITOR .= ' </DrctDbtTx>' . $CrLf;
$XML_DEBITOR .= ' <DbtrAgt>' . $CrLf;
$XML_DEBITOR .= ' <FinInstnId>' . $CrLf;
if (getDolGlobalInt('WITHDRAWAL_WITHOUT_BIC')==0) {
$XML_DEBITOR .= ' <DbtrAgt>' . $CrLf;
$XML_DEBITOR .= ' <FinInstnId>' . $CrLf;
$XML_DEBITOR .= ' <BIC>' . $row_bic . '</BIC>' . $CrLf;
$XML_DEBITOR .= ' </FinInstnId>' . $CrLf;
$XML_DEBITOR .= ' </DbtrAgt>' . $CrLf;
}
$XML_DEBITOR .= ' </FinInstnId>' . $CrLf;
$XML_DEBITOR .= ' </DbtrAgt>' . $CrLf;
$XML_DEBITOR .= ' <Dbtr>' . $CrLf;
$XML_DEBITOR .= ' <Nm>' . dolEscapeXML(strtoupper(dol_string_nospecial(dol_string_unaccent($row_nom), ' '))) . '</Nm>' . $CrLf;
$XML_DEBITOR .= ' <PstlAdr>' . $CrLf;
Expand Down
9 changes: 4 additions & 5 deletions htdocs/core/boxes/box_factures_imp.php
Original file line number Diff line number Diff line change
Expand Up @@ -139,10 +139,9 @@ public function loadBox($max = 5)
while ($line < min($num, $this->max)) {
$objp = $this->db->fetch_object($result);

$datelimite = $this->db->jdate($objp->datelimite);
$date = $this->db->jdate($objp->date);
$datem = $this->db->jdate($objp->tms);
$datelimit = $this->db->jdate(datelimite);
$datelimit = $this->db->jdate($objp->datelimite);

$facturestatic->id = $objp->facid;
$facturestatic->ref = $objp->ref;
Expand Down Expand Up @@ -182,7 +181,7 @@ public function loadBox($max = 5)
$late = '';
if ($facturestatic->hasDelay()) {
// @phan-suppress-next-line PhanPluginPrintfVariableFormatString
$late = img_warning(sprintf($l_due_date, dol_print_date($datelimite, 'day', 'tzuserrel')));
$late = img_warning(sprintf($l_due_date, dol_print_date($datelimit, 'day', 'tzuserrel')));
}

$this->info_box_contents[$line][] = array(
Expand All @@ -204,8 +203,8 @@ public function loadBox($max = 5)
);

$this->info_box_contents[$line][] = array(
'td' => 'class="center nowraponall" title="'.dol_escape_htmltag($langs->trans("DateDue").': '.dol_print_date($datelimite, 'day', 'tzuserrel')).'"',
'text' => dol_print_date($datelimite, 'day', 'tzuserrel'),
'td' => 'class="center nowraponall" title="'.dol_escape_htmltag($langs->trans("DateDue").': '.dol_print_date($datelimit, 'day', 'tzuserrel')).'"',
'text' => dol_print_date($datelimit, 'day', 'tzuserrel'),
);

$this->info_box_contents[$line][] = array(
Expand Down
2 changes: 1 addition & 1 deletion htdocs/zapier/admin/about.php
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@

$page_name = "ZapierForDolibarrSetup";
$help_url = 'EN:Module_Zapier';
llxHeader('', $langs->trans($page_name), $help_url);
llxHeader('', $langs->trans($page_name), $help_url, '', 0, 0, '', '', '', 'mod-zapier page-admin_about');

// Subheader
$linkback = '<a href="'.($backtopage ? $backtopage : DOL_URL_ROOT.'/admin/modules.php?restore_lastsearch_values=1').'">'.$langs->trans("BackToModuleList").'</a>';
Expand Down
2 changes: 1 addition & 1 deletion htdocs/zapier/admin/setup.php
Original file line number Diff line number Diff line change
Expand Up @@ -66,7 +66,7 @@

$page_name = 'ZapierForDolibarrSetup';
$help_url = 'EN:Module_Zapier';
llxHeader('', $langs->trans($page_name), $help_url);
llxHeader('', $langs->trans($page_name), $help_url, '', 0, 0, '', '', '', 'mod-zapier page-admin_setup');

// Subheader
$linkback = '<a href="' . ($backtopage ? $backtopage : DOL_URL_ROOT . '/admin/modules.php?restore_lastsearch_values=1') . '">' . $langs->trans("BackToModuleList") . '</a>';
Expand Down

0 comments on commit cf024ea

Please sign in to comment.