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/offer.html | 1491 ----------------------------------------------- 1 file changed, 1491 deletions(-) delete mode 100644 docs/classes/offer.html (limited to 'docs/classes/offer.html') diff --git a/docs/classes/offer.html b/docs/classes/offer.html deleted file mode 100644 index 996eb5a..0000000 --- a/docs/classes/offer.html +++ /dev/null @@ -1,1491 +0,0 @@ - - -
- - -An interface to the offer table in the database
- - - -__construct(\PDO $pdo, integer $id)-
Create a new instance
-Blah
- -\PDO | -$pdo | -The PDO class, to access the database |
-
integer | -$id | -The id of the offer to fetch |
-
If something went wrong with the database
If the offer could not be found
getContact() : \contact-
Get the contact that this offer is linked to
- - - - -The contact
- -getAssignments() : array<mixed,\assignment>-
Get all assignments for this offer
- - - -If something went wrong with the database
An array indexed by id of instances of the assignment class
- -setStartDate(integer $start_date) : boolean
- Set the start date of the assignment
- - -integer | -$start_date | -The new start date for the assignment as a UNIX timestamp |
-
If something went wrong with the database
True on succes, false on failure
- -setEndDate(integer $end_date) : boolean
- Set the end date of the assignment
- - -integer | -$end_date | -The new end date for the assignment as a UNIX timestamp |
-
If something went wrong with the database
True on succes, false on failure
- -setInvoiceDate(integer $invoice_date) : boolean
- Set the invoice date of the assignment
- - -integer | -$invoice_date | -The new invoice date for the assignment as a UNIX timestamp |
-
If something went wrong with the database
True on succes, false on failure
- -setPaymentReceived(integer $payment_received) : boolean
- Set the payment received date of the assignment
- - -integer | -$payment_received | -The new date the payment has been received as a UNIX timestamp |
-
If something went wrong with the database
True on succes, false on failure
- -getInvoiceFile() : \file|null-
Get the file that the invoice this offer is linked to
- - - - -The file, or null if it doesn't exist
- -setInvoiceFileId(integer $invoice_fileId) : boolean
- Set the invoice file id of the assignment
- - -integer | -$invoice_fileId | -The new invoice file id 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 a handy number about the invoice
-Subtotal: the sum of the prices of the assignments excl. VAT
-VAT: the sum of all the VAT from all the assignments
-Total: the sum of subtotal and total
- -integer | -$what | -Any of offer::SUBTOTAL, offer::VAT and offer::TOTAL |
-
integer | -$round | -How many decimals to round the result 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 to $round decimals, or false on incorrect input
- -delete() : boolean-
Remove this offer from the database
-If this doesn't succeed (i.e. false is returned), that means the offer was removed manually or by another instance of this class
- - -If something went wrong with the database
True on success, false on failure
- -createAssignment(string $title, string $description, integer $hours, float $price_per_hour, float $vat) : \assignment-
Make a new assignment linked to this order
- - -string | -$title | -The title for this assignment |
-
string | -$description | -The description for this assignment |
-
integer | -$hours | -The amount of hours to work on this assignment |
-
float | -$price_per_hour | -The price per hour on this assignment |
-
float | -$vat | -The VAT percentage (so, 21 for 21%, not 0.21!) |
-
If something went wrong with the database
If there was a problem with the input
A new instance of the assignment class containing the new assignment
- -generateInvoice() : \file-
Generate a PDF invoice
- - - -If something went wrong with the database
If the file could not be written or an other error occured
An instance of the file class with information on the invoice file generated
- -