2020-04-25 09:50:04 +00:00
|
|
|
<tpl-title translate>
|
|
|
|
New payment
|
|
|
|
</tpl-title>
|
|
|
|
<tpl-body>
|
2020-09-17 18:12:52 +00:00
|
|
|
<vn-crud-model
|
|
|
|
auto-load="true"
|
|
|
|
url="Companies"
|
|
|
|
data="companies"
|
2020-12-16 07:33:08 +00:00
|
|
|
order="code"
|
|
|
|
required="true">
|
2020-09-17 18:12:52 +00:00
|
|
|
</vn-crud-model>
|
2020-04-25 09:50:04 +00:00
|
|
|
<vn-horizontal>
|
|
|
|
<vn-date-picker
|
2023-02-09 09:26:55 +00:00
|
|
|
label="Date"
|
2020-12-16 07:33:08 +00:00
|
|
|
ng-model="$ctrl.receipt.payed"
|
2023-05-08 10:03:27 +00:00
|
|
|
vn-name="payed"
|
2020-12-16 07:33:08 +00:00
|
|
|
required="true">
|
2020-04-25 09:50:04 +00:00
|
|
|
</vn-date-picker>
|
|
|
|
<vn-autocomplete
|
2020-09-17 18:12:52 +00:00
|
|
|
data="companies"
|
2020-04-25 09:50:04 +00:00
|
|
|
label="Company"
|
|
|
|
show-field="code"
|
|
|
|
value-field="id"
|
2021-06-22 09:57:43 +00:00
|
|
|
ng-model="$ctrl.companyFk"
|
2023-05-08 10:03:27 +00:00
|
|
|
vn-name="company"
|
2021-06-22 09:57:43 +00:00
|
|
|
required="true">
|
2020-04-25 09:50:04 +00:00
|
|
|
</vn-autocomplete>
|
|
|
|
</vn-horizontal>
|
|
|
|
<vn-horizontal>
|
|
|
|
<vn-autocomplete
|
|
|
|
label="Bank"
|
2020-09-18 09:50:20 +00:00
|
|
|
url="Banks"
|
2020-04-25 09:50:04 +00:00
|
|
|
show-field="bank"
|
|
|
|
value-field="id"
|
2020-08-27 09:58:28 +00:00
|
|
|
fields="['accountingTypeFk']"
|
|
|
|
include="{relation: 'accountingType'}"
|
2021-01-19 08:27:15 +00:00
|
|
|
ng-model="$ctrl.bankFk"
|
2023-05-08 10:03:27 +00:00
|
|
|
vn-name="bank"
|
2021-09-03 12:00:47 +00:00
|
|
|
search-function="$ctrl.bankSearchFunc($search)"
|
2020-09-18 09:50:20 +00:00
|
|
|
selection="$ctrl.bankSelection"
|
2020-12-16 07:33:08 +00:00
|
|
|
order="id"
|
|
|
|
required="true">
|
2020-08-27 06:24:21 +00:00
|
|
|
<tpl-item>{{id}}: {{bank}}</tpl-item>
|
2020-04-25 09:50:04 +00:00
|
|
|
</vn-autocomplete>
|
|
|
|
<vn-input-number
|
|
|
|
vn-focus
|
|
|
|
label="Amount"
|
2021-01-21 09:25:25 +00:00
|
|
|
ng-model="$ctrl.amountPaid"
|
2023-05-08 10:03:27 +00:00
|
|
|
vn-name="amountPaid"
|
2020-04-25 09:50:04 +00:00
|
|
|
step="0.01"
|
2021-11-08 07:59:42 +00:00
|
|
|
required="true"
|
|
|
|
max="$ctrl.maxAmount">
|
2020-04-25 09:50:04 +00:00
|
|
|
</vn-input-number>
|
|
|
|
</vn-horizontal>
|
2023-02-14 11:41:36 +00:00
|
|
|
<vn-vertical ng-show="$ctrl.bankSelection.accountingType.code == 'compensation'">
|
|
|
|
<h6 translate>Compensation</h6>
|
|
|
|
<vn-textfield
|
|
|
|
ng-model="$ctrl.receipt.compensationAccount"
|
2023-05-08 10:03:27 +00:00
|
|
|
vn-name="compensationAccount"
|
2023-02-14 11:41:36 +00:00
|
|
|
label="Compensation Account"
|
|
|
|
on-change="$ctrl.accountShortToStandard(value)">
|
|
|
|
</vn-textfield>
|
|
|
|
</vn-vertical>
|
2020-08-27 06:24:21 +00:00
|
|
|
<vn-horizontal>
|
|
|
|
<vn-textfield
|
|
|
|
label="Reference"
|
|
|
|
ng-model="$ctrl.receipt.description"
|
2023-05-08 10:03:27 +00:00
|
|
|
vn-name="description"
|
2020-12-16 07:33:08 +00:00
|
|
|
rule
|
|
|
|
required="true">
|
2020-08-27 06:24:21 +00:00
|
|
|
</vn-textfield>
|
|
|
|
</vn-horizontal>
|
2020-12-16 07:33:08 +00:00
|
|
|
<vn-vertical ng-show="$ctrl.bankSelection.accountingType.code == 'cash'">
|
2021-01-11 16:18:37 +00:00
|
|
|
<h6 translate>Cash</h6>
|
2020-12-16 07:33:08 +00:00
|
|
|
<vn-horizontal>
|
|
|
|
<vn-input-number
|
|
|
|
ng-model="$ctrl.deliveredAmount"
|
2021-07-01 06:33:56 +00:00
|
|
|
label="Delivered amount"
|
2023-05-08 10:03:27 +00:00
|
|
|
step="0.01"
|
|
|
|
vn-name="deliveredAmount">
|
2020-12-16 07:33:08 +00:00
|
|
|
</vn-input-number>
|
|
|
|
<vn-input-number
|
|
|
|
disabled="true"
|
|
|
|
ng-model="$ctrl.amountToReturn"
|
2023-05-08 10:03:27 +00:00
|
|
|
label="Amount to return"
|
|
|
|
vn-name="amountToReturn">
|
2020-12-16 07:33:08 +00:00
|
|
|
</vn-input-number>
|
|
|
|
</vn-horizontal>
|
|
|
|
</vn-vertical>
|
2021-06-22 11:57:32 +00:00
|
|
|
<vn-horizontal ng-show="$ctrl.bankSelection.accountingType.code == 'cash'">
|
2023-02-09 09:26:55 +00:00
|
|
|
<vn-check
|
|
|
|
label="View receipt"
|
2023-05-08 10:03:27 +00:00
|
|
|
ng-model="$ctrl.viewReceipt"
|
|
|
|
vn-name="viewReceipt">
|
2021-06-22 09:57:43 +00:00
|
|
|
</vn-check>
|
2023-02-09 09:26:55 +00:00
|
|
|
<vn-check
|
|
|
|
label="Send email"
|
2023-05-08 10:03:27 +00:00
|
|
|
ng-model="$ctrl.sendEmail"
|
|
|
|
vn-name="sendEmail">
|
2023-02-09 09:26:55 +00:00
|
|
|
</vn-check>
|
2021-06-22 09:57:43 +00:00
|
|
|
</vn-horizontal>
|
2020-04-25 09:50:04 +00:00
|
|
|
</tpl-body>
|
|
|
|
<tpl-buttons>
|
|
|
|
<input type="button" response="cancel" translate-attr="{value: 'Cancel'}"/>
|
|
|
|
<button response="accept" translate vn-focus>Accept</button>
|
2023-02-09 09:26:55 +00:00
|
|
|
</tpl-buttons>
|