From 4f84eb2b09bf51eabdc29b5eeec101e0260b1cb7 Mon Sep 17 00:00:00 2001 From: Camil Staps Date: Thu, 28 Jul 2016 09:37:48 +0200 Subject: Braintree integration: first version --- classes/Discount.php | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'classes/Discount.php') diff --git a/classes/Discount.php b/classes/Discount.php index 7216615..4084d43 100644 --- a/classes/Discount.php +++ b/classes/Discount.php @@ -24,8 +24,8 @@ /** * An interface to the discount table in the database */ -class Discount extends Model { - use Calculatable; +class Discount extends Model implements Calculatable { + use StandardCalculatable; public $table = 'discount', @@ -50,11 +50,11 @@ class Discount extends Model { return $pd->text($this->description); } - protected function calculateSubtotal() { + public function calculateSubtotal() { return - $this->value; } - protected function calculateVAT() { + public function calculateVAT() { return $this->calculateSubtotal() * $this->VAT_percentage / 100; } } -- cgit v1.2.3