Files
2026-01-09 11:41:28 +01:00

138 lines
6.1 KiB
PHP

<div class="panel panel-bordered panel-primary panel-line">
<div class="panel-heading panel-heading-project">
<h3 class="">
inkomende facturen (bedragen incl btw)
</h3>
</div>
<div class="panel-body panel-body-project">
<table class="table table-sm">
<thead>
<th class="table-cyanish-header">
onderaannemer
</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">
via<br />reservering
</th>
<th class="table-cyanish-header align-right">
te betalen
</th>
<th class="table-cyanish-header align-right">&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-center">
<!-- ko if:fromReservation() -->
&nbsp;<i class="icon fa-check pointer"
data-bind="click:$root.toggleFromReservation"></i>
<!-- /ko -->
<!-- ko if: ! fromReservation() -->
&nbsp;<i class="icon fa-square-o pointer"
data-bind="click:$root.toggleFromReservation"></i>
<!-- /ko -->
</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.removeProjectcosts"></i>
</td>
</tr>
</tbody>
<tfoot>
<tr>
<th colspan="3" class="table-cyanish-header"></th>
<th class="align-right table-cyanish-header">
<span data-bind="text:dbo.helpers.numberWithPoints(totalCosts())"></span>
</th>
<th class="align-right table-cyanish-header">
<span data-bind="text:dbo.helpers.numberWithPoints(totalPayed())"></span>
</th>
<th class="table-cyanish-header"></th>
<th class="align-right table-cyanish-header">
<span data-bind="text:dbo.helpers.numberWithPoints(totalToPay())"></span>
</th>
<th class="table-cyanish-header"></th>
</tr>
<tr>
<td colspan="8">
<button class="btn btn-primary btn-round btn-sm" data-bind="click:newProjectcost">
nieuwe projectkosten
</button>
</td>
</tr>
</tfoot>
</table>
</div>
</div>