aboutsummaryrefslogtreecommitdiff
path: root/include/offers-view.php
diff options
context:
space:
mode:
authorCamil Staps2016-09-02 20:21:06 +0200
committerCamil Staps2016-09-02 20:21:06 +0200
commit4036eddde27be47ad72e419f38a737c8ec2a819b (patch)
treea4e8886766309a351fec0b515097c27cf59a0bf2 /include/offers-view.php
parentMinor but significant fixes (diff)
more links, editable dates on offer view pageHEADmaster
Diffstat (limited to 'include/offers-view.php')
-rw-r--r--include/offers-view.php62
1 files changed, 62 insertions, 0 deletions
diff --git a/include/offers-view.php b/include/offers-view.php
index 908db94..930f112 100644
--- a/include/offers-view.php
+++ b/include/offers-view.php
@@ -21,6 +21,68 @@ require_once(__DIR__ . '/../login.php');
$_offer = new Offer($_pdo, $_id);
?>
+<div class="col-lg-12">
+ <div class="panel panel-default">
+ <div class="panel-heading">Details</div>
+ <div class="panel-body table-responsive">
+ <table class="table table-bordered">
+ <thead>
+ <tr>
+ <th>Contact</th>
+ <th>Dates</th>
+ <th>Price</th>
+ </tr>
+ </thead>
+ <tbody>
+ <?php
+ echo "<tr>
+ <td class='col-min-width'>
+ <a href='".Constants::url_internal."/contacts?id={$_offer->getContact()->id}'>{$_offer->getContact()->name}</a>
+ (<a href='".Constants::url_internal."/clients?id={$_offer->getContact()->getClient()->id}'>{$_offer->getContact()->getClient()->name}</a>)
+ </td>
+ <td class='col-min-width'>
+ <table>
+ <tr>
+ <th style='padding-right:1em;'>From:</th>
+ <td><a href='#' class='editable' id='editable-offer-{$_offer->id}-start_date' data-type='text' data-pk='{$_offer->id}' data-url='".Constants::url_external."offers/edit'>".BusinessAdmin::formatDate($_offer->start_date,false,true)."</a></td>
+ </tr>
+ <tr>
+ <th style='padding-right:1em;'>To:</th>
+ <td><a href='#' class='editable' id='editable-offer-{$_offer->id}-end_date' data-type='text' data-pk='{$_offer->id}' data-url='".Constants::url_external."offers/edit'>".BusinessAdmin::formatDate($_offer->end_date,false,true)."</a></td>
+ </tr>
+ <tr>
+ <th style='padding-right:1em;'>Invoice:</th>
+ <td><a href='#' class='editable' id='editable-offer-{$_offer->id}-invoice_date' data-type='text' data-pk='{$_offer->id}' data-url='".Constants::url_external."offers/edit'>".BusinessAdmin::formatDate($_offer->invoice_date,false,true)."</a></td>
+ </tr>
+ <tr>
+ <th style='padding-right:1em;'>Payment received:</th>
+ <td><a href='#' class='editable' id='editable-offer-{$_offer->id}-payment_received' data-type='text' data-pk='{$_offer->id}' data-url='".Constants::url_external."offers/edit'>".BusinessAdmin::formatDate($_offer->getPaymentReceived(),false,true)."</a></td>
+ </tr>
+ </table>
+ </td>
+ <td class='col-min-width'>
+ <table>
+ <tr>
+ <th style='padding-right:1em;'>Subtotal:</th>
+ <td>".Constants::invoice_valuta."{$offer->calculate(Calculatable::SUBTOTAL)}</td>
+ </tr>
+ <tr>
+ <th style='padding-right:1em;'>VAT:</th>
+ <td>".Constants::invoice_valuta."{$offer->calculate(Calculatable::VAT)}</td>
+ <tr>
+ </tr>
+ <th style='padding-right:1em;'>Total:</th>
+ <td>".Constants::invoice_valuta."{$offer->calculate(Calculatable::TOTAL)}</td>
+ </tr>
+ </table>
+ </td>
+ </tr>";
+ ?>
+ </tbody>
+ </table>
+ </div>
+ </div>
+</div>
<div class="col-lg-6">
<div class="panel panel-default">
<div class="panel-heading">Assignments</div>