Files
dbois/application/views/modals/partials/_projectcosts.php
T

112 lines
5.0 KiB
PHP

<div class="panel panel-bordered panel-primary panel-line">
<div class="panel-heading panel-heading-project">
<h3 class="">
inkomende facturen
</h3>
</div>
<div class="panel-body panel-body-project">
<table class="table table-sm">
<thead>
<th class="table-cyanish-header">
externe
</th>
<th class="table-cyanish-header">
omschrijving
</th>
<th class="table-cyanish-header">
datum
</th>
<th class="table-cyanish-header align-right">
bedrag
</th>
<th class="table-cyanish-header align-right">
betaald
</th>
<th class="table-cyanish-header align-right">
te betalen
</th>
<th class="table-cyanish-header" width="40px">
&nbsp;
</th>
</thead>
<tbody data-bind="foreach:projectcosts">
<tr>
<td>
<span data-bind="text:dbo.helpers.findArrayElement('id', 'contactperson', external_id(), $root.externals()),
visible:! inEdit()"></span>
<select class="form-control form-control-sm"
data-bind="options:$root.externals,
optionsText:'contactperson',
optionsValue:'id',
value:external_id,
optionsCaption:'extern',
visible: inEdit(),
event:{change:$root.saveProjectcosts}">
</select>
</td>
<td>
<span data-bind=" visible: ! inEdit()">
<span data-bind="text:description"></span>
</span>
<input type="text"
class="form-control form-control-sm align-right"
paceholder="omschrijving"
data-bind="textInput:description, visible:inEdit,
event:{change:$root.saveProjectcosts}"/>
</td>
<td>
<span data-bind="text:date, visible:! inEdit()"></span>
<input type="text"
class="form-control form-control-sm"
placeholder="start"
data-bind="datepicker:{dateFormat: 'dd-mm-yy' },
value:date, visible:inEdit,
event:{change:$root.saveProjectcosts}"/>
</td>
<td class="align-right">
<span data-bind=" visible: ! inEdit()">
<i class="icon fa-euro"></i>
<span data-bind="text:dbo.helpers.numberWithPoints(costs())"></span>
</span>
<input type="text"
class="form-control form-control-sm align-right"
paceholder="bedrag"
data-bind="textInput:costs, visible:inEdit,
event:{change:$root.saveProjectcosts,keyup:$root.validateNumber.bind($data, 'costs')}"/>
</td>
<td class="align-right">
<span data-bind=" visible: ! inEdit()">
<i class="icon fa-euro"></i>
<span data-bind="text:dbo.helpers.numberWithPoints(payed())"></span>
</span>
<input type="text"
class="form-control form-control-sm align-right"
paceholder="bedrag"
data-bind="textInput:payed, visible:inEdit,
event:{change:$root.saveProjectcosts,keyup:$root.validateNumber.bind($data, 'payed')}"/>
</td>
<td class="align-right">
<span>
<i class="icon fa-euro"></i>
<span data-bind="text:dbo.helpers.numberWithPoints(toPay())"></span>
</span>
</td>
<td>
<i class="icon fa-edit pointer" title="wijzig" data-bind="click:$root.editProjectcosts"></i>
<i class="icon fa-trash redish pointer" title="verwijder"
data-bind="click:$root.removeProjecthour"></i>
</td>
</tr>
</tbody>
<tfoot>
<tr>
<td colspan="5">
<button class="btn btn-primary btn-round btn-sm" data-bind="click:newProjectcost">
nieuwe projectkosten
</button>
</td>
</tr>
</tfoot>
</table>
</div>
</div>