Skip to content

Commit

Permalink
Merge branch 'develop' into phan/2025.2.6
Browse files Browse the repository at this point in the history
  • Loading branch information
eldy authored Feb 7, 2025
2 parents 0f1c8f3 + 2153070 commit e4bf974
Show file tree
Hide file tree
Showing 7 changed files with 17 additions and 11 deletions.
8 changes: 4 additions & 4 deletions htdocs/core/modules/project/modules_project.php
Original file line number Diff line number Diff line change
Expand Up @@ -68,10 +68,10 @@ public static function liste_modeles($db, $maxfilenamelength = 0)
/**
* Function to build pdf project onto disk
*
* @param Project $object Object source to build document
* @param Translate $outputlangs Lang output object
* @param string $srctemplatepath Full path of source filename for generator using a template file
* @return int<-1,1> 1 if OK, <=0 if KO
* @param Project $object Object source to build document
* @param Translate $outputlangs Lang output object
* @param string $srctemplatepath Full path of source filename for generator using a template file
* @return int<-1,1> 1 if OK, <=0 if KO
*/
abstract public function write_file($object, $outputlangs, $srctemplatepath = '');
// phpcs:enable
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -606,6 +606,8 @@ public function write_file($object, $outputlangs, $srctemplatepath = '')
}
}

/** @var Task $object */

// Replace tags of lines for tasks
try {
// Security check
Expand Down
2 changes: 1 addition & 1 deletion htdocs/core/modules/project/task/modules_task.php
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ public static function liste_modeles($db, $maxfilenamelength = 0)
/**
* Function to build a document on disk using the generic odt module.
*
* @param Project $object Object source to build document
* @param Task $object Object source to build document
* @param Translate $outputlangs Lang output object
* @param string $srctemplatepath Full path of source filename for generator using a template file
* @return int<-1,1> 1 if OK, <=0 if KO
Expand Down
4 changes: 4 additions & 0 deletions htdocs/install/mysql/migration/repair.sql
Original file line number Diff line number Diff line change
Expand Up @@ -602,6 +602,10 @@ DELETE FROM llx_rights_def WHERE module = 'hrm' AND perms = 'employee';
-- UPDATE llx_bank as b SET b.amount_main_currency = -b.amount_main_currency WHERE b.amount IS NOT NULL AND b.amount_main_currency IS NOT NULL AND SIGN(b.amount_main_currency) <> SIGN(b.amount);


-- Sequence to fix the table llx_paiement_facture and llx_paiement for payment record on a bank account that does not exists anymore.
-- delete from llx_paiement_facture where fk_paiement in (select rowid from llx_paiement WHERE fk_bank is not null AND fk_bank not in (select rowid from llx_bank));
-- delete from llx_paiement WHERE fk_bank is not null AND fk_bank not in (select rowid from llx_bank);


-- Delete duplicate entries into llx_c_transport_mode
-- VMYSQL4.1 DELETE T1 FROM llx_c_transport_mode as T1, llx_c_transport_mode as T2 where T1.entity = T2.entity AND T1.code = T2.code and T1.rowid > T2.rowid;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -445,6 +445,7 @@ public function write_file($object, $outputlangs, $srctemplatepath = '', $hidede
if ($foundtagforlines) {
$linenumber = 0;
foreach ($object->lines as $line) {
/** @var CommonObjectLine $line */
$linenumber++;
$tmparray = $this->get_substitutionarray_lines($line, $outputlangs, $linenumber);
complete_substitutions_array($tmparray, $outputlangs, $object, $line, "completesubstitutionarray_lines");
Expand Down
10 changes: 4 additions & 6 deletions htdocs/product/stock/list.php
Original file line number Diff line number Diff line change
Expand Up @@ -679,7 +679,7 @@

// Hook fields
$parameters = array('arrayfields' => $arrayfields, 'param' => $param, 'sortfield' => $sortfield, 'sortorder' => $sortorder);
$reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters, $object); // Note that $action and $object may have been modified by hook
$reshook = $hookmanager->executeHooks('printFieldListTitle', $parameters, $object, $action); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;

if (!empty($arrayfields['t.statut']['checked'])) {
Expand Down Expand Up @@ -898,11 +898,6 @@
$i++;
}

if ($totalnboflines - $offset <= $limit) {
// Show total line
include DOL_DOCUMENT_ROOT.'/core/tpl/list_print_total.tpl.php';
}

// If no record found
if ($num == 0) {
$colspan = 1;
Expand All @@ -916,6 +911,9 @@

$db->free($resql);

// Unconditionally show the total line (modification: totals are now displayed on every page)
include DOL_DOCUMENT_ROOT.'/core/tpl/list_print_total.tpl.php';

$parameters = array('arrayfields' => $arrayfields, 'sql' => $sql);
$reshook = $hookmanager->executeHooks('printFieldListFooter', $parameters, $object); // Note that $action and $object may have been modified by hook
print $hookmanager->resPrint;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -437,6 +437,7 @@ public function write_file($object, $outputlangs, $srctemplatepath = '', $hidede
if ($foundtagforlines) {
$linenumber = 0;
foreach ($object->lines as $line) {
/** @var CommonObjectLine $line */
$linenumber++;
$tmparray = $this->get_substitutionarray_lines($line, $outputlangs, $linenumber);
complete_substitutions_array($tmparray, $outputlangs, $object, $line, "completesubstitutionarray_lines");
Expand Down

0 comments on commit e4bf974

Please sign in to comment.