parent
029f1c411f
commit
6da5a6b82f
@ -542,9 +542,10 @@ class Fichinter extends CommonObject
|
|||||||
/**
|
/**
|
||||||
* Returns amount based on user thm
|
* Returns amount based on user thm
|
||||||
*
|
*
|
||||||
* @return float amount
|
* @return float Amount
|
||||||
*/
|
*/
|
||||||
function getAmount() {
|
function getAmount()
|
||||||
|
{
|
||||||
global $db;
|
global $db;
|
||||||
|
|
||||||
$amount = 0;
|
$amount = 0;
|
||||||
@ -554,13 +555,11 @@ class Fichinter extends CommonObject
|
|||||||
|
|
||||||
$thm = $this->author->thm;
|
$thm = $this->author->thm;
|
||||||
|
|
||||||
foreach($this->lines as &$line) {
|
foreach($this->lines as $line) {
|
||||||
|
$amount += ($line->duration / 60 / 60 * $thm);
|
||||||
$amount+=$line->qty * $thm;
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
return $amount;
|
return price2num($amount, 'MT');
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user