salix/modules/client/front/balance/create/index.html

93 lines
2.8 KiB
HTML

<tpl-title translate>
New payment
</tpl-title>
<tpl-body>
<vn-crud-model
auto-load="true"
url="Companies"
data="companies"
order="code"
required="true">
</vn-crud-model>
<vn-horizontal>
<vn-date-picker
label="Date"
ng-model="$ctrl.receipt.payed"
required="true">
</vn-date-picker>
<vn-autocomplete
data="companies"
label="Company"
show-field="code"
value-field="id"
ng-model="$ctrl.companyFk"
required="true">
</vn-autocomplete>
</vn-horizontal>
<vn-horizontal>
<vn-autocomplete
label="Bank"
url="Banks"
show-field="bank"
value-field="id"
fields="['accountingTypeFk']"
include="{relation: 'accountingType'}"
ng-model="$ctrl.bankFk"
search-function="$ctrl.bankSearchFunc($search)"
selection="$ctrl.bankSelection"
order="id"
required="true">
<tpl-item>{{id}}: {{bank}}</tpl-item>
</vn-autocomplete>
<vn-input-number
vn-focus
label="Amount"
ng-model="$ctrl.amountPaid"
step="0.01"
required="true"
max="$ctrl.maxAmount">
</vn-input-number>
</vn-horizontal>
<vn-vertical ng-show="$ctrl.bankSelection.accountingType.code == 'compensation'">
<h6 translate>Compensation</h6>
<vn-textfield
ng-model="$ctrl.receipt.compensationAccount"
label="Compensation Account"
on-change="$ctrl.accountShortToStandard(value)">
</vn-textfield>
</vn-vertical>
<vn-horizontal>
<vn-textfield
label="Reference"
ng-model="$ctrl.receipt.description"
rule
required="true">
</vn-textfield>
</vn-horizontal>
<vn-vertical ng-show="$ctrl.bankSelection.accountingType.code == 'cash'">
<h6 translate>Cash</h6>
<vn-horizontal>
<vn-input-number
ng-model="$ctrl.deliveredAmount"
label="Delivered amount"
step="0.01">
</vn-input-number>
<vn-input-number
disabled="true"
ng-model="$ctrl.amountToReturn"
label="Amount to return">
</vn-input-number>
</vn-horizontal>
</vn-vertical>
<vn-horizontal ng-show="$ctrl.bankSelection.accountingType.code == 'cash'">
<vn-check
label="View receipt"
ng-model="$ctrl.viewReceipt">
</vn-check>
</vn-horizontal>
</tpl-body>
<tpl-buttons>
<input type="button" response="cancel" translate-attr="{value: 'Cancel'}"/>
<button response="accept" translate vn-focus>Accept</button>
</tpl-buttons>