Improved ADSL Billing Review
This commit is contained in:
@@ -10,6 +10,17 @@
|
||||
* @license http://dev.osbill.net/license.html
|
||||
*/
|
||||
class Tax {
|
||||
public static function add($value) {
|
||||
return Currency::round($value+static::amount($value));
|
||||
}
|
||||
|
||||
/**
|
||||
* Return the total of tax for an amount
|
||||
*/
|
||||
public static function amount($value) {
|
||||
return Currency::round(static::total(Company::instance()->country()->id,NULL,$value));
|
||||
}
|
||||
|
||||
/**
|
||||
* Return array of taxes
|
||||
*
|
||||
@@ -48,11 +59,5 @@ class Tax {
|
||||
|
||||
return $total;
|
||||
}
|
||||
|
||||
public static function add($value) {
|
||||
// @todo Tax details should come from session
|
||||
// @todo Rounding should be a global config
|
||||
return round($value+static::total(61,NULL,$value),2);
|
||||
}
|
||||
}
|
||||
?>
|
||||
|
Reference in New Issue
Block a user