Replace status with active in tables
This commit is contained in:
@@ -238,7 +238,7 @@ class Model_Invoice_Item extends ORM {
|
||||
$iito->save();
|
||||
|
||||
if (! $iito->saved()) {
|
||||
$this->void = 1;
|
||||
$this->active = 0;
|
||||
$this->save();
|
||||
|
||||
break;
|
||||
@@ -301,7 +301,7 @@ class Model_Invoice_Item extends ORM {
|
||||
}
|
||||
|
||||
public function total($format=FALSE) {
|
||||
$result = $this->void ? 0 : $this->subtotal()+$this->tax()-$this->discount();
|
||||
$result = ! $this->active ? 0 : $this->subtotal()+$this->tax()-$this->discount();
|
||||
|
||||
return $format ? Currency::display($result) : Currency::round($result);
|
||||
}
|
||||
|
Reference in New Issue
Block a user