aboutsummaryrefslogtreecommitdiff
path: root/classes/Calculatable.php
diff options
context:
space:
mode:
authorCamil Staps2016-07-27 21:36:56 +0200
committerCamil Staps2016-07-27 21:36:56 +0200
commitae7e885619c0a3112765d9e32df2b3dd68a35d6a (patch)
treea25eb564998b9b68027f2758b6f90d7be22dd7b1 /classes/Calculatable.php
parentOffer: use Model (diff)
Move SUBTOTAL, VAT and TOTAL to Calculatable
Diffstat (limited to 'classes/Calculatable.php')
-rw-r--r--classes/Calculatable.php6
1 files changed, 5 insertions, 1 deletions
diff --git a/classes/Calculatable.php b/classes/Calculatable.php
index 1d51f0f..086adc2 100644
--- a/classes/Calculatable.php
+++ b/classes/Calculatable.php
@@ -27,6 +27,10 @@
* total can be calculated
*/
trait Calculatable {
+ const SUBTOTAL = 1;
+ const VAT = 2;
+ const TOTAL = 3;
+
/**
* Calculate the subtotal
*
@@ -57,7 +61,7 @@ trait Calculatable {
* VAT: the sum of all the VAT from all the assignments
* Total: the sum of subtotal and total
*
- * @param int $what Any of offer::SUBTOTAL, offer::VAT and offer::TOTAL
+ * @param int $what Any of Calculatable::SUBTOTAL, Calculatable::VAT and Calculatable::TOTAL
* @param int $round How many decimals to round the result on
* @param bool $format Whether to format the number nicely (for output) or not (for calculations)
*