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"
|
2022-09-06 07:35:01 +00:00
|
|
|
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>
|
2022-09-06 07:35:01 +00:00
|
|
|
<vn-crud-model
|
2020-09-17 18:12:52 +00:00
|
|
|
auto-load="true"
|
2019-10-24 22:53:53 +00:00
|
|
|
url="ClaimDestinations"
|
2019-10-21 11:43:17 +00:00
|
|
|
data="claimDestinations">
|
|
|
|
</vn-crud-model>
|
2022-09-06 07:35:01 +00:00
|
|
|
<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">
|
2022-09-06 07:35:01 +00:00
|
|
|
<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">
|
2022-09-06 07:35:01 +00:00
|
|
|
<smart-table
|
|
|
|
model="model"
|
|
|
|
options="$ctrl.smartTableOptions"
|
2022-04-08 05:37:17 +00:00
|
|
|
expr-builder="$ctrl.exprBuilder(param, value)">
|
|
|
|
<slot-actions>
|
|
|
|
<section class="header">
|
|
|
|
<vn-tool-bar class="vn-mb-md">
|
|
|
|
<vn-button
|
2022-09-06 07:35:01 +00:00
|
|
|
label="Import claim"
|
2022-04-08 05:37:17 +00:00
|
|
|
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>
|
2022-04-08 05:37:17 +00:00
|
|
|
<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>
|
2022-04-08 05:37:17 +00:00
|
|
|
</vn-tool-bar>
|
|
|
|
</section>
|
2023-04-21 12:12:53 +00:00
|
|
|
</slot-actions>
|
2022-04-08 05:37:17 +00:00
|
|
|
<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>
|
2022-09-06 07:35:01 +00:00
|
|
|
<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>
|
2022-04-08 05:37:17 +00:00
|
|
|
<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()">
|
2022-04-08 05:37:17 +00:00
|
|
|
<td>
|
2022-09-06 07:35:01 +00:00
|
|
|
<vn-check
|
2022-04-08 05:37:17 +00:00
|
|
|
ng-model="saleClaimed.$checked"
|
|
|
|
vn-click-stop>
|
|
|
|
</vn-check>
|
|
|
|
</td>
|
|
|
|
<td number>
|
2022-09-06 07:35:01 +00:00
|
|
|
<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">
|
2023-02-17 10:19:35 +00:00
|
|
|
{{::saleClaimed.itemFk}}
|
2022-04-08 05:37:17 +00:00
|
|
|
</vn-span>
|
|
|
|
</td>
|
|
|
|
<td number>
|
|
|
|
<vn-span
|
2022-09-06 07:35:01 +00:00
|
|
|
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}}
|
2022-04-08 05:37:17 +00:00
|
|
|
</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>
|
2022-04-08 05:37:17 +00:00
|
|
|
</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>
|
2022-04-08 05:37:17 +00:00
|
|
|
<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>
|
2022-04-08 05:37:17 +00:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
2022-04-12 08:09:00 +00:00
|
|
|
</slot-table>
|
2022-04-08 05:37:17 +00:00
|
|
|
</smart-table>
|
2022-04-12 08:09:00 +00:00
|
|
|
<button-bar class="vn-pa-md">
|
2022-09-06 07:35:01 +00:00
|
|
|
<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
|
2021-05-21 13:31:05 +00:00
|
|
|
vn-id="item-descriptor"
|
|
|
|
warehouse-fk="$ctrl.vnConfig.warehouseFk">
|
2019-02-21 12:48:34 +00:00
|
|
|
</vn-item-descriptor-popover>
|
2022-09-06 07:35:01 +00:00
|
|
|
<vn-ticket-descriptor-popover
|
2021-05-21 13:31:05 +00:00
|
|
|
vn-id="ticket-descriptor">
|
2019-04-16 06:09:16 +00:00
|
|
|
</vn-ticket-descriptor-popover>
|
2022-09-06 07:35:01 +00:00
|
|
|
<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()">
|
2022-04-08 05:37:17 +00:00
|
|
|
</vn-confirm>
|
|
|
|
|
2022-09-06 07:35:01 +00:00
|
|
|
<!-- Dialog of change destionation -->
|
2022-04-08 05:37:17 +00:00
|
|
|
<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>
|
2022-09-06 07:35:01 +00:00
|
|
|
</vn-dialog>
|