diff options
author | Camil Staps | 2016-07-28 09:37:48 +0200 |
---|---|---|
committer | Camil Staps | 2016-07-28 09:47:04 +0200 |
commit | 4f84eb2b09bf51eabdc29b5eeec101e0260b1cb7 (patch) | |
tree | 82722787d4018373720c66933f475bb2b1708c92 /classes/Assignment.php | |
parent | Split Calculatable in trait and interface (diff) |
Braintree integration: first version
Diffstat (limited to 'classes/Assignment.php')
-rw-r--r-- | classes/Assignment.php | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/classes/Assignment.php b/classes/Assignment.php index 27efb4a..2ceef94 100644 --- a/classes/Assignment.php +++ b/classes/Assignment.php @@ -24,8 +24,8 @@ /** * An interface to the assignment table in the database */ -class Assignment extends Model { - use Calculatable; +class Assignment extends Model implements Calculatable { + use StandardCalculatable; public $table = 'assignment', @@ -50,11 +50,11 @@ class Assignment extends Model { return $pd->text($this->description); } - protected function calculateSubtotal() { + public function calculateSubtotal() { return $this->hours * $this->price_per_hour; } - protected function calculateVAT() { + public function calculateVAT() { return $this->calculateSubtotal() * $this->VAT_percentage / 100; } } |