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

This commit is contained in:
ldestailleur 2025-09-16 11:17:22 +02:00
commit 29ccbb43d5
35 changed files with 121 additions and 125 deletions

View file

@ -17670,42 +17670,6 @@ parameters:
count: 2
path: ../../../htdocs/salaries/class/paymentsalary.class.php
-
message: '#^Call to function method_exists\(\) with \$this\(Salary\) and ''LibStatut'' will always evaluate to true\.$#'
identifier: function.alreadyNarrowedType
count: 1
path: ../../../htdocs/salaries/class/salary.class.php
-
message: '#^Call to function method_exists\(\) with \$this\(Salary\) and ''getNomUrl'' will always evaluate to true\.$#'
identifier: function.alreadyNarrowedType
count: 1
path: ../../../htdocs/salaries/class/salary.class.php
-
message: '#^Call to function property_exists\(\) with \$this\(Salary\) and ''amount'' will always evaluate to true\.$#'
identifier: function.alreadyNarrowedType
count: 1
path: ../../../htdocs/salaries/class/salary.class.php
-
message: '#^Call to function property_exists\(\) with \$this\(Salary\) and ''type_payment'' will always evaluate to true\.$#'
identifier: function.alreadyNarrowedType
count: 1
path: ../../../htdocs/salaries/class/salary.class.php
-
message: '#^Method Salary\:\:getSommePaiement\(\) return type has no value type specified in iterable type array\.$#'
identifier: missingType.iterableValue
count: 1
path: ../../../htdocs/salaries/class/salary.class.php
-
message: '#^Negated boolean expression is always true\.$#'
identifier: booleanNot.alwaysTrue
count: 2
path: ../../../htdocs/salaries/class/salary.class.php
-
message: '#^Negated boolean expression is always false\.$#'
identifier: booleanNot.alwaysFalse

View file

@ -144,24 +144,15 @@ if ($action == 'updateMask') {
// by calling method canBeActivated
dolibarr_set_const($db, "BOM_ADDON", $value, 'chaine', 0, '', $conf->entity);
} elseif ($action == 'set_BOM_DRAFT_WATERMARK') {
} elseif ($action == 'updateother') {
$draft = GETPOST("BOM_DRAFT_WATERMARK");
$res = dolibarr_set_const($db, "BOM_DRAFT_WATERMARK", trim($draft), 'chaine', 0, '', $conf->entity);
if (!($res > 0)) {
$error++;
}
if (!$error) {
setEventMessages($langs->trans("SetupSaved"), null, 'mesgs');
} else {
setEventMessages($langs->trans("Error"), null, 'errors');
}
} elseif ($action == 'set_BOM_FREE_TEXT') {
$freetext = GETPOST("BOM_FREE_TEXT", 'restricthtml'); // No alpha here, we want exact string
$res = dolibarr_set_const($db, "BOM_FREE_TEXT", $freetext, 'chaine', 0, '', $conf->entity);
if (!($res > 0)) {
$error++;
}
@ -458,14 +449,35 @@ print '</div>';
print "<br>";
print load_fiche_titre($langs->trans("OtherOptions"), '', '');
print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">';
print '<input type="hidden" name="token" value="'.newToken().'">';
print '<input type="hidden" name="action" value="updateother">';
print '<div class="div-table-responsive-no-min">';
print '<table class="noborder centpercent">';
print '<tr class="liste_titre">';
print '<td>'.$langs->trans("Parameter").'</td>';
print '<td class="center" width="60"></td>';
print "<td>&nbsp;</td>\n";
print '<td class="center"></td>';
print "</tr>\n";
if (getDolGlobalString('MAIN_FEATURES_LEVEL') >= 1) {
print '<tr class="oddeven"><td>';
print $langs->trans("BOM_SUB_BOM");
print '</td><td>';
if ($conf->use_javascript_ajax) {
print ajax_constantonoff('BOM_SUB_BOM');
} else {
if (!getDolGlobalString('BOM_SUB_BOM')) {
print '<a href="'.$_SERVER['PHP_SELF'].'?action=set_BOM_SUB_BOM&token='.newToken().'">'.img_picto($langs->trans("Disabled"), 'off').'</a>';
} else {
print '<a href="'.$_SERVER['PHP_SELF'].'?action=del_BOM_SUB_BOM&token='.newToken().'">'.img_picto($langs->trans("Enabled"), 'on').'</a>';
}
}
print "</td></tr>\n";
}
$substitutionarray = pdf_getSubstitutionArray($langs, null, null, 2);
$substitutionarray['__(AnyTranslationKey)__'] = $langs->trans("Translation");
$htmltext = '<i>'.$langs->trans("AvailableVariables").':<br>';
@ -474,9 +486,6 @@ foreach ($substitutionarray as $key => $val) {
}
$htmltext .= '</i>';
print '<form action="'.$_SERVER["PHP_SELF"].'" method="post">';
print '<input type="hidden" name="token" value="'.newToken().'">';
print '<input type="hidden" name="action" value="set_BOM_FREE_TEXT">';
print '<tr class="oddeven"><td colspan="2">';
print $form->textwithpicto($langs->trans("FreeLegalTextOnBOMs"), $langs->trans("AddCRIfTooLong").'<br><br>'.$htmltext, 1, 'help', '', 0, 2, 'freetexttooltip').'<br>';
$variablename = 'BOM_FREE_TEXT';
@ -487,27 +496,24 @@ if (!getDolGlobalString('PDF_ALLOW_HTML_FOR_FREE_TEXT')) {
$doleditor = new DolEditor($variablename, getDolGlobalString($variablename), '', 80, 'dolibarr_notes');
print $doleditor->Create();
}
print '</td><td class="right">';
print '<input type="submit" class="button button-edit" value="'.$langs->trans("Modify").'">';
print "</td></tr>\n";
print '</form>';
//Use draft Watermark
// Use draft Watermark
print '<form method="post" action="'.$_SERVER["PHP_SELF"].'">';
print '<input type="hidden" name="token" value="'.newToken().'">';
print '<input type="hidden" name="action" value="set_BOM_DRAFT_WATERMARK">';
print '<tr class="oddeven"><td>';
print $form->textwithpicto($langs->trans("WatermarkOnDraftBOMs"), $htmltext, 1, 'help', '', 0, 2, 'watermarktooltip').'<br>';
print '</td><td>';
print '<input class="flat minwidth200" type="text" name="BOM_DRAFT_WATERMARK" value="'.dol_escape_htmltag(getDolGlobalString('BOM_DRAFT_WATERMARK')).'">';
print '</td><td class="right">';
print '<input type="submit" class="button button-edit" value="'.$langs->trans("Modify").'">';
print "</td></tr>\n";
print '</form>';
print '</table>';
print '<center><input type="submit" class="button button-edit" value="'.$langs->trans("Modify").'"></center>';
print '</div>';
print '</form>';
print '<br>';

View file

@ -23,26 +23,26 @@
*
* You should have received a copy of the GNU General Public License
* along with this program. If not, see <https://www.gnu.org/licenses/>.
*
* Need to have the following variables defined:
* $object (invoice, order, ...)
* $conf
* $langs
* $forceall (0 by default, 1 for supplier invoices/orders)
*/
require_once DOL_DOCUMENT_ROOT."/product/class/html.formproduct.class.php";
/**
* @var CommonObject $this
* @var CommonObject $object
* @var CommonObject $object Invoice, order, ...
* @var ExtraFields $extrafields
* @var Form $form
* @var Societe $buyer
* @var Translate $langs
*
* @var string $action
* @var int $forceall (0 by default, 1 for supplier invoices/orders)
*/
'
@phan-var-force CommonObject $this
@phan-var-force CommonObject $object
@phan-var-force Societe $buyer
';
// Protection to avoid direct call of template
if (empty($object) || !is_object($object)) {
@ -50,12 +50,6 @@ if (empty($object) || !is_object($object)) {
exit;
}
'
@phan-var-force CommonObject $this
@phan-var-force CommonObject $object
@phan-var-force Societe $buyer
';
global $forceall, $forcetoshowtitlelines, $filtertype;
if (empty($forceall)) {
@ -149,9 +143,9 @@ if (isModEnabled("product") || isModEnabled("service")) {
$statustoshow = -1;
if (getDolGlobalString('ENTREPOT_EXTRA_STATUS')) {
// hide products in closed warehouse, but show products for internal transfer
print $form->select_produits(GETPOSTINT('idprod'), (($filtertype == 1) ? 'idprodservice' : 'idprod'), $filtertype, getDolGlobalInt('PRODUIT_LIMIT_SIZE'), 0, $statustoshow, 2, '', 1, array(), 0, '1', 0, 'maxwidth500 widthcentpercentminusx', 0, 'warehouseopen,warehouseinternal', (string) GETPOSTINT('combinations'), 1);
print $form->select_produits(GETPOSTINT('idprod'), (($filtertype == 1) ? 'idprodservice' : 'idprod'), $filtertype, getDolGlobalInt('PRODUIT_LIMIT_SIZE'), 0, $statustoshow, 2, '', 1, array(), 0, '1', 0, 'maxwidth500 widthcentpercentminusx', 0, 'warehouseopen,warehouseinternal', GETPOST('combinations', 'array:alphanohtml'), 1);
} else {
print $form->select_produits(GETPOSTINT('idprod'), (($filtertype == 1) ? 'idprodservice' : 'idprod'), $filtertype, getDolGlobalInt('PRODUIT_LIMIT_SIZE'), 0, $statustoshow, 2, '', 1, array(), 0, '1', 0, 'maxwidth500 widthcentpercentminusx', 0, '', (string) GETPOSTINT('combinations'), 1);
print $form->select_produits(GETPOSTINT('idprod'), (($filtertype == 1) ? 'idprodservice' : 'idprod'), $filtertype, getDolGlobalInt('PRODUIT_LIMIT_SIZE'), 0, $statustoshow, 2, '', 1, array(), 0, '1', 0, 'maxwidth500 widthcentpercentminusx', 0, '', GETPOST('combinations', 'array:alphanohtml'), 1);
}
$urltocreateproduct = DOL_URL_ROOT.'/product/card.php?action=create'.(($filtertype == 1) ? '&leftmenu=service&type=1' : '&leftmenu=product&type=0').'&backtopage='.urlencode($_SERVER["PHP_SELF"].'?id='.$object->id);
print '<a href="'.$urltocreateproduct.'"><span class="fa fa-plus-circle valignmiddle paddingleft" title="'.$langs->trans("AddProduct").'"></span></a>';

View file

@ -102,7 +102,6 @@ $coldisplay++;
<input type="hidden" id="product_type" name="type" value="<?php echo $line->product_type; ?>">
<input type="hidden" id="product_id" name="productid" value="<?php echo(!empty($line->fk_product) ? $line->fk_product : 0); ?>" />
<input type="hidden" id="special_code" name="special_code" value="<?php echo $line->special_code; ?>">
<input type="hidden" id="fk_parent_line" name="fk_parent_line" value="<?php echo $line->fk_parent_line; ?>">
<?php
// Predefined product/service

View file

@ -746,12 +746,12 @@ $viewmode .= '<span class="marginrightonly"></span>';
$tmpforcreatebutton = dol_getdate(dol_now('tzuserrel'), true);
$newparam = '&month='.str_pad((string) $month, 2, "0", STR_PAD_LEFT).'&year='.$tmpforcreatebutton['year'];
$newparam = '?month='.str_pad((string) $month, 2, "0", STR_PAD_LEFT).'&year='.$tmpforcreatebutton['year'];
$url = DOL_URL_ROOT.'/comm/action/card.php?action=create';
$url .= '&apyear='.$tmpforcreatebutton['year'].'&apmonth='.$tmpforcreatebutton['mon'].'&apday='.$tmpforcreatebutton['mday'];
$url .= '&aphour='.$tmpforcreatebutton['hours'].'&apmin='.$tmpforcreatebutton['minutes'];
$url .= '&backtopage='.urlencode($_SERVER["PHP_SELF"].($newparam ? '?'.$newparam : ''));
$url .= '&backtopage='.urlencode($_SERVER["PHP_SELF"].$newparam);
$newcardbutton = dolGetButtonTitle($langs->trans('AddAction'), '', 'fa fa-plus-circle', $url, '', (int) ($user->hasRight('agenda', 'myactions', 'create') || $user->hasRight('agenda', 'allactions', 'create')));

View file

@ -1284,7 +1284,7 @@ if (empty($reshook)) {
}
if (!$error && isModEnabled('variants') && $prod_entry_mode != 'free') {
if ($combinations = GETPOST('combinations', 'array')) {
if ($combinations = GETPOST('combinations', 'array:alphanohtml')) {
//Check if there is a product with the given combination
$prodcomb = new ProductCombination($db);

View file

@ -1043,7 +1043,7 @@ if (empty($reshook)) {
}
if (!$error && isModEnabled('variants') && $prod_entry_mode != 'free') {
if ($combinations = GETPOST('combinations', 'array')) {
if ($combinations = GETPOST('combinations', 'array:alphanohtml')) {
//Check if there is a product with the given combination
$prodcomb = new ProductCombination($db);

View file

@ -2556,7 +2556,7 @@ if (empty($reshook)) {
}
if (!$error && isModEnabled('variants') && $prod_entry_mode != 'free') {
if ($combinations = GETPOST('combinations', 'array')) {
if ($combinations = GETPOST('combinations', 'array:alphanohtml')) {
//Check if there is a product with the given combination
$prodcomb = new ProductCombination($db);

View file

@ -783,6 +783,7 @@ class FormFile
} else {
// For normalized standard modules
$file = dol_buildpath('/core/modules/'.$modulepart.'/modules_'.strtolower($submodulepart).'.php', 0);
if (file_exists($file)) {
$res = include_once $file;
} else {

View file

@ -554,7 +554,7 @@ function run_sql($sqlfile, $silent = 1, $entity = 0, $usesavepoint = 1, $handler
});
</script>';
if (count($arraysql)) {
print ' - <a class="trforrunsqlshowhide'.$keyforsql.'" href="#" title="'.($langs->trans("ShowHideTheNRequests", count($arraysql))).'">'.$langs->trans("ShowHideDetails").'</a>';
print ' - <a class="trforrunsqlshowhide'.$keyforsql.' reposition" href="#" title="'.($langs->trans("ShowHideTheNRequests", count($arraysql))).'">'.$langs->trans("ShowHideDetails").'</a>';
} else {
print ' - <span class="opacitymedium">'.$langs->trans("ScriptIsEmpty").'</span>';
}

View file

@ -2435,11 +2435,11 @@ function addFileIntoDatabaseIndex($dir, $file, $fullpathorig = '', $mode = 'uplo
/**
* Delete files into database index using search criteria.
*
* @param string $dir Directory name (full real path without ending /)
* @param string $file File name
* @param string $mode How file was created ('uploaded', 'generated', ...)
* @param Object $object object used for entity
* @return int Return integer <0 if KO, 0 if nothing done, >0 if OK
* @param string $dir Directory name (full real path without ending /)
* @param string $file File name
* @param string $mode How file was created ('uploaded', 'generated', ...)
* @param ?CommonObject $object object used for entity
* @return int Return integer <0 if KO, 0 if nothing done, >0 if OK
*/
function deleteFilesIntoDatabaseIndex($dir, $file, $mode = 'uploaded', $object = null)
{

View file

@ -290,9 +290,9 @@ if ($nolinesbefore) {
}
if (getDolGlobalString('ENTREPOT_EXTRA_STATUS')) {
// hide products in closed warehouse, but show products for internal transfer
$form->select_produits(GETPOSTINT('idprod'), 'idprod', $filtertype, getDolGlobalInt('PRODUIT_LIMIT_SIZE'), $buyer->price_level, $statustoshow, 2, '', 1, array(), $buyer->id, $labelforradio, 0, 'maxwidth500 widthcentpercentminusx', 0, $statuswarehouse, GETPOST('combinations', 'array'));
$form->select_produits(GETPOSTINT('idprod'), 'idprod', $filtertype, getDolGlobalInt('PRODUIT_LIMIT_SIZE'), $buyer->price_level, $statustoshow, 2, '', 1, array(), $buyer->id, $labelforradio, 0, 'maxwidth500 widthcentpercentminusx', 0, $statuswarehouse, GETPOST('combinations', 'array:alphanohtml'));
} else {
$form->select_produits(GETPOSTINT('idprod'), 'idprod', $filtertype, getDolGlobalInt('PRODUIT_LIMIT_SIZE'), $buyer->price_level, $statustoshow, 2, '', 1, array(), $buyer->id, $labelforradio, 0, 'maxwidth500 widthcentpercentminusx', 0, '', GETPOST('combinations', 'array'));
$form->select_produits(GETPOSTINT('idprod'), 'idprod', $filtertype, getDolGlobalInt('PRODUIT_LIMIT_SIZE'), $buyer->price_level, $statustoshow, 2, '', 1, array(), $buyer->id, $labelforradio, 0, 'maxwidth500 widthcentpercentminusx', 0, '', GETPOST('combinations', 'array:alphanohtml'));
}
if (getDolGlobalString('MAIN_AUTO_OPEN_SELECT2_ON_FOCUS_FOR_CUSTOMER_PRODUCTS')) {
?>

View file

@ -479,7 +479,7 @@ if (empty($reshook)) {
}
if (!$error && isModEnabled('variants') && $prod_entry_mode != 'free') {
if ($combinations = GETPOST('combinations', 'array')) {
if ($combinations = GETPOST('combinations', 'array:alphanohtml')) {
//Check if there is a product with the given combination
$prodcomb = new ProductCombination($db);

View file

@ -1699,7 +1699,7 @@ if (empty($reshook)) {
}
if (!$error && isModEnabled('variants') && $prod_entry_mode != 'free') {
if ($combinations = GETPOST('combinations', 'array')) {
if ($combinations = GETPOST('combinations', 'array:alphanohtml')) {
//Check if there is a product with the given combination
$prodcomb = new ProductCombination($db);

View file

@ -690,11 +690,13 @@ if (!getDolGlobalString('MAIN_DISABLE_GLOBAL_WORKBOARD') && getDolGlobalInt('MAI
$openedDashBoard .= '</div>';
$openedDashBoard .= ' <div class="inline-block"><a href="'.$board->url_late.'" class="info-box-text info-box-text-a paddingleft">';
} else {
$openedDashBoard .= ' ';
$openedDashBoard .= ' <span class="info-box-text info-box-text-a displaycontents">';
}
$openedDashBoard .= $textLate;
if ($board->url_late) {
$openedDashBoard .= '</a>';
} else {
$openedDashBoard .= '</span>';
}
}
$openedDashBoard .= '</div>'."\n";

View file

@ -585,6 +585,11 @@ UPDATE llx_facturedet SET situation_percent = 100 WHERE situation_percent IS NUL
DELETE FROM llx_rights_def WHERE module = 'hrm' AND perms = 'employee';
-- Clean templates that does not exists
DELETE FROM llx_document_model WHERE TYPE = 'bom' AND nom = 'alpha';
DELETE FROM llx_const WHERE name = 'BOM_ADDON_PDF' AND value = 'alpha';
DELETE FROM llx_const WHERE name = 'MRP_MO_ADDON_PDF' AND value = 'alpha';
-- Sequence to fix the content of llx_bank.amount_main_currency (value was empty and should not for payment on bank account with a different currency so when amount_main_currency is different than amount)
-- Note: amount is amount in the currency of the bank account

View file

@ -134,11 +134,11 @@ $db = getDoliDBInstance($conf->db->type, $conf->db->host, $conf->db->user, $conf
if ($db->connected) {
print '<tr><td class="nowrap">';
print $langs->trans("ServerConnection")." : $dolibarr_main_db_host</td><td class=\"right\">".$langs->trans("OK")."</td></tr>";
print $langs->trans("ServerConnection")." : ".$dolibarr_main_db_host.'</td><td class="right">'.$langs->trans("OK")."</td></tr>";
dolibarr_install_syslog("repair: ".$langs->transnoentities("ServerConnection").": ".$dolibarr_main_db_host.$langs->transnoentities("OK"));
$ok = 1;
} else {
print "<tr><td>".$langs->trans("ErrorFailedToConnectToDatabase", $dolibarr_main_db_name)."</td><td class=\"right\">".$langs->transnoentities("Error")."</td></tr>";
print "<tr><td>".$langs->trans("ErrorFailedToConnectToDatabase", $dolibarr_main_db_name).'</td><td class="right">'.$langs->transnoentities("Error")."</td></tr>";
dolibarr_install_syslog("repair: ".$langs->transnoentities("ErrorFailedToConnectToDatabase", $dolibarr_main_db_name));
$ok = 0;
}
@ -146,11 +146,11 @@ if ($db->connected) {
if ($ok) {
if ($db->database_selected) {
print '<tr><td class="nowrap">';
print $langs->trans("DatabaseConnection")." : ".$dolibarr_main_db_name."</td><td class=\"right\">".$langs->trans("OK")."</td></tr>";
print $langs->trans("DatabaseConnection")." : ".$dolibarr_main_db_name.'</td><td class="right">'.$langs->trans("OK")."</td></tr>";
dolibarr_install_syslog("repair: database connection successful: ".$dolibarr_main_db_name);
$ok = 1;
} else {
print "<tr><td>".$langs->trans("ErrorFailedToConnectToDatabase", $dolibarr_main_db_name)."</td><td class=\"right\">".$langs->trans("Error")."</td></tr>";
print "<tr><td>".$langs->trans("ErrorFailedToConnectToDatabase", $dolibarr_main_db_name).'</td><td class="right">'.$langs->trans("Error")."</td></tr>";
dolibarr_install_syslog("repair: ".$langs->transnoentities("ErrorFailedToConnectToDatabase", $dolibarr_main_db_name));
$ok = 0;
}

View file

@ -169,3 +169,4 @@ ErrorModifyMoDateStart = You must choose a start date earlier than the current s
ErrorModifyMoDateEnd = You must choose an end date later than the start date. %s
ErrorCancelMo=Error updating cancellation
ErrorModifyMoDate=Error updating date modification
BOM_SUB_BOM=Use sub-boms

View file

@ -48,12 +48,16 @@ session_cache_limiter('public');
require_once __DIR__.'/../webportal.main.inc.php'; // __DIR__ allow this script to be included in custom themes
/**
* @var Conf $conf
* @var Translate $langs
*
* @var string $dolibarr_nocache
*/
$fontlist = 'arial,tahoma,verdana,helvetica';
$colorbacktitle1 = '#fff';
$langs->load("main", 0, 1);
$right = ($langs->trans("DIRECTION") == 'rtl' ? 'left' : 'right');
$left = ($langs->trans("DIRECTION") == 'rtl' ? 'right' : 'left');
// Define css type
top_httphead('text/css');

View file

@ -17,6 +17,7 @@
/**
* @var Context $context Object context for webportal
* @var Translate $langs
*/
// Protection to avoid direct call of template

View file

@ -88,7 +88,14 @@ require_once DOL_DOCUMENT_ROOT . '/webportal/class/webportalpartnership.class.ph
* @var DoliDB $db
* @var HookManager $hookmanager
* @var Translate $langs
*
* @var string $sessionname
* @var string $sessiontimeout
*/
'
@phan-var-force string $sessionname
@phan-var-force string $sessiontimeout
';
// Init session. Name of session is specific to WEBPORTAL instance.
// Must be done after the include of filefunc.inc.php so global variables of conf file are defined (like $dolibarr_main_instance_unique_id or $dolibarr_main_force_https).
// Note: the function dol_getprefix is defined into functions.lib.php but may have been defined to return a different key to manage another area to protect.

View file

@ -2,7 +2,7 @@
/* Copyright (C) 2011-2022 Alexandre Spangaro <aspangaro@open-dsi.fr>
* Copyright (C) 2014 Juanjo Menent <jmenent@2byte.es>
* Copyright (C) 2021 Gauthier VERDOL <gauthier.verdol@atm-consulting.fr>
* Copyright (C) 2024 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024-2025 Frédéric France <frederic.france@free.fr>
* Copyright (C) 2024-2025 MDW <mdeweerd@users.noreply.github.com>
*
* This program is free software; you can redistribute it and/or modify
@ -253,11 +253,9 @@ class Salary extends CommonObject
}
// Update extrafield
if (!$error) {
$result = $this->insertExtraFields();
if ($result < 0) {
$error++;
}
$result = $this->insertExtraFields();
if ($result < 0) {
$error++;
}
if (!$notrigger) {
@ -340,7 +338,7 @@ class Salary extends CommonObject
$this->status = $obj->paye;
$this->fk_bank = $obj->fk_bank;
$this->fk_user_author = $obj->fk_user_author;
$this->fk_user_modif = $obj->fk_user_modif;
$this->fk_user_modif = $obj->fk_user_modif;
$this->fk_account = $obj->fk_account;
$this->accountid = $obj->fk_account;
@ -485,11 +483,9 @@ class Salary extends CommonObject
if ($this->id > 0) {
// Update extrafield
if (!$error) {
$result = $this->insertExtraFields();
if ($result < 0) {
$error++;
}
$result = $this->insertExtraFields();
if ($result < 0) {
$error++;
}
// Call trigger
@ -656,7 +652,7 @@ class Salary extends CommonObject
* Return amount of payments already done
*
* @param int $multicurrency Return multicurrency_amount instead of amount. -1=Return both.
* @return float|int|array Amount of payment already done, <0 and set ->error if KO
* @return float|int|array{} Amount of payment already done, <0 and set ->error if KO
*/
public function getSommePaiement($multicurrency = 0)
{
@ -873,33 +869,31 @@ class Salary extends CommonObject
$return .= img_picto('', $this->picto);
$return .= '</span>';
$return .= '<div class="info-box-content">';
$return .= '<span class="info-box-ref inline-block tdoverflowmax150 valignmiddle">'.(method_exists($this, 'getNomUrl') ? $this->getNomUrl(1) : $this->ref).'</span>';
$return .= '<span class="info-box-ref inline-block tdoverflowmax150 valignmiddle">' . $this->getNomUrl(1) . '</span>';
if ($selected >= 0) {
$return .= '<input id="cb'.$this->id.'" class="flat checkforselect fright" type="checkbox" name="toselect[]" value="'.$this->id.'"'.($selected ? ' checked="checked"' : '').'>';
}
if (!empty($arraydata['user']) && is_object($arraydata['user'])) {
$user = $arraydata['user'];
'@phan-var-force User $user';
/** @var User $user */
$return .= '<br><span class="info-box-label">'.$user->getNomUrl(empty($arraydata['user']->photo) ? 1 : -1, '', 0, 0, 16, 0, '', 'maxwidth100').'</span>';
}
if (property_exists($this, 'amount')) {
$return .= '<br><span class="info-box-label amount">'.price($this->amount).'</span>';
if (property_exists($this, 'type_payment') && !empty($this->type_payment)) {
$return .= ' <span class="info-box-label opacitymedium small">';
if ($langs->trans("PaymentTypeShort".$this->type_payment) != "PaymentTypeShort".$this->type_payment) {
$return .= $langs->trans("PaymentTypeShort".$this->type_payment);
} elseif ($langs->trans("PaymentType".$this->type_payment) != "PaymentType".$this->type_payment) {
$return .= $langs->trans("PaymentType".$this->type_payment);
}
$return .= '</span>';
$return .= '<br><span class="info-box-label amount">'.price($this->amount).'</span>';
if (!empty($this->type_payment)) {
$return .= ' <span class="info-box-label opacitymedium small">';
if ($langs->trans("PaymentTypeShort".$this->type_payment) != "PaymentTypeShort".$this->type_payment) {
$return .= $langs->trans("PaymentTypeShort".$this->type_payment);
} elseif ($langs->trans("PaymentType".$this->type_payment) != "PaymentType".$this->type_payment) {
$return .= $langs->trans("PaymentType".$this->type_payment);
}
$return .= '</span>';
}
if (method_exists($this, 'LibStatut')) {
$return .= '<br><div class="info-box-status">'.$this->getLibStatut(3, isset($this->alreadypaid) ? $this->alreadypaid : $this->totalpaid).'</div>';
}
$return .= '<br><div class="info-box-status">'.$this->getLibStatut(3, isset($this->alreadypaid) ? $this->alreadypaid : $this->totalpaid).'</div>';
$return .= '</div>';
$return .= '</div>';
$return .= '</div>';
return $return;
}

View file

@ -927,6 +927,10 @@ div.floatright
{
display:inline-block !important;
}
.displaycontents
{
display:contents !important;
}
.largenumber {
font-size: 1.4em;
}

View file

@ -1114,6 +1114,10 @@ div.floatright
{
display:inline-block !important;
}
.displaycontents
{
display:contents !important;
}
.largenumber {
font-size: 1.4em;
}

View file

@ -875,7 +875,7 @@ if (!empty($id) || !empty($ref)) {
$aaa = '';
if (count($productCombinations)) {
$aaa = '<select id="bulk_action" name="massaction" class="flat">';
$aaa = '<select id="bulk_action" name="massaction" class="minwidth250">';
$aaa .= ' <option value="nothing">&nbsp;</option>';
$aaa .= ' <option value="not_buy" data-html="'.dol_escape_htmltag(img_picto($langs->trans("SetToStatus"), 'stop-circle', 'class="pictofixedwidth"').$langs->trans('SetToStatus', $langs->transnoentitiesnoconv('ProductStatusNotOnBuy'))).'">'.$langs->trans('ProductStatusNotOnBuy').'</option>';
$aaa .= ' <option value="not_sell" data-html="'.dol_escape_htmltag(img_picto($langs->trans("SetToStatus"), 'stop-circle', 'class="pictofixedwidth"').$langs->trans('SetToStatus', $langs->transnoentitiesnoconv('ProductStatusNotOnSell'))).'">'.$langs->trans('ProductStatusNotOnSell').'</option>';

View file

@ -76,6 +76,7 @@ $server->soap_defencoding = 'UTF-8';
$server->decode_utf8 = false;
$ns = 'http://www.dolibarr.org/ns/';
$server->configureWSDL('WebServicesDolibarrActionComm', $ns);
// @phan-suppress-next-line PhanUndeclaredProperty
$server->wsdl->schemaTargetNamespace = $ns;

View file

@ -71,6 +71,7 @@ $server->soap_defencoding = 'UTF-8';
$server->decode_utf8 = false;
$ns = 'http://www.dolibarr.org/ns/';
$server->configureWSDL('WebServicesDolibarrCategorie', $ns);
// @phan-suppress-next-line PhanUndeclaredProperty
$server->wsdl->schemaTargetNamespace = $ns;

View file

@ -73,6 +73,7 @@ $server->soap_defencoding = 'UTF-8';
$server->decode_utf8 = false;
$ns = 'http://www.dolibarr.org/ns/';
$server->configureWSDL('WebServicesDolibarrContact', $ns);
// @phan-suppress-next-line PhanUndeclaredProperty
$server->wsdl->schemaTargetNamespace = $ns;

View file

@ -78,6 +78,7 @@ $server->soap_defencoding = 'UTF-8';
$server->decode_utf8 = false;
$ns = 'http://www.dolibarr.org/ns/';
$server->configureWSDL('WebServicesDolibarrInvoice', $ns);
// @phan-suppress-next-line PhanUndeclaredProperty
$server->wsdl->schemaTargetNamespace = $ns;

View file

@ -76,6 +76,7 @@ $server->soap_defencoding = 'UTF-8';
$server->decode_utf8 = false;
$ns = 'http://www.dolibarr.org/ns/';
$server->configureWSDL('WebServicesDolibarrOrder', $ns);
// @phan-suppress-next-line PhanUndeclaredProperty
$server->wsdl->schemaTargetNamespace = $ns;

View file

@ -82,6 +82,7 @@ $server->soap_defencoding = 'UTF-8';
$server->decode_utf8 = false;
$ns = 'http://www.dolibarr.org/ns/';
$server->configureWSDL('WebServicesDolibarrPayment', $ns);
// @phan-suppress-next-line PhanUndeclaredProperty
$server->wsdl->schemaTargetNamespace = $ns;

View file

@ -81,6 +81,7 @@ $server->soap_defencoding = 'UTF-8';
$server->decode_utf8 = false;
$ns = 'http://www.dolibarr.org/ns/';
$server->configureWSDL('WebServicesDolibarrProductOrService', $ns);
// @phan-suppress-next-line PhanUndeclaredProperty
$server->wsdl->schemaTargetNamespace = $ns;

View file

@ -74,6 +74,7 @@ $server->soap_defencoding = 'UTF-8';
$server->decode_utf8 = false;
$ns = 'http://www.dolibarr.org/ns/';
$server->configureWSDL('WebServicesDolibarrSupplierInvoice', $ns);
// @phan-suppress-next-line PhanUndeclaredProperty
$server->wsdl->schemaTargetNamespace = $ns;

View file

@ -76,6 +76,7 @@ $server->soap_defencoding = 'UTF-8';
$server->decode_utf8 = false;
$ns = 'http://www.dolibarr.org/ns/';
$server->configureWSDL('WebServicesDolibarrThirdParty', $ns);
// @phan-suppress-next-line PhanUndeclaredProperty
$server->wsdl->schemaTargetNamespace = $ns;

View file

@ -76,6 +76,7 @@ $server->soap_defencoding = 'UTF-8';
$server->decode_utf8 = false;
$ns = 'http://www.dolibarr.org/ns/';
$server->configureWSDL('WebServicesDolibarrUser', $ns);
// @phan-suppress-next-line PhanUndeclaredProperty
$server->wsdl->schemaTargetNamespace = $ns;