salix/modules/claim/front/action/index.html

130 lines
5.1 KiB
HTML
Raw Normal View History

2020-02-07 06:47:11 +00:00
<vn-crud-model vn-id="model"
url="ClaimEnds"
2018-09-05 09:34:23 +00:00
filter="$ctrl.filter"
2020-05-15 12:47:19 +00:00
link="{claimFk: $ctrl.$params.id}"
2020-02-07 06:47:11 +00:00
data="$ctrl.salesClaimed"
auto-load="true"
auto-save="true"
on-save="$ctrl.onSave()">
2018-09-05 09:34:23 +00:00
</vn-crud-model>
2020-09-17 18:12:52 +00:00
<vn-crud-model
auto-load="true"
url="ClaimDestinations"
2019-10-21 11:43:17 +00:00
data="claimDestinations">
</vn-crud-model>
2019-10-17 11:27:50 +00:00
<vn-card class="vn-mb-md vn-pa-lg vn-w-lg" style="text-align: right"
ng-if="$ctrl.salesClaimed.length > 0">
<vn-label-value label="Total claimed"
value="{{$ctrl.claimedTotal | currency: 'EUR':2}}">
</vn-label-value>
</vn-card>
<vn-card class="vn-pa-lg vn-w-lg">
<section class="header">
<vn-tool-bar class="vn-mb-md">
<vn-button
label="Import claim"
2020-05-15 12:47:19 +00:00
disabled="$ctrl.claim.claimStateFk == $ctrl.resolvedStateId"
vn-http-click="$ctrl.importToNewRefundTicket()"
2019-10-17 11:27:50 +00:00
translate-attr="{title: 'Imports claim details'}">
</vn-button>
2019-10-18 19:37:28 +00:00
<vn-range
2019-10-17 11:27:50 +00:00
label="Responsability"
2019-10-18 19:37:28 +00:00
min-label="Company"
max-label="Sales/Client"
ng-model="$ctrl.claim.responsibility"
2019-10-17 11:27:50 +00:00
max="$ctrl.maxResponsibility"
min="1"
step="1"
2020-05-13 13:04:57 +00:00
on-change="$ctrl.save({responsibility: value})">
2019-10-18 19:37:28 +00:00
</vn-range>
2019-10-17 11:27:50 +00:00
</vn-tool-bar>
<vn-check vn-one
label="Is paid with mana"
ng-model="$ctrl.claim.isChargedToMana"
2020-05-13 13:04:57 +00:00
on-change="$ctrl.save({isChargedToMana: value})">
2019-10-17 11:27:50 +00:00
</vn-check>
</section>
<vn-data-viewer model="model">
<vn-table model="model">
<vn-thead>
<vn-tr>
<vn-th number>Id</vn-th>
<vn-th number>Ticket</vn-th>
<vn-th>Destination</vn-th>
<vn-th expand>Landed</vn-th>
2019-10-17 11:27:50 +00:00
<vn-th number>Quantity</vn-th>
<vn-th>Description</vn-th>
<vn-th number>Price</vn-th>
<vn-th number>Disc.</vn-th>
<vn-th number>Total</vn-th>
</vn-tr>
</vn-thead>
<vn-tbody>
<vn-tr
ng-repeat="saleClaimed in $ctrl.salesClaimed"
vn-repeat-last on-last="$ctrl.focusLastInput()">
<vn-td number>
<span
ng-click="itemDescriptor.show($event, saleClaimed.sale.itemFk)"
2019-10-17 11:27:50 +00:00
class="link">
{{::saleClaimed.sale.itemFk | zeroFill:6}}
2019-02-21 12:48:34 +00:00
</span>
2019-10-17 11:27:50 +00:00
</vn-td>
<vn-td number>
<span
class="link"
2020-04-25 09:50:04 +00:00
ng-click="ticketDescriptor.show($event, saleClaimed.sale.ticketFk)">
2019-10-17 11:27:50 +00:00
{{::saleClaimed.sale.ticketFk}}
</span>
</vn-td>
2020-05-15 12:47:19 +00:00
<vn-td expand>
2019-10-21 11:43:17 +00:00
<vn-autocomplete vn-one id="claimDestinationFk"
2019-10-17 11:27:50 +00:00
ng-model="saleClaimed.claimDestinationFk"
2019-10-21 11:43:17 +00:00
data="claimDestinations"
2019-10-17 11:27:50 +00:00
fields="['id','description']"
value-field="id"
2019-10-21 11:43:17 +00:00
show-field="description">
2019-10-17 11:27:50 +00:00
</vn-autocomplete>
</vn-td>
<vn-td expand>{{::saleClaimed.sale.ticket.landed | date: 'dd/MM/yyyy'}}</vn-td>
2019-10-17 11:27:50 +00:00
<vn-td number>{{::saleClaimed.sale.quantity}}</vn-td>
<vn-td expand>{{::saleClaimed.sale.concept}}</vn-td>
<vn-td number>{{::saleClaimed.sale.price | currency: 'EUR':2}}</vn-td>
<vn-td number>{{::saleClaimed.sale.discount}} %</vn-td>
<vn-td number>
{{saleClaimed.sale.quantity * saleClaimed.sale.price *
((100 - saleClaimed.sale.discount) / 100) | currency: 'EUR':2}}
</vn-td>
<vn-td shrink>
<vn-icon-button
vn-tooltip="Remove line"
icon="delete"
2020-05-15 12:47:19 +00:00
ng-click="model.remove($index)"
2019-10-17 11:27:50 +00:00
tabindex="-1">
</vn-icon-button>
</vn-td>
</vn-tr>
</vn-tbody>
</vn-table>
</vn-data-viewer>
2018-10-03 06:00:19 +00:00
<vn-button-bar>
2018-10-08 05:31:55 +00:00
<vn-button
label="Regularize"
2020-05-15 12:47:19 +00:00
disabled="$ctrl.claim.claimStateFk == $ctrl.resolvedStateId"
2019-06-20 11:50:58 +00:00
vn-http-click="$ctrl.regularize()">
2018-10-08 05:31:55 +00:00
</vn-button>
2018-10-03 06:00:19 +00:00
</vn-button-bar>
2019-10-17 11:27:50 +00:00
</vn-card>
2019-02-10 21:52:35 +00:00
<vn-item-descriptor-popover
vn-id="item-descriptor"
warehouse-fk="$ctrl.vnConfig.warehouseFk">
2019-02-21 12:48:34 +00:00
</vn-item-descriptor-popover>
<vn-ticket-descriptor-popover
vn-id="ticket-descriptor">
2019-04-16 06:09:16 +00:00
</vn-ticket-descriptor-popover>
<vn-confirm
vn-id="update-greuge"
question="Insert greuges on client card"
message="Do you want to insert greuges?"
2020-05-19 08:51:50 +00:00
on-accept="$ctrl.onUpdateGreugeAccept()">
2019-04-16 06:09:16 +00:00
</vn-confirm>