Improvements to invoice display and other misc items

This commit is contained in:
Deon George
2013-12-20 10:00:32 +11:00
parent 778eada7f0
commit e19518c505
43 changed files with 1122 additions and 887 deletions

View File

@@ -11,14 +11,14 @@
*/
class Tax {
public static function add($value) {
return Currency::round($value+static::amount($value));
return Currency::round($value+self::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));
public static function amount($value,$round=FALSE) {
return Currency::round(self::total(Company::instance()->country()->id,NULL,$value));
}
/**
@@ -54,7 +54,7 @@ class Tax {
public static function total($cid,$zone,$value) {
$total = 0;
foreach (static::detail($cid,$zone,$value) as $tax)
foreach (self::detail($cid,$zone,$value) as $tax)
$total += $tax['amount'];
return $total;