SUBTOTAL
-SUBTOTAL-
- -
From a22425e8c781c1b5e8a3707ea67736673d6bc797 Mon Sep 17 00:00:00 2001 From: Camil Staps Date: Sun, 15 Feb 2015 10:15:59 +0100 Subject: Updated makefile, removed docs (users can compile it themselves if they want) --- docs/classes/assignment.html | 1195 ------------------------------------------ 1 file changed, 1195 deletions(-) delete mode 100644 docs/classes/assignment.html (limited to 'docs/classes/assignment.html') diff --git a/docs/classes/assignment.html b/docs/classes/assignment.html deleted file mode 100644 index af462a7..0000000 --- a/docs/classes/assignment.html +++ /dev/null @@ -1,1195 +0,0 @@ - - -
- - -An interface to the assignment table in the database
- - - -__construct(\PDO $pdo, integer $id)-
Create a new instance
- - -\PDO | -$pdo | -The PDO class, to access the database |
-
integer | -$id | -The id of the assignment to fetch |
-
If something went wrong with the database
If the assignment could not be found
getOffer() : \offer-
Get the offer that this assignment is linked to
- - - - -The offer
- -setTitle(string $title) : boolean
- Set the title of the assignment
- - -string | -$title | -The new title for the assignment |
-
If something went wrong with the database
True on succes, false on failure
- -setDescription(string $description) : boolean
- Set the description of the assignment
- - -string | -$description | -The new description for the assignment |
-
If something went wrong with the database
True on succes, false on failure
- -setHours(integer $hours) : boolean
- Set the amount of hours of the assignment
- - -integer | -$hours | -The new amount hours for the assignment |
-
If something went wrong with the database
True on succes, false on failure
- -setPricePerHour(float $price_per_hour) : boolean
- Set the price per hour of the assignment
- - -float | -$price_per_hour | -The new price per hour for the assignment |
-
If something went wrong with the database
True on succes, false on failure
- -setVAT(float $vat) : boolean
- Set the VAT percentage of the assignment
- - -float | -$vat | -The new VAT percentage for the assignment |
-
If something went wrong with the database
True on succes, false on failure
- -calculate(integer $what = self::TOTAL, integer $round = 2, boolean $format = true) : float|boolean-
Calculate useful numbers about the assignment
-Subtotal: price_per_hour * hours
-VAT: subtotal * VAT_percentage
-Total: subtotal + VAT
- -integer | -$what | -Any of assignment::SUBTOTAL, assignment::VAT, assignment::TOTAL |
-
integer | -$round | -How many decimals to round on |
-
boolean | -$format | -Whether to format the number nicely (for output) or not (for calculations) |
-
If something went wrong with the database
The calculated value rounded on $round decimals, or false when the input is incorrect
- -delete() : boolean-
Remove this assignment from the database
-If this doesn't succeed (i.e. false is returned), that means the assignment was removed manually or by another instance of this class
- - -If something went wrong with the database
True on success, false on failure
- -