diff --git a/app/Models/Invoice.php b/app/Models/Invoice.php index 590bd9fcff92..e1a9c2153a12 100644 --- a/app/Models/Invoice.php +++ b/app/Models/Invoice.php @@ -496,4 +496,14 @@ class Invoice extends BaseModel // } // } // } + + public function getBalanceDueAttribute() + { + return $this->balance; + } + + public function getTotalAttribute() + { + return $this->calc()->getTotal(); + } } diff --git a/app/Models/Quote.php b/app/Models/Quote.php index df0035c1bae5..b8c06d4cf7c0 100644 --- a/app/Models/Quote.php +++ b/app/Models/Quote.php @@ -250,4 +250,19 @@ class Quote extends BaseModel return false; } + + public function getValidUntilAttribute() + { + return $this->due_date; + } + + public function getBalanceDueAttribute() + { + return $this->balance; + } + + public function getTotalAttribute() + { + return $this->calc()->getTotal(); + } }