forked from Wavyzz/dolibarr
Merge branch 'develop' of git@github.com:Dolibarr/dolibarr.git into develop
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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')));
|
||||
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user