2023-06-09 12:19:17 +00:00
|
|
|
<vn-crud-model
|
2018-11-30 06:57:41 +00:00
|
|
|
vn-id="model"
|
2019-10-24 22:53:53 +00:00
|
|
|
url="TicketServices"
|
2020-03-18 07:35:59 +00:00
|
|
|
link="{ticketFk: $ctrl.$params.id}"
|
2019-05-16 12:07:16 +00:00
|
|
|
data="$ctrl.services"
|
2018-12-19 14:59:35 +00:00
|
|
|
auto-load="true">
|
2018-11-30 06:57:41 +00:00
|
|
|
</vn-crud-model>
|
2020-09-17 18:12:52 +00:00
|
|
|
<vn-crud-model
|
2021-01-18 07:55:57 +00:00
|
|
|
vn-id="typesModel"
|
2020-09-17 18:12:52 +00:00
|
|
|
auto-load="true"
|
|
|
|
url="TicketServiceTypes"
|
|
|
|
data="ticketServiceTypes"
|
|
|
|
order="name">
|
|
|
|
</vn-crud-model>
|
|
|
|
<vn-crud-model
|
|
|
|
auto-load="true"
|
|
|
|
url="TaxClasses"
|
|
|
|
data="taxClasses"
|
|
|
|
order="description">
|
|
|
|
</vn-crud-model>
|
2018-11-30 06:57:41 +00:00
|
|
|
<vn-watcher
|
|
|
|
vn-id="watcher"
|
2019-05-29 11:06:42 +00:00
|
|
|
data="$ctrl.services">
|
2018-11-30 06:57:41 +00:00
|
|
|
</vn-watcher>
|
2019-10-11 15:38:04 +00:00
|
|
|
<form name="form" ng-submit="$ctrl.onSubmit()" class="vn-w-md">
|
2019-10-04 22:16:57 +00:00
|
|
|
<vn-card class="vn-pa-lg">
|
2023-04-21 10:46:01 +00:00
|
|
|
<vn-button-bar>
|
2023-06-09 12:19:17 +00:00
|
|
|
<vn-button
|
2023-07-27 13:15:55 +00:00
|
|
|
disabled="watcher.dataChanged() || !$ctrl.checkeds.length"
|
2023-05-05 08:01:15 +00:00
|
|
|
label="Pay"
|
|
|
|
ng-click="$ctrl.createRefund()"
|
|
|
|
vn-acl="invoicing, claimManager, salesAssistant"
|
|
|
|
vn-acl-action="remove">
|
2023-06-09 12:19:17 +00:00
|
|
|
</vn-button>
|
2023-05-12 13:50:32 +00:00
|
|
|
</vn-button-bar>
|
2023-07-05 05:36:01 +00:00
|
|
|
<vn-horizontal ng-repeat="service in $ctrl.services">
|
2023-07-27 13:15:55 +00:00
|
|
|
<vn-check
|
|
|
|
tabindex="1"
|
|
|
|
on-change="$ctrl.addChecked(service.id)"
|
|
|
|
disabled="!service.id">
|
2023-07-05 05:36:01 +00:00
|
|
|
</vn-check>
|
2023-05-09 17:43:55 +00:00
|
|
|
<vn-autocomplete vn-two vn-focus
|
2020-09-17 18:12:52 +00:00
|
|
|
data="ticketServiceTypes"
|
2019-10-11 15:38:04 +00:00
|
|
|
label="Description"
|
|
|
|
show-field="name"
|
2019-12-13 10:59:25 +00:00
|
|
|
value-field="id"
|
|
|
|
ng-model="service.ticketServiceTypeFk">
|
2019-10-18 19:36:30 +00:00
|
|
|
<append>
|
|
|
|
<vn-icon-button
|
|
|
|
icon="add_circle"
|
|
|
|
vn-tooltip="New service type"
|
2020-03-30 15:30:03 +00:00
|
|
|
ng-click="$ctrl.onNewServiceTypeClick(service, $event)"
|
2019-10-18 19:36:30 +00:00
|
|
|
vn-acl="administrative"
|
|
|
|
style="padding: 0;">
|
|
|
|
</vn-icon-button>
|
|
|
|
</append>
|
2019-10-11 15:38:04 +00:00
|
|
|
</vn-autocomplete>
|
|
|
|
<vn-input-number
|
2022-04-22 09:46:28 +00:00
|
|
|
vn-one
|
2023-06-09 12:19:17 +00:00
|
|
|
step="1"
|
2019-10-11 15:38:04 +00:00
|
|
|
label="Quantity"
|
2023-04-24 11:14:38 +00:00
|
|
|
info="To create services with negative amounts mark the service on the source ticket and press the pay button."
|
2019-10-11 15:38:04 +00:00
|
|
|
ng-model="service.quantity"
|
2023-06-29 06:27:20 +00:00
|
|
|
rule="TicketService"
|
|
|
|
min="0">
|
2019-10-11 15:38:04 +00:00
|
|
|
</vn-input-number>
|
|
|
|
<vn-input-number
|
|
|
|
vn-one
|
|
|
|
label="Price"
|
|
|
|
ng-model="service.price"
|
|
|
|
step="0.01">
|
|
|
|
</vn-input-number>
|
|
|
|
<vn-auto>
|
|
|
|
<vn-icon-button
|
|
|
|
pointer
|
|
|
|
vn-tooltip="Remove service"
|
|
|
|
icon="delete"
|
|
|
|
ng-click="model.remove($index)">
|
2023-06-09 12:19:17 +00:00
|
|
|
</vn-icon-button>
|
2019-10-11 15:38:04 +00:00
|
|
|
</vn-auto>
|
|
|
|
</vn-horizontal>
|
|
|
|
<vn-icon-button
|
2019-11-12 07:51:50 +00:00
|
|
|
ng-if=$ctrl.defaultTaxClass
|
2019-10-11 15:38:04 +00:00
|
|
|
vn-tooltip="Add service"
|
|
|
|
vn-bind="+"
|
|
|
|
icon="add_circle"
|
|
|
|
ng-click="$ctrl.add()">
|
|
|
|
</vn-icon-button>
|
2018-11-30 06:57:41 +00:00
|
|
|
</vn-card>
|
|
|
|
<vn-button-bar>
|
2020-12-16 09:21:20 +00:00
|
|
|
<vn-submit
|
|
|
|
disabled="!watcher.dataChanged()"
|
|
|
|
label="Save">
|
|
|
|
</vn-submit>
|
2018-11-30 06:57:41 +00:00
|
|
|
</vn-button-bar>
|
2019-05-16 12:07:16 +00:00
|
|
|
</form>
|
2023-07-27 13:15:55 +00:00
|
|
|
|
2019-05-16 12:07:16 +00:00
|
|
|
<!-- Create service type dialog -->
|
2023-06-09 12:19:17 +00:00
|
|
|
<vn-dialog class="edit"
|
2020-03-30 15:30:03 +00:00
|
|
|
vn-id="newServiceTypeDialog"
|
|
|
|
on-accept="$ctrl.onNewServiceTypeAccept($data)"
|
2020-05-06 12:38:09 +00:00
|
|
|
on-close="newServiceType = null"
|
|
|
|
message="New service type">
|
2019-05-16 12:07:16 +00:00
|
|
|
<tpl-body>
|
|
|
|
<vn-horizontal>
|
2019-10-09 22:47:29 +00:00
|
|
|
<vn-textfield
|
|
|
|
vn-one
|
2019-05-16 12:07:16 +00:00
|
|
|
label="Description"
|
2020-03-30 15:30:03 +00:00
|
|
|
ng-model="newServiceType.name"
|
2019-10-28 16:31:33 +00:00
|
|
|
vn-focus>
|
2019-05-16 12:07:16 +00:00
|
|
|
</vn-textfield>
|
|
|
|
</vn-horizontal>
|
|
|
|
</tpl-body>
|
|
|
|
<tpl-buttons>
|
2019-10-30 15:57:14 +00:00
|
|
|
<input type="button" response="cancel" translate-attr="{value: 'Cancel'}"/>
|
|
|
|
<button response="accept" translate>Create</button>
|
2019-05-16 12:07:16 +00:00
|
|
|
</tpl-buttons>
|
2023-06-09 12:19:17 +00:00
|
|
|
</vn-dialog>
|