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

189 lines
7.4 KiB
HTML
Raw Normal View History

2020-02-07 06:47:11 +00:00
<vn-crud-model vn-id="model"
2022-04-12 08:09:00 +00:00
url="ClaimEnds/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"
2020-02-07 06:47:11 +00:00
on-save="$ctrl.onSave()">
2018-09-05 09:34:23 +00:00
</vn-crud-model>
<vn-crud-model
2020-09-17 18:12:52 +00:00
auto-load="true"
url="ClaimDestinations"
2019-10-21 11:43:17 +00:00
data="claimDestinations">
</vn-crud-model>
<vn-card class="vn-mb-md vn-pa-lg vn-w-lg" style="text-align: right"
2019-10-17 11:27:50 +00:00
ng-if="$ctrl.salesClaimed.length > 0">
<vn-label-value label="Total claimed"
2019-10-17 11:27:50 +00:00
value="{{$ctrl.claimedTotal | currency: 'EUR':2}}">
</vn-label-value>
</vn-card>
2023-04-21 12:12:53 +00:00
<vn-card class="vn-pa-md vn-w-lg">
<smart-table
model="model"
options="$ctrl.smartTableOptions"
expr-builder="$ctrl.exprBuilder(param, value)">
<slot-actions>
<section class="header">
<vn-tool-bar class="vn-mb-md">
<vn-button
label="Import claim"
disabled="$ctrl.claim.claimStateFk == $ctrl.resolvedStateId"
vn-http-click="$ctrl.importToNewRefundTicket()"
translate-attr="{title: 'Imports claim details'}">
</vn-button>
<vn-button
2023-04-21 12:12:53 +00:00
label="Change destination"
disabled="$ctrl.checked.length == 0"
ng-click="changeDestination.show()">
</vn-button>
<vn-range
label="Responsability"
min-label="Company"
max-label="Sales/Client"
ng-model="$ctrl.claim.responsibility"
max="$ctrl.maxResponsibility"
min="1"
step="1"
on-change="$ctrl.save({responsibility: value})">
</vn-range>
2023-04-21 12:12:53 +00:00
<vn-check class="right"
vn-one
label="Is paid with mana"
ng-model="$ctrl.claim.isChargedToMana"
on-change="$ctrl.save({isChargedToMana: value})">
</vn-check>
</vn-tool-bar>
</section>
2023-04-21 12:12:53 +00:00
</slot-actions>
<slot-table>
<table model="model">
<thead>
<tr>
<th shrink>
<vn-multi-check
model="model"
check-field="$checked">
</vn-multi-check>
</th>
<th number field="itemFk">Id</th>
<th number field="ticketFk">Ticket</th>
<th field="claimDestinationFk">
<span translate>Destination</span>
</th>
<th expand field="landed">
<span translate>Landed</span>
</th>
<th number field="quantity">
<span translate>Quantity</span>
</th>
<th field="concept">
<span translate>Description</span>
</th>
<th number field="price">
<span translate>Price</span>
</th>
<th number field="discount">
<span translate>Disc.</span>
</th>
<th number field="total">Total</th>
</tr>
</thead>
<tbody>
<tr
2019-10-17 11:27:50 +00:00
ng-repeat="saleClaimed in $ctrl.salesClaimed"
vn-repeat-last on-last="$ctrl.focusLastInput()">
<td>
<vn-check
ng-model="saleClaimed.$checked"
vn-click-stop>
</vn-check>
</td>
<td number>
<vn-span
2022-04-12 09:57:56 +00:00
ng-click="itemDescriptor.show($event, saleClaimed.itemFk)"
2019-10-17 11:27:50 +00:00
class="link">
{{::saleClaimed.itemFk}}
</vn-span>
</td>
<td number>
<vn-span
class="link"
2022-04-12 09:57:56 +00:00
ng-click="ticketDescriptor.show($event, saleClaimed.ticketFk)">
2022-04-12 08:09:00 +00:00
{{::saleClaimed.ticketFk}}
</vn-span>
</td>
<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"
2022-04-12 08:09:00 +00:00
on-change="$ctrl.updateDestination(saleClaimed, value)"
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>
</td>
2022-04-12 08:09:00 +00:00
<td expand>{{::saleClaimed.landed | date: 'dd/MM/yyyy'}}</td>
<td number>{{::saleClaimed.quantity}}</td>
<td expand>{{::saleClaimed.concept}}</td>
<td number>{{::saleClaimed.price | currency: 'EUR':2}}</td>
<td number>{{::saleClaimed.discount}} %</td>
2022-04-12 10:46:26 +00:00
<td number>{{saleClaimed.total | currency: 'EUR':2}}</td>
<td shrink>
2019-10-17 11:27:50 +00:00
<vn-icon-button
vn-tooltip="Remove line"
icon="delete"
2022-04-12 08:09:00 +00:00
ng-click="$ctrl.removeSales(saleClaimed)"
2019-10-17 11:27:50 +00:00
tabindex="-1">
</vn-icon-button>
</td>
</tr>
</tbody>
</table>
2022-04-12 08:09:00 +00:00
</slot-table>
</smart-table>
2022-04-12 08:09:00 +00:00
<button-bar class="vn-pa-md">
<vn-button
2022-04-12 08:09:00 +00:00
label="Regularize"
disabled="$ctrl.claim.claimStateFk == $ctrl.resolvedStateId"
vn-http-click="$ctrl.regularize()">
</vn-button>
</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"
2019-04-16 06:09:16 +00:00
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()">
</vn-confirm>
<!-- Dialog of change destionation -->
<vn-dialog
vn-id="changeDestination"
on-accept="$ctrl.onResponse()">
<tpl-body>
<section class="SMSDialog">
<h5 class="vn-py-sm">{{$ctrl.$t('Change destination to all selected rows', {total: $ctrl.checked.length})}}</h5>
<vn-horizontal>
<vn-autocomplete vn-one id="claimDestinationFk"
ng-model="$ctrl.newDestination"
data="claimDestinations"
fields="['id','description']"
value-field="id"
show-field="description"
vn-focus>
</vn-autocomplete>
</vn-horizontal>
</section>
</tpl-body>
<tpl-buttons>
<input type="button" response="cancel" translate-attr="{value: 'Cancel'}"/>
<button response="accept" translate>Save</button>
</tpl-buttons>
</vn-dialog>