Files
dbois/application/views/modals/partials/_payments.php
T
2018-01-23 08:45:44 +01:00

75 lines
3.1 KiB
PHP

<div class="panel panel-bordered panel-primary panel-line">
<div class="panel-heading panel-heading-project">
<h3 class="">
betalingen
</h3>
</div>
<div class="panel-body panel-body-project">
<table class="table table-sm">
<thead>
<th class="table-cyanish-header">
offertenummer
</th>
<th class="table-cyanish-header">
datum
</th>
<th class="table-cyanish-header">
bedrag
</th>
<th class="table-cyanish-header" width="40px">
&nbsp;
</th>
</thead>
<tbody data-bind="foreach:payments">
<tr>
<td>
<span data-bind="text:offernumber, visible:! inEdit()"></span>
<select class="form-control form-control-sm"
data-bind="options:$root.offers,
optionsText:'offernumber',
optionsValue:'id',
value:offer_id,
optionsCaption:'offerte',
visible: inEdit(),
event:{change:$root.savePayment}">
</select>
</td>
<td>
<span data-bind="text:paymentdate, visible:! inEdit()"></span>
<input type="text"
class="form-control form-control-sm"
placeholder="start"
data-bind="datepicker:{dateFormat: 'dd-mm-yy' },
value:paymentdate, visible:inEdit,
event:{change:$root.savePayment}"/>
</td>
<td class="align-right">
<span data-bind=" visible: ! inEdit()">
<i class="icon fa-euro"></i>
<span data-bind="text:paymentamount"></span>
</span>
<input type="text"
class="form-control form-control-sm align-right"
paceholder="bedrag"
data-bind="textInput:paymentamount, visible:inEdit,
event:{change:$root.savePayment,keyup:$root.validateNumber.bind($data, 'paymentamount')}"/>
</td>
<td>
<i class="icon fa-edit pointer" title="wijzig" data-bind="click:$root.editPayment"></i>
<i class="icon fa-trash redish pointer" title="verwijder"
data-bind="click:$root.removePayment"></i>
</td>
</tr>
</tbody>
<tfoot>
<tr>
<td colspan="5">
<button class="btn btn-primary btn-round btn-sm" data-bind="click:newPayment">
nieuwe betaling
</button>
</td>
</tr>
</tfoot>
</table>
</div>
</div>