aboutsummaryrefslogtreecommitdiff
path: root/include/offers-view.php
diff options
context:
space:
mode:
authorCamil Staps2016-07-27 21:29:57 +0200
committerCamil Staps2016-07-27 21:29:57 +0200
commit2acc7787e73c966c3fc1794d77dd758a3f56b566 (patch)
tree1def501ec9502dee79f0f54a470434a3b322f6a2 /include/offers-view.php
parentContact: use Model (diff)
Offer: use Model
Diffstat (limited to 'include/offers-view.php')
-rw-r--r--include/offers-view.php22
1 files changed, 11 insertions, 11 deletions
diff --git a/include/offers-view.php b/include/offers-view.php
index aba4c26..6f3e493 100644
--- a/include/offers-view.php
+++ b/include/offers-view.php
@@ -34,7 +34,7 @@ $_offer = new Offer($_pdo, $_id);
$sort_list = array();
$temp = array(
- 'id' => $_offer->getId(),
+ 'id' => $_offer->id,
'contact' => $_offer->getContact()->name,
'assignments' => '',
'assignments_header' => ''
@@ -43,16 +43,16 @@ $_offer = new Offer($_pdo, $_id);
$temp['assignments'] .= "<b>{$assignment->title}</b><br/><span class='smaller'>(".Constants::invoice_valuta."{$assignment->calculate(assignment::SUBTOTAL)} excl. VAT, ".Constants::invoice_valuta."{$assignment->calculate(assignment::TOTAL)} incl. VAT)</span><br/><p>{$assignment->getHTMLDescription()}</p>";
$temp['assignments_header'] .= "<b>{$assignment->title}</b><br/><span class='smaller'>(".Constants::invoice_valuta."{$assignment->calculate(assignment::SUBTOTAL)} excl. VAT, ".Constants::invoice_valuta."{$assignment->calculate(assignment::TOTAL)} incl. VAT)</span><br/>";
}
- $list[] = array_merge($temp, array('type' => 'start', 'time' => $_offer->getStartDate(), 'description' => 'Offer started'));
- $sort_list[] = $_offer->getStartDate() . $_offer->getId() . 0;
- $list[] = array_merge($temp, array('type' => 'end', 'time' => $_offer->getEndDate(), 'description' => 'Offer ended'));
- $sort_list[] = $_offer->getEndDate() . $_offer->getId() . 1;
- if ($_offer->getInvoiceDate() > 0) {
- $list[] = array_merge($temp, array('type' => 'invoice', 'time' => $_offer->getInvoiceDate(), 'description' => 'Invoice sent'));
- $sort_list[] = $_offer->getInvoiceDate() . $_offer->getId() . 2;
+ $list[] = array_merge($temp, array('type' => 'start', 'time' => $_offer->start_date, 'description' => 'Offer started'));
+ $sort_list[] = $_offer->start_date . $_offer->id . 0;
+ $list[] = array_merge($temp, array('type' => 'end', 'time' => $_offer->end_date, 'description' => 'Offer ended'));
+ $sort_list[] = $_offer->end_date . $_offer->id . 1;
+ if ($_offer->invoice_date > 0) {
+ $list[] = array_merge($temp, array('type' => 'invoice', 'time' => $_offer->invoice_date, 'description' => 'Invoice sent'));
+ $sort_list[] = $_offer->invoice_date . $_offer->id . 2;
if ($_offer->getPaymentReceived() > 0) {
$list[] = array_merge($temp, array('type' => 'payment_received', 'time' => $_offer->getPaymentReceived(), 'description' => 'Payment received'));
- $sort_list[] = $_offer->getPaymentReceived() . $_offer->getId() . 3;
+ $sort_list[] = $_offer->getPaymentReceived() . $_offer->id . 3;
}
}
@@ -101,7 +101,7 @@ $_offer = new Offer($_pdo, $_id);
</thead>
<tbody>
<?php
- $assignments = BusinessAdmin::getAssignments($_pdo, array("offerId = {$_offer->getId()}"));
+ $assignments = BusinessAdmin::getAssignments($_pdo, array("offerId = {$_offer->id}"));
foreach ($assignments as $assignment) {
echo "<tr>
<td class='col-min-width'>{$assignment->id}</td>
@@ -144,7 +144,7 @@ $_offer = new Offer($_pdo, $_id);
</thead>
<tbody>
<?php
- $discounts = BusinessAdmin::getDiscounts($_pdo, array("offerId = {$_offer->getId()}"));
+ $discounts = BusinessAdmin::getDiscounts($_pdo, array("offerId = {$_offer->id}"));
foreach ($discounts as $discount) {
echo "<tr>
<td class='col-min-width'>{$discount->id}</td>