Improvements to invoice display and other misc items
This commit is contained in:
@@ -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;
|
||||
|
Reference in New Issue
Block a user