diff options
author | Camil Staps | 2016-07-20 10:54:07 +0200 |
---|---|---|
committer | Camil Staps | 2016-07-20 10:54:07 +0200 |
commit | 0b60b0ccc66cbcc26619ac762b8881f52fa85bf7 (patch) | |
tree | b3575a335585250b300f4eafa2e0f250d8c41a2a /include/offers-view.php | |
parent | No minimum string length for assignment descriptions (diff) |
Discounts
Diffstat (limited to 'include/offers-view.php')
-rw-r--r-- | include/offers-view.php | 42 |
1 files changed, 42 insertions, 0 deletions
diff --git a/include/offers-view.php b/include/offers-view.php index c578522..eec7701 100644 --- a/include/offers-view.php +++ b/include/offers-view.php @@ -127,3 +127,45 @@ $_offer = new offer($_pdo, $_id); </div> </div> </div> +<div class="col-lg-6"> + <div class="panel panel-default"> + <div class="panel-heading">Discounts</div> + <div class="panel-body table-responsive"> + <table class="table table-bordered table-striped"> + <thead> + <tr> + <th>#</th> + <th>Briefing</th> + <th>Value</th> + <th>Tools</th> + </tr> + </thead> + <tbody> + <?php + $discounts = BusinessAdmin::getDiscounts($_pdo, array("offerId = {$_offer->getId()}")); + foreach ($discounts as $discount) { + echo "<tr> + <td class='col-min-width'>{$discount->getId()}</td> + <td class='col-max-width'> + <b><a href='#' class='editable' id='editable-discount-{$discount->getId()}-title' data-type='text' data-pk='{$discount->getId()}' data-url='".constants::url_external."discounts/edit'>{$discount->getTitle()}</a></b><br/> + <p>{$discount->getDescription()}</p> + </td> + <td class='col-min-width'> + ".constants::invoice_valuta."<a href='#' class='editable' id='editable-discount-{$discount->getId()}-value' data-type='text' data-pk='{$discount->getId()}' data-url='".constants::url_external."discounts/edit'>{$discount->getValue()}</a> / hr<br/> + <a href='#' class='editable' id='editable-discount-{$discount->getId()}-vat' data-type='text' data-pk='{$discount->getId()}' data-url='".constants::url_external."discounts/edit'>{$discount->getVAT()}</a>% VAT + </td> + <td class='col-min-width'> + <a title='View' href='".constants::url_internal."/discounts?id={$discount->getId()}' class='btn btn-primary btn-circle fa fa-arrow-right'></a> + <a title='Delete' href='".constants::url_internal."/discounts?delete={$discount->getId()}' class='btn btn-danger btn-circle fa fa-times'></a> + </td> + </tr>"; + } + if (count($discounts) == 0) { + echo "<tr><td colspan='6'>There are no discounts in the database. Why not start with creating one, below?</td></tr>"; + } + ?> + </tbody> + </table> + </div> + </div> +</div> |