From 9714f3d8cc311f3b75a4727156de2ab33cf3895e Mon Sep 17 00:00:00 2001 From: Camil Staps Date: Wed, 27 Jul 2016 16:28:19 +0200 Subject: Removed redundant whitespace & retab --- include/offers-view.php | 292 ++++++++++++++++++++++++------------------------ 1 file changed, 146 insertions(+), 146 deletions(-) (limited to 'include/offers-view.php') diff --git a/include/offers-view.php b/include/offers-view.php index 082af35..8f741c2 100644 --- a/include/offers-view.php +++ b/include/offers-view.php @@ -2,17 +2,17 @@ /** * BusinessAdmin: administrative software for small companies * Copyright (C) 2015 Camil Staps (ViviSoft) - * + * * This program is free software: you can redistribute it and/or modify * it under the terms of the GNU General Public License as published by * the Free Software Foundation, either version 3 of the License, or * (at your option) any later version. - * + * * This program is distributed in the hope that it will be useful, * but WITHOUT ANY WARRANTY; without even the implied warranty of * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * GNU General Public License for more details. - * + * * You should have received a copy of the GNU General Public License * along with this program. If not, see . */ @@ -22,152 +22,152 @@ require_once('./login.php'); $_offer = new offer($_pdo, $_id); ?>
-
-
- Timeline -
- -
-
    - $_offer->getId(), - 'contact' => $_offer->getContact()->getName(), - 'assignments' => '', - 'assignments_header' => '' - ); - foreach ($_offer->getAssignments() as $assignment) { - $temp['assignments'] .= "{$assignment->getTitle()}
    (".constants::invoice_valuta."{$assignment->calculate(assignment::SUBTOTAL)} excl. VAT, ".constants::invoice_valuta."{$assignment->calculate(assignment::TOTAL)} incl. VAT)

    {$assignment->getDescription()}

    "; - $temp['assignments_header'] .= "{$assignment->getTitle()}
    (".constants::invoice_valuta."{$assignment->calculate(assignment::SUBTOTAL)} excl. VAT, ".constants::invoice_valuta."{$assignment->calculate(assignment::TOTAL)} incl. VAT)
    "; - } - $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; - 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; - } - } +
    +
    + Timeline +
    + +
    +
      + time()) { - continue; - } - echo ""; - switch ($item['type']) { - case 'start': echo "
      "; break; - case 'end': echo "
      "; break; - case 'invoice': echo "
      "; break; - case 'payment_received': echo "
      "; break; - } - echo "
      "; - echo "

      #{$item['id']} to {$item['contact']}: {$item['description']}

      ".BusinessAdmin::formatDate($item['time'],false,true,true)."

      "; - switch ($item['type']) { - case 'start': echo "
      {$item['assignments']}
      "; break; - default: echo "
      {$item['assignments_header']}
      "; - } - echo "
      "; - echo ""; - } - ?> -
    -
    - -
    - + $temp = array( + 'id' => $_offer->getId(), + 'contact' => $_offer->getContact()->getName(), + 'assignments' => '', + 'assignments_header' => '' + ); + foreach ($_offer->getAssignments() as $assignment) { + $temp['assignments'] .= "{$assignment->getTitle()}
    (".constants::invoice_valuta."{$assignment->calculate(assignment::SUBTOTAL)} excl. VAT, ".constants::invoice_valuta."{$assignment->calculate(assignment::TOTAL)} incl. VAT)

    {$assignment->getDescription()}

    "; + $temp['assignments_header'] .= "{$assignment->getTitle()}
    (".constants::invoice_valuta."{$assignment->calculate(assignment::SUBTOTAL)} excl. VAT, ".constants::invoice_valuta."{$assignment->calculate(assignment::TOTAL)} incl. VAT)
    "; + } + $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; + 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; + } + } + + array_multisort($sort_list, SORT_DESC, $list); + $i = 0; + foreach ($list as $item) { + if ($item['time'] > time()) { + continue; + } + echo ""; + switch ($item['type']) { + case 'start': echo "
    "; break; + case 'end': echo "
    "; break; + case 'invoice': echo "
    "; break; + case 'payment_received': echo "
    "; break; + } + echo "
    "; + echo "

    #{$item['id']} to {$item['contact']}: {$item['description']}

    ".BusinessAdmin::formatDate($item['time'],false,true,true)."

    "; + switch ($item['type']) { + case 'start': echo "
    {$item['assignments']}
    "; break; + default: echo "
    {$item['assignments_header']}
    "; + } + echo "
    "; + echo ""; + } + ?> +
+
+ +
+
-
-
Assignments
-
- - - - - - - - - - - - getId()}")); - foreach ($assignments as $assignment) { - echo " - - - - - - "; - } - if (count($assignments) == 0) { - echo ""; - } - ?> - -
#BriefingTimePriceTools
{$assignment->getId()} - {$assignment->getTitle()}
-

{$assignment->getDescription()}

-
{$assignment->getHours()}h - ".constants::invoice_valuta."{$assignment->getPricePerHour()} / hr
- {$assignment->getVAT()}% VAT -
- - -
There are no assignments in the database. Why not start with creating one, below?
-
-
+
+
Assignments
+
+ + + + + + + + + + + + getId()}")); + foreach ($assignments as $assignment) { + echo " + + + + + + "; + } + if (count($assignments) == 0) { + echo ""; + } + ?> + +
#BriefingTimePriceTools
{$assignment->getId()} + {$assignment->getTitle()}
+

{$assignment->getDescription()}

+
{$assignment->getHours()}h + ".constants::invoice_valuta."{$assignment->getPricePerHour()} / hr
+ {$assignment->getVAT()}% VAT +
+ + +
There are no assignments in the database. Why not start with creating one, below?
+
+
-
-
Discounts
-
- - - - - - - - - - - getId()}")); - foreach ($discounts as $discount) { - echo " - - - - - "; - } - if (count($discounts) == 0) { - echo ""; - } - ?> - -
#BriefingValueTools
{$discount->getId()} - {$discount->getTitle()}
-

{$discount->getDescription()}

-
- ".constants::invoice_valuta."{$discount->getValue()} / hr
- {$discount->getVAT()}% VAT -
- - -
There are no discounts in the database. Why not start with creating one, below?
-
-
+
+
Discounts
+
+ + + + + + + + + + + getId()}")); + foreach ($discounts as $discount) { + echo " + + + + + "; + } + if (count($discounts) == 0) { + echo ""; + } + ?> + +
#BriefingValueTools
{$discount->getId()} + {$discount->getTitle()}
+

{$discount->getDescription()}

+
+ ".constants::invoice_valuta."{$discount->getValue()} / hr
+ {$discount->getVAT()}% VAT +
+ + +
There are no discounts in the database. Why not start with creating one, below?
+
+
-- cgit v1.2.3