Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop

This commit is contained in:
Laurent Destailleur
2025-10-23 01:01:09 +02:00
49 changed files with 1859 additions and 1082 deletions

View File

@@ -25,6 +25,7 @@
* Copyright (C) 2024 Lenin Rivas <lenin.rivas777@gmail.com>
* Copyright (C) 2024 Josep Lluís Amador Teruel <joseplluis@lliuretic.cat>
* Copyright (C) 2024 Benoît PASCAL <contact@p-ben.com>
* Copyright (C) 2025 Vincent Maury <vmaury@timgroup.fr>
*
* 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
@@ -5563,6 +5564,8 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = 0, $srco
'switch_on_grey',
'switch_on_red',
'switch_off',
'switch_off_grey',
'switch_off_red',
'uparrow',
'1uparrow',
'1downarrow',
@@ -5620,6 +5623,8 @@ function img_picto($titlealt, $picto, $moreatt = '', $pictoisfullpath = 0, $srco
'switch_on' => 'font-status4',
'switch_on_warning' => 'font-status4 warning',
'switch_on_red' => 'font-status8',
'switch_off_warning' => 'font-status4 warning',
'switch_off_red' => 'font-status8',
'holiday' => 'infobox-holiday',
'info' => 'opacityhigh',
'info_black' => 'font-status1',
@@ -5896,6 +5901,9 @@ function getImgPictoConv($mode = 'fa')
'movement' => 'people-carry',
'sign-out' => 'sign-out-alt',
'switch_off' => 'toggle-off',
'switch_off_grey' => 'toggle-off',
'switch_off_warning' => 'toggle-off',
'switch_off_red' => 'toggle-off',
'switch_on' => 'toggle-on',
'switch_on_grey' => 'toggle-on',
'switch_on_warning' => 'toggle-on',
@@ -10309,6 +10317,27 @@ function getCommonSubstitutionArray($outputlangs, $onlykey = 0, $exclude = null,
/** @var FactureFournisseur $object */
$substitutionarray['__URL_SUPPLIER_INVOICE__'] = DOL_MAIN_URL_ROOT . "/fourn/facture/card.php?id=" . $object->id;
}
if (is_object($object) && $object->element == 'payment_supplier') {
'@phan-var-force PaiementFourn $object';
/** @var PaiementFourn $object */
//print_r($object);
$liste_factures = [];
$total = 0;
$sql = 'SELECT f.ref,f.multicurrency_code as f_mccode, pf.*
FROM '.MAIN_DB_PREFIX.'paiementfourn_facturefourn as pf
JOIN '.MAIN_DB_PREFIX.'facture_fourn as f ON pf.fk_facturefourn = f.rowid
WHERE pf.fk_paiementfourn = '.((int) $object->id);
$resql = $db->query($sql);
if ($resql) {
while ($objp = $db->fetch_object($resql)) {
$liste_factures[] = ' - '.$outputlangs->trans('Invoice').' '. $objp->ref.' '.$outputlangs->trans('AmountPayed').' '.price($objp->multicurrency_amount, 0, $outputlangs, 0, -1, -1, $objp->multicurrency_code);
}
}
$substitutionarray['__SUPPLIER_PAYMENT_INVOICES_LIST__'] = implode("\n", $liste_factures);;
$substitutionarray['__SUPPLIER_PAYMENT_INVOICES_TOTAL__'] = price($object->multicurrency_amount, 0, $outputlangs, 0, -1, -1, $object->multicurrency_code ? $object->multicurrency_code : $conf->currency);
}
if (is_object($object) && $object->element == 'shipping') {
'@phan-var-force Expedition $object';
/** @var Expedition $object */
@@ -11295,10 +11324,10 @@ function dol_osencode($str)
*
* @param DoliDB $db Database handler
* @param string|int $key Code (string) or Id (int) to get Id or Code
* @param string $tablename Table name without prefix
* @param string $tablename Table name without prefix. Example 'c_input_method'
* @param string $fieldkey Field to search the key into
* @param string $fieldid Field to get
* @param int $entityfilter Filter by entity
* @param int $entityfilter 1=Filter by entity
* @param string $filters Filters to add. WARNING: string must be escaped for SQL and not coming from user input.
* @param bool $useCache If true (default), cache will be queried and updated.
* @return int<-1,max>|string ID of code if OK, 0 if key empty, -1 if KO