107 lines
3.3 KiB
HTML
107 lines
3.3 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"
|
|
vn-name="payed"
|
|
required="true">
|
|
</vn-date-picker>
|
|
<vn-autocomplete
|
|
data="companies"
|
|
label="Company"
|
|
show-field="code"
|
|
value-field="id"
|
|
ng-model="$ctrl.companyFk"
|
|
vn-name="company"
|
|
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"
|
|
vn-name="bank"
|
|
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"
|
|
vn-name="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"
|
|
vn-name="compensationAccount"
|
|
label="Compensation Account"
|
|
on-change="$ctrl.accountShortToStandard(value)">
|
|
</vn-textfield>
|
|
</vn-vertical>
|
|
<vn-horizontal>
|
|
<vn-textfield
|
|
label="Reference"
|
|
ng-model="$ctrl.receipt.description"
|
|
vn-name="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-name="deliveredAmount">
|
|
</vn-input-number>
|
|
<vn-input-number
|
|
disabled="true"
|
|
ng-model="$ctrl.amountToReturn"
|
|
label="Amount to return"
|
|
vn-name="amountToReturn">
|
|
</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-name="viewReceipt">
|
|
</vn-check>
|
|
<vn-check
|
|
label="Send email"
|
|
ng-model="$ctrl.sendEmail"
|
|
vn-name="sendEmail">
|
|
</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>
|