Improved ADSL Billing Review

This commit is contained in:
Deon George
2013-10-08 13:34:56 +11:00
parent ab3735914b
commit 638d123739
15 changed files with 367 additions and 248 deletions

View File

@@ -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);
}
}
?>