From 0b60b0ccc66cbcc26619ac762b8881f52fa85bf7 Mon Sep 17 00:00:00 2001 From: Camil Staps Date: Wed, 20 Jul 2016 10:54:07 +0200 Subject: Discounts --- include/offers-overview.php | 285 ++++++++++++++++++++++---------------------- 1 file changed, 144 insertions(+), 141 deletions(-) (limited to 'include/offers-overview.php') diff --git a/include/offers-overview.php b/include/offers-overview.php index 566f387..594f01c 100644 --- a/include/offers-overview.php +++ b/include/offers-overview.php @@ -19,151 +19,154 @@ ?>
# | -Contact | -Assignments | -Dates | -Invoice | -Tools | -
---|
# | +Contact | +Assignments & discounts | +Dates | +Invoice | +Tools | +||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
{$offer->getId()} | -{$offer->getContact()->getName()} | -";
- foreach ($offer->getAssignments() as $assignment) {
- echo "{$assignment->getTitle()} (".constants::invoice_valuta."{$assignment->calculate(assignment::SUBTOTAL)} excl. VAT, ".constants::invoice_valuta."{$assignment->calculate(assignment::TOTAL)} incl. VAT) {$assignment->getDescription()} "; - } - echo " |
-
-
|
- "
- . (($invoiceFile instanceof file)
- ? "
-
- "
- : "")
- . " -
|
- - - | -||||||||||||||
There are no offers in the database. Why not start with creating one, below? |
{$assignment->getDescription()}
"; + } + foreach ($offer->getDiscounts() as $discount) { + echo "{$discount->getTitle()}{$discount->getDescription()}
"; + } + echo "From: | +".BusinessAdmin::formatDate($offer->getStartDate(),false,true)." | +
---|---|
To: | +".BusinessAdmin::formatDate($offer->getEndDate(),false,true)." | +
Invoice: | +".BusinessAdmin::formatDate($offer->getInvoiceDate(),false,true)." | +
Payment received: | +".BusinessAdmin::formatDate($offer->getPaymentReceived(),false,true)." | +
Subtotal: | +".constants::invoice_valuta."{$offer->calculate(offer::SUBTOTAL)} | +
---|---|
VAT: | +".constants::invoice_valuta."{$offer->calculate(offer::VAT)} | +
Total: | +".constants::invoice_valuta."{$offer->calculate(offer::TOTAL)} | + +