2
0
forked from Wavyzz/dolibarr

fix phan and phpstan

This commit is contained in:
Frédéric France
2024-12-17 21:42:26 +01:00
parent bcad445234
commit d2ff7481dd
2 changed files with 4 additions and 3 deletions

View File

@@ -120,6 +120,7 @@ class Salary extends CommonObject
/**
* @var int
* @deprecated see $accountid
* @see $accountid
*/
public $fk_account;
@@ -154,7 +155,7 @@ class Salary extends CommonObject
const STATUS_PAID = 1;
/**
* @var string
* @var float amount remain to pay
*/
public $resteapayer;

View File

@@ -193,8 +193,8 @@ if ($massaction == 'withdrawrequest') {
$objecttmp = new Salary($db);
$result = $objecttmp->fetch($toselectid);
if ($result > 0) {
$totalpaid = $objecttmp->getSommePaiement();
$objecttmp->resteapayer = price2num((float) $objecttmp->amount - $totalpaid, 'MT');
$totalpaid = (float) $objecttmp->getSommePaiement();
$objecttmp->resteapayer = (float) price2num((float) $objecttmp->amount - $totalpaid, 'MT');
// hook to finalize the remaining amount, considering e.g. cash discount agreements
$parameters = array('remaintopay' => $objecttmp->resteapayer);