Replace status with active in tables

This commit is contained in:
Deon George
2016-08-31 15:03:09 +10:00
parent 34e1e40f04
commit 54e4425aa8
51 changed files with 95 additions and 159 deletions

View File

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