This commit is contained in:
2018-01-25 21:49:30 +01:00
parent fb19c401fd
commit bc0bd51801
16 changed files with 623 additions and 219 deletions
+1 -1
View File
@@ -65,7 +65,7 @@
<tr>
<td colspan="5">
<button class="btn btn-primary btn-round btn-sm" data-bind="click:newProjecthour">
nieuwe projecturen
nieuwe uren
</button>
</td>
</tr>
@@ -0,0 +1,182 @@
<div class="panel panel-bordered panel-primary panel-line">
<div class="panel-heading panel-heading-project">
<h3 class="">
facturen
</h3>
</div>
<div class="panel-body panel-body-project">
<table class="table table-sm">
<thead>
<th class="table-cyanish-header">&nbsp;</th>
<th class="table-cyanish-header">
factuurnummer
</th>
<th class="table-cyanish-header">
factuurdatum
</th>
<th class="table-cyanish-header">
bedrag (excl)
</th>
<th class="table-cyanish-header">
bedrag (incl)
</th>
<th class="table-cyanish-header">
prognose(excl)
</th>
<th class="table-cyanish-header">
prognose datum
</th>
<th class="table-cyanish-header">
btw tarief
</th>
<th class="table-cyanish-header" width="40px">
&nbsp;
</th>
</thead>
<tbody data-bind="foreach:invoices">
<tr>
<td>
<i class="icon fa-chevron-right" data-bind="visible: ! showPayments(), click:$root.togglePayments"></i>
<i class="icon fa-chevron-down" data-bind="visible:showPayments(), click:$root.togglePayments"></i>
</td>
<td>
<span data-bind="text:invoicenumber, visible:! inEdit()"></span>
<input type="text"
class="form-control form-control-sm"
placeholder="factuurnummer"
data-bind="textInput:invoicenumber, visible:inEdit,
event:{change:$root.saveInvoice}"/>
</td>
<td>
<span data-bind="text:invoicedate, visible:! inEdit()"></span>
<input type="text"
class="form-control form-control-sm"
placeholder="start"
data-bind="datepicker:{dateFormat: 'dd-mm-yy' },
value:invoicedate, visible:inEdit,
event:{change:$root.saveInvoice}"/>
</td>
<td class="align-right">
<span data-bind=" visible: ! inEdit()">
<i class="icon fa-euro"></i>
<span data-bind="text:invoiceamount"></span>
</span>
<input type="text"
class="form-control form-control-sm align-right"
paceholder="bedrag"
data-bind="textInput:invoiceamount, visible:inEdit,
event:{change:$root.saveInvoice,keyup:$root.validateNumber.bind($data, 'invoiceamount')}"/>
</td>
<td>
<i class="icon fa-euro"></i>
<span data-bind="text:inclBtw"></span>
</td>
<td class="align-right">
<span data-bind=" visible: ! inEdit()">
<i class="icon fa-euro"></i>
<span data-bind="text:forecastamount"></span>
</span>
<input type="text"
class="form-control form-control-sm align-right"
paceholder="bedrag"
data-bind="textInput:forecastamount, visible:inEdit,
event:{change:$root.saveInvoice,keyup:$root.validateNumber.bind($data, 'forecastamount')}"/>
</td>
<td>
<span data-bind="text:forecastdate, visible:! inEdit()"></span>
<input type="text"
class="form-control form-control-sm"
placeholder="start"
data-bind="datepicker:{dateFormat: 'dd-mm-yy' },
value:forecastdate, visible:inEdit,
event:{change:$root.saveInvoice}"/>
</td>
<td>
<span data-bind="visible:! inEdit()">
<span data-bind="text:dbo.helpers.findArrayElement('id', 'vatrate', vat_id(), $root.vats())"></span>
%
</span>
<select class="form-control form-control-sm"
data-bind="options:$root.vats,
optionsText:'vatrate',
optionsValue:'id',
value:vat_id,
optionsCaption:'btw',
visible:inEdit(),
event:{change:$root.saveInvoice}">
</select>
</td>
<td>
<i class="icon fa-edit pointer" title="wijzig" data-bind="click:$root.editInvoice"></i>
<i class="icon fa-trash redish pointer" title="verwijder"
data-bind="click:$root.removeInvoice"></i>
</td>
</tr>
<tr data-bind="visible:showPayments()">
<td colspan="8">
<table class="table table-condensed">
<thead>
<th>&nbsp;</th>
<th class="table-cyanish-header-light">
datum
</th>
<th class="table-cyanish-header-light">
bedrag
</th>
<th class="table-cyanish-header-light">
</th>
</thead>
<tbody data-bind="foreach:payments">
<tr>
<td>&nbsp;</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>
<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.saveInvoice,
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>
<td colspan="4">
<button class="btn btn-primary btn-round btn-sm" data-bind="click:$root.newPayment">
nieuwe betaling
</button>
</td>
</tfoot>
</table>
</td>
</tr>
</tbody>
<tfoot>
<tr>
<td colspan="5">
<button class="btn btn-primary btn-round btn-sm" data-bind="click:newInvoice">
nieuwe factuur
</button>
</td>
</tr>
</tfoot>
</table>
</div>
</div>
@@ -1,75 +0,0 @@
<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>
@@ -23,50 +23,49 @@
&nbsp;
</th>
</thead>
<tbody data-bind="foreach:projecthours">
<tbody data-bind="foreach:projectcosts">
<tr>
<td>
<span data-bind="text:fullname, visible:! inEdit()"></span>
<span data-bind="text:contactperson, visible:! inEdit()"></span>
<select class="form-control form-control-sm"
data-bind="options:$root.projectEmployees,
optionsText:'fullname',
data-bind="options:$root.externals,
optionsText:'contactperson',
optionsValue:'id',
value:projectemployee_id,
optionsCaption:'medewerker',
value:external_id,
optionsCaption:'extern',
visible: inEdit(),
event:{change:$root.saveProjecthour}">
event:{change:$root.saveProjectcosts}">
</select>
</td>
<td class="align-right">
<span data-bind=" visible: ! inEdit()">
<span data-bind="text:hours"></span>
uur
<span data-bind="text:description"></span>
</span>
<input type="text"
class="form-control form-control-sm align-right"
paceholder="uren"
data-bind="textInput:hours, visible:inEdit,
event:{change:$root.saveProjecthour,keyup:$root.validateNumber.bind($data, 'hours')}"/>
paceholder="omschrijving"
data-bind="textInput:description, visible:inEdit,
event:{change:$root.saveProjectcosts"/>
</td>
<td>
<span data-bind="text:hourdate, visible:! inEdit()"></span>
<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:hourdate, visible:inEdit,
event:{change:$root.saveProjecthour}"/>
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:paymentamount"></span>
<span data-bind="text:costs"></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')}"/>
data-bind="textInput:costs, visible:inEdit,
event:{change:$root.saveProjectcosts,keyup:$root.validateNumber.bind($data, 'costs')}"/>
</td>
<td>
<i class="icon fa-edit pointer" title="wijzig" data-bind="click:$root.editProjecthour"></i>
@@ -78,8 +77,8 @@
<tfoot>
<tr>
<td colspan="5">
<button class="btn btn-primary btn-round btn-sm" data-bind="click:newProjecthour">
nieuwe projecturen
<button class="btn btn-primary btn-round btn-sm" data-bind="click:newProjectcost">
nieuwe projectkosten
</button>
</td>
</tr>