aboutsummaryrefslogtreecommitdiff
path: root/classes/Assignment.php
diff options
context:
space:
mode:
authorCamil Staps2016-07-28 17:27:43 +0200
committerCamil Staps2016-07-28 17:27:43 +0200
commit4eb1f57eec9304f2a4d6f204ff4702ab11c4c430 (patch)
tree0da2d6abe811a8d0d1cfdb9ab948076dd0dceedc /classes/Assignment.php
parentv0.5.1 secret files (diff)
Removed duplicate code
Diffstat (limited to 'classes/Assignment.php')
-rw-r--r--classes/Assignment.php25
1 files changed, 1 insertions, 24 deletions
diff --git a/classes/Assignment.php b/classes/Assignment.php
index 2ceef94..91f430a 100644
--- a/classes/Assignment.php
+++ b/classes/Assignment.php
@@ -24,37 +24,14 @@
/**
* An interface to the assignment table in the database
*/
-class Assignment extends Model implements Calculatable {
+class Assignment extends OfferItem {
use StandardCalculatable;
public
$table = 'assignment',
$fillable_columns = ['offerId', 'title', 'description', 'hours', 'price_per_hour', 'VAT_percentage'];
- /**
- * Get the offer that this assignment is linked to
- *
- * @return offer The offer
- */
- public function getOffer() {
- return new Offer($this->pdo, $this->offerId);
- }
-
- /**
- * The description after having parsed markdown
- *
- * @return string The description in HTML format
- */
- public function getHTMLDescription() {
- $pd = new Parsedown;
- return $pd->text($this->description);
- }
-
public function calculateSubtotal() {
return $this->hours * $this->price_per_hour;
}
-
- public function calculateVAT() {
- return $this->calculateSubtotal() * $this->VAT_percentage / 100;
- }
}