salix/modules/invoiceIn/front/tax/index.html

99 lines
3.3 KiB
HTML
Raw Normal View History

2021-06-09 08:20:18 +00:00
<vn-crud-model
vn-id="model"
url="InvoiceInTaxes"
2021-06-30 06:26:03 +00:00
fields="[
'id',
'invoiceInFk',
'taxableBase',
'expenseFk',
'foreignValue',
'taxTypeSageFk',
'transactionTypeSageFk']"
2021-06-09 08:20:18 +00:00
link="{invoiceInFk: $ctrl.$params.id}"
data="$ctrl.taxes"
auto-load="true">
</vn-crud-model>
<vn-crud-model
url="Expenses"
data="expenses"
auto-load="true">
</vn-crud-model>
<vn-watcher
vn-id="watcher"
2021-06-15 07:02:00 +00:00
data="$ctrl.taxes"
2021-06-09 08:20:18 +00:00
form="form">
</vn-watcher>
2021-06-16 16:36:42 +00:00
<form name="form" ng-submit="$ctrl.onSubmit()">
2021-06-09 08:20:18 +00:00
<vn-card class="vn-pa-lg">
<vn-horizontal ng-repeat="invoiceInTax in $ctrl.taxes">
2021-06-25 05:47:53 +00:00
<vn-autocomplete vn-three vn-id="expense" vn-focus
2021-06-09 08:20:18 +00:00
label="Expense"
ng-model="invoiceInTax.expenseFk"
data="expenses"
show-field="id"
rule>
<tpl-item>{{id}}: {{name}}</tpl-item>
</vn-autocomplete>
<vn-input-number vn-one
2021-06-25 05:47:53 +00:00
disabled="$ctrl.invoiceIn.currency.code != 'EUR'"
2021-06-29 08:33:01 +00:00
step="0.01"
2021-06-25 07:30:24 +00:00
label="Taxable base"
2021-06-09 08:20:18 +00:00
ng-model="invoiceInTax.taxableBase"
rule>
</vn-input-number>
2021-06-25 05:47:53 +00:00
<vn-autocomplete vn-three
2021-06-25 07:30:24 +00:00
label="Sage tax"
2021-06-09 08:20:18 +00:00
ng-model="invoiceInTax.taxTypeSageFk"
2021-07-03 07:19:03 +00:00
url="SageTaxTypes"
2021-06-09 08:20:18 +00:00
show-field="vat"
2021-07-12 13:27:36 +00:00
fields="['id', 'vat', 'rate']"
2021-06-09 08:20:18 +00:00
search-function="{or: [{id: $search}, {vat: {like: '%'+ $search +'%'}}]}"
2021-08-09 12:06:23 +00:00
selection="taxRateSelection"
2021-06-09 08:20:18 +00:00
rule>
<tpl-item>{{id}}: {{vat}}</tpl-item>
</vn-autocomplete>
2021-06-25 05:47:53 +00:00
<vn-autocomplete vn-three
2021-06-25 07:30:24 +00:00
label="Sage transaction"
2021-06-09 08:20:18 +00:00
ng-model="invoiceInTax.transactionTypeSageFk"
2021-07-03 07:19:03 +00:00
url="SageTransactionTypes"
2021-06-09 08:20:18 +00:00
show-field="transaction"
search-function="{or: [{id: $search}, {transaction: {like: '%'+ $search +'%'}}]}"
rule>
<tpl-item>{{id}}: {{transaction}}</tpl-item>
</vn-autocomplete>
2021-08-09 12:06:23 +00:00
<vn-textfield
2021-06-25 05:47:53 +00:00
disabled="true"
2021-06-25 07:30:24 +00:00
label="Rate"
2021-08-09 12:06:23 +00:00
field="$ctrl.taxRate(invoiceInTax, taxRateSelection) | currency:'EUR':2">
</vn-textfield>
<vn-input-number
2021-06-25 05:47:53 +00:00
disabled="$ctrl.invoiceIn.currency.code == 'EUR'"
2021-06-25 07:30:24 +00:00
label="Foreign value"
2021-06-09 08:20:18 +00:00
ng-model="invoiceInTax.foreignValue"
rule>
</vn-input-number>
<vn-none>
<vn-icon-button
vn-tooltip="Remove tax"
icon="delete"
ng-click="model.remove($index)"
tabindex="-1">
</vn-icon-button>
</vn-none>
</vn-horizontal>
<vn-one>
<vn-icon-button
vn-bind="+"
vn-tooltip="Add tax"
icon="add_circle"
ng-click="$ctrl.add()">
</vn-icon-button>
</vn-one>
</vn-card>
2021-06-25 05:47:53 +00:00
<vn-button-bar>
2021-06-09 08:20:18 +00:00
<vn-submit
disabled="!watcher.dataChanged()"
label="Save">
</vn-submit>
</vn-button-bar>
</form>