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 @@ ?>
-
-
Overview
-
- - - - - - - - - - - - - getInvoiceFile(); +
+
Overview
+
+
#ContactAssignmentsDatesInvoiceTools
+ + + + + + + + + + + + getInvoiceFile(); - echo " - - - - - - - "; - } - if (count($offers) == 0) { - echo ""; - } - ?> - -
#ContactAssignments & discountsDatesInvoiceTools
{$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 "
- - - - - - - - - - - - - - - - - -
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)."
-
" - . (($invoiceFile instanceof file) - ? " - - " - : "") - . "
- - - - - - - - - - - - - -
Subtotal:".constants::invoice_valuta."{$offer->calculate(offer::SUBTOTAL)}
VAT:".constants::invoice_valuta."{$offer->calculate(offer::VAT)}
Total:".constants::invoice_valuta."{$offer->calculate(offer::TOTAL)}
-
- -
There are no offers in the database. Why not start with creating one, below?
-
-
+ echo " + {$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()}

"; + } + foreach ($offer->getDiscounts() as $discount) { + echo "{$discount->getTitle()}
(".constants::invoice_valuta."{$discount->calculate(discount::SUBTOTAL)} excl. VAT, ".constants::invoice_valuta."{$discount->calculate(discount::TOTAL)} incl. VAT)

{$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)."
+ + " + . (($invoiceFile instanceof file) + ? " + + " + : "") + . "
+ + + + + + + + + + + + + +
Subtotal:".constants::invoice_valuta."{$offer->calculate(offer::SUBTOTAL)}
VAT:".constants::invoice_valuta."{$offer->calculate(offer::VAT)}
Total:".constants::invoice_valuta."{$offer->calculate(offer::TOTAL)}
+ + + + + "; + } + if (count($offers) == 0) { + echo "There are no offers in the database. Why not start with creating one, below?"; + } + ?> + + +
+
-
-
Create new
-
-
-
-
- - -
- -
- -
-
-
\ No newline at end of file + // Callback for when form submission encountered an error + function newOfferError() { + $('#newOffer .ajaxify-response') + .addClass('alert-danger') + .show() + .find('.ajaxify-response-text') + .html('An unknown error occurred. Please contact support.'); + + $('#newOffer input, #newOffer button').prop('disabled', false); + $('#newOffer').data('bootstrapValidator').resetForm(); + } + + + + -- cgit v1.2.3