Reservations

This commit is contained in:
2018-04-13 17:05:13 +02:00
parent 49bd541cb8
commit dbe736d941
14 changed files with 368 additions and 26 deletions
@@ -25,7 +25,7 @@
<th class="table-cyanish-header align-right">
te betalen
</th>
<th class="table-cyanish-header" width="40px">
<th class="table-cyanish-header" width="50px">
&nbsp;
</th>
</thead>
@@ -100,7 +100,7 @@
</tbody>
<tfoot>
<tr>
<td colspan="5">
<td colspan="7">
<button class="btn btn-primary btn-round btn-sm" data-bind="click:newProjectcost">
nieuwe projectkosten
</button>
@@ -7,17 +7,17 @@
<div class="panel-body panel-body-project">
<table class="table table-sm">
<thead>
<th class="table-cyanish-header" width="40%">
<th class="table-cyanish-header align-right" width="40%">
bedrag
</th>
<th class="table-cyanish-header" width="40%">
betaald
klant
</th>
<th class="table-cyanish-header" width="20%">&nbsp;</th>
</thead>
<tbody data-bind="foreach:reservations">
<tr>
<td class="align-right">
<td class="align-right" data-bind="css:{'red-line':invalidReservation()}">
<span data-bind="visible:!inEdit()">
<i class="icon fa-euro"></i>
<span data-bind="text:dbo.helpers.numberWithPoints(reservationamount())"></span>
@@ -28,13 +28,20 @@
data-bind="textInput:reservationamount, visible:inEdit,
event:{change:$root.saveReservation,keyup:$root.validateNumber.bind($data, 'reservationamount')}"/>
</td>
<td>
<i class="icon fa-square-o pointer" title="niet betaald"
data-bind="click:$root.setPayment.bind($data, 'PAYED'), visible:payed()=='UNPAYED'"></i>
<i class="icon fa-check pointer" title="betaald"
data-bind="click:$root.setPayment.bind($data, 'UNPAYED'), visible: payed()=='PAYED'"></i>
<td data-bind="css:{'red-line':invalidReservation()}">
<span data-bind="text:dbo.helpers.findArrayElement('id', 'contactperson', external_id(), $root.externals()),
visible:! inEdit()"></span>
<select class="form-control"
data-bind="
options:$root.externals,
optionsText:'contactperson',
optionsValue:'id',
value:external_id,
optionsCaption:'selecteer...',
visible: inEdit(),
event:{change:$root.saveReservation}"
</td>
<td>
<td data-bind="css:{'red-line':invalidReservation()}">
<i class="icon fa-edit pointer" title="wijzig" data-bind="click:$root.editReservation"></i>
<i class="icon fa-trash redish pointer" title="verwijder"
data-bind="click:$root.removeReservation"></i>
@@ -0,0 +1,84 @@
<div id="RESERVATIONS">
<div class="row">
<div class="col-md-6">
<table class="table table-condensed">
<thead>
<tr>
<th width="5px">&nbsp;</th>
<th>project</th>
<th class="align-right">gereserveerd</th>
<th class="align-right">betaald</th>
<th class="align-right">saldo</th>
</tr>
</thead>
<!-- ko foreach:projects -->
<tbody>
<tr>
<th>
<i class="icon fa-chevron-right"
data-bind="click:$root.toggleExternals, visible: ! showExternals()">
</i>
<i class="icon fa-chevron-down"
data-bind="click:$root.toggleExternals, visible:showExternals()">
</i>
</th>
<th>
<span data-bind="text:projectnumber"></span>
</th>
<th class="align-right" data-bind="visible: ! showExternals()">
<span data-bind="text:reservation"></span>
</th>
<th class="align-right" data-bind="visible: ! showExternals()">
<span data-bind="text:payed"></span>
</th>
<th class="align-right" data-bind="visible: ! showExternals()">
<span data-bind="text:saldo"></span>
</th>
</tr>
<!-- ko if:showExternals() -->
<!-- ko foreach: externals -->
<tr>
<td width="5px">&nbsp;</td>
<td>
<span data-bind="text:externalName"></span>
</td>
<td class="align-right">
<span data-bind="text:reservation"></span>
</td>
<td class="align-right">
<span data-bind="text:payed"></span>
</td>
<td class="align-right">
<span data-bind="text:saldo"></span>
</td>
</tr>
<!-- /ko -->
<!-- /ko -->
<!-- ko if:showExternals() -->
<tr class="subtotal">
<th colspan="2">Totaal</th>
<th class="align-right">
<span data-bind="text:reservation"></span>
</th>
<th class="align-right">
<span data-bind="text:payed"></span>
</th>
<th class="align-right">
<span data-bind="text:saldo"></span>
</th>
</tr>
<!-- /ko -->
</tbody>
<!-- /ko -->
<tfoot>
<tr class="grandtotal">
<th colspan="2">Grand totaal</th>
<th class="align-right"><span data-bind="text:reservation"></span></th>
<th class="align-right"><span data-bind="text:payed"></span></th>
<th class="align-right"><span data-bind="text:saldo"></span></th>
</tr>
</tfoot>
</table>
</div>
</div>
</div>
+2
View File
@@ -34,6 +34,7 @@
<script src="js/lib/modules/reports/monthlyEmployeeHoursModule.js?version=<?= $this->version ?>"></script>
<script src="js/lib/modules/reports/employeeHours.js?version=<?= $this->version ?>"></script>
<script src="js/lib/modules/reports/outgoingInvoices.js?version=<?= $this->version ?>"></script>
<script src="js/lib/modules/reports/reservations.js?version=<?= $this->version ?>"></script>
<!-- ***********MODALS************* -->
@@ -62,6 +63,7 @@
<script src="js/lib/dataservices/employeehoursDataService.js"></script>
<script src="js/lib/dataservices/reportsDataService.js"></script>
<script src="js/lib/dataservices/invoiceDataService.js"></script>
<script src="js/lib/dataservices/reservationsDataService.js"></script>
<script src="js/lib/services/chartService.js"></script>