2020-02-07 06:47:11 +00:00
|
|
|
<vn-crud-model vn-id="model"
|
2019-10-24 22:53:53 +00:00
|
|
|
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"
|
2019-10-24 22:53:53 +00:00
|
|
|
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">
|
2022-04-08 05:37:17 +00:00
|
|
|
<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
|
|
|
|
label="Change destination"
|
|
|
|
ng-show="$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>
|
|
|
|
</vn-tool-bar>
|
|
|
|
<vn-check vn-one
|
|
|
|
label="Is paid with mana"
|
|
|
|
ng-model="$ctrl.claim.isChargedToMana"
|
|
|
|
on-change="$ctrl.save({isChargedToMana: value})">
|
|
|
|
</vn-check>
|
|
|
|
</section>
|
|
|
|
</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">Destination</th>
|
|
|
|
<th expand field="landed">Landed</th>
|
|
|
|
<th number field="quantity">Quantity</th>
|
|
|
|
<th field="description">Description</th>
|
|
|
|
<th number field="price">Price</th>
|
|
|
|
<th number field="discount">Disc.</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()">
|
2022-04-08 05:37:17 +00:00
|
|
|
<td>
|
|
|
|
<vn-check
|
|
|
|
ng-model="saleClaimed.$checked"
|
|
|
|
vn-click-stop>
|
|
|
|
</vn-check>
|
|
|
|
</td>
|
|
|
|
<td number>
|
|
|
|
<vn-span
|
2021-05-21 13:31:05 +00:00
|
|
|
ng-click="itemDescriptor.show($event, saleClaimed.sale.itemFk)"
|
2019-10-17 11:27:50 +00:00
|
|
|
class="link">
|
|
|
|
{{::saleClaimed.sale.itemFk | zeroFill:6}}
|
2022-04-08 05:37:17 +00:00
|
|
|
</vn-span>
|
|
|
|
</td>
|
|
|
|
<td number>
|
|
|
|
<vn-span
|
2019-10-17 11:27:50 +00:00
|
|
|
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}}
|
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"
|
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>
|
|
|
|
<td expand>{{::saleClaimed.sale.ticket.landed | date: 'dd/MM/yyyy'}}</td>
|
|
|
|
<td number>{{::saleClaimed.sale.quantity}}</td>
|
|
|
|
<td expand>{{::saleClaimed.sale.concept}}</td>
|
|
|
|
<td number>{{::saleClaimed.sale.price | currency: 'EUR':2}}</td>
|
|
|
|
<td number>{{::saleClaimed.sale.discount}} %</td>
|
|
|
|
<td number>
|
2019-10-17 11:27:50 +00:00
|
|
|
{{saleClaimed.sale.quantity * saleClaimed.sale.price *
|
|
|
|
((100 - saleClaimed.sale.discount) / 100) | currency: 'EUR':2}}
|
2022-04-08 05:37:17 +00:00
|
|
|
</td>
|
|
|
|
<td shrink>
|
2019-10-17 11:27:50 +00:00
|
|
|
<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>
|
2022-04-08 05:37:17 +00:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
<!-- <button-bar>
|
|
|
|
<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()">
|
2022-04-08 05:37:17 +00:00
|
|
|
</button>
|
|
|
|
</button-bar> -->
|
|
|
|
</smart-table>
|
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>
|
|
|
|
<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>
|
|
|
|
<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()">
|
2022-04-08 05:37:17 +00:00
|
|
|
</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>
|