[email protected]:/var/lib/asterisk/agi-bin/lib# diff Misc.php.20180418 Misc.php
36a37,56
>
> //koteckit: rounding up after 2 digits
> //round_up
> //a2b_round_up
> function round_up($value, $places=0)
> {
> $value=-($value);
> if ($places < 0) { $places = 0; }
> $mult = pow(10, $places);
> $result=-(ceil($value * $mult) / $mult);
> return $result;
> }
>
> function a2b_round_up($number)
> {
> $PRECISION = 2;
>
> return round_up($number, $PRECISION);
> }
>
[email protected]:/var/lib/asterisk/agi-bin/lib# diff Class.RateEngine.php.20180418 Class.RateEngine.php
972c972,976
< $cost = a2b_round($cost);
---
> //$A2B->debug(DEBUG, $agi, __FILE__, __LINE__, "[CC_RATE_ENGINE_CALCULCOST_tmptk: K=$K - BUYCOST:$buyratecost - SELLING COST:$cost]");
> //koteckit: rounding up after 2 digits
> //$cost = a2b_round($cost);
> $cost = a2b_round_up($cost);
> //$A2B->debug(DEBUG, $agi, __FILE__, __LINE__, "[CC_RATE_ENGINE_CALCULCOST_tmptk: K=$K - BUYCOST:$buyratecost - SELLING COST:$cost]");
[email protected]:/var/lib/asterisk/agi-bin/lib#