2019-10-21 11:43:17 +00:00
|
|
|
<vn-crud-model vn-id="model" auto-load="true" auto-save="true"
|
2019-10-24 22:53:53 +00:00
|
|
|
url="ClaimEnds"
|
2018-09-05 09:34:23 +00:00
|
|
|
filter="$ctrl.filter"
|
2018-10-22 15:54:04 +00:00
|
|
|
data="$ctrl.salesClaimed">
|
2018-09-05 09:34:23 +00:00
|
|
|
</vn-crud-model>
|
2019-10-17 11:27:50 +00:00
|
|
|
|
2019-10-21 11:43:17 +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">
|
|
|
|
<section class="header">
|
|
|
|
<vn-tool-bar class="vn-mb-md">
|
|
|
|
<vn-button
|
|
|
|
label="Import claim"
|
|
|
|
disabled="$ctrl.claim.claimStateFk == $ctrl.resolvedState"
|
|
|
|
vn-http-click="$ctrl.importToNewRefundTicket()"p
|
|
|
|
translate-attr="{title: 'Imports claim details'}">
|
|
|
|
</vn-button>
|
|
|
|
<vn-button
|
|
|
|
label="Import ticket"
|
|
|
|
disabled="$ctrl.claim.claimStateFk == $ctrl.resolvedState"
|
|
|
|
ng-click="$ctrl.showLastTickets($event)"
|
|
|
|
translate-attr="{title: 'Imports ticket lines'}">
|
|
|
|
</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"
|
|
|
|
vn-acl="salesAssistant"
|
|
|
|
on-change="$ctrl.saveResponsibility(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"
|
|
|
|
vn-acl="salesAssistant"
|
|
|
|
on-change="$ctrl.saveMana(value)">
|
|
|
|
</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>Landed</vn-th>
|
|
|
|
<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="$ctrl.showDescriptor($event, saleClaimed.sale.itemFk)"
|
|
|
|
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"
|
|
|
|
ng-click="$ctrl.showTicketDescriptor($event, saleClaimed.sale.ticketFk)">
|
|
|
|
{{::saleClaimed.sale.ticketFk}}
|
|
|
|
</span>
|
|
|
|
</vn-td>
|
|
|
|
<vn-td>
|
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>
|
2019-10-18 23:18:25 +00:00
|
|
|
<vn-td>{{::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"
|
|
|
|
ng-click="$ctrl.deleteClaimedSale(saleClaimed.id)"
|
|
|
|
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"
|
2019-06-20 11:50:58 +00:00
|
|
|
disabled="$ctrl.claim.claimStateFk == $ctrl.resolvedState"
|
|
|
|
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>
|
2018-09-05 09:34:23 +00:00
|
|
|
|
|
|
|
<!-- Add Lines Dialog -->
|
2019-02-10 21:52:35 +00:00
|
|
|
<vn-dialog vn-id="addSales">
|
2018-09-05 09:34:23 +00:00
|
|
|
<tpl-body>
|
|
|
|
<h3 translate>Claimable sales from ticket</h3><h3> {{$ctrl.claim.ticketFk}}</h3>
|
|
|
|
<vn-table>
|
|
|
|
<vn-thead>
|
|
|
|
<vn-tr>
|
|
|
|
<vn-th number>Id</vn-th>
|
2019-02-10 21:52:35 +00:00
|
|
|
<vn-th>Landed</vn-th>
|
2018-09-05 09:34:23 +00:00
|
|
|
<vn-th number>Quantity</vn-th>
|
2019-02-10 21:52:35 +00:00
|
|
|
<vn-th>Description</vn-th>
|
2018-09-05 09:34:23 +00:00
|
|
|
<vn-th number>Price</vn-th>
|
|
|
|
<vn-th number>Disc.</vn-th>
|
|
|
|
<vn-th number>Total</vn-th>
|
|
|
|
</vn-tr>
|
|
|
|
</vn-thead>
|
|
|
|
<vn-tbody>
|
2019-02-10 21:52:35 +00:00
|
|
|
<vn-tr
|
|
|
|
ng-repeat="sale in $ctrl.salesToClaim"
|
|
|
|
class="clickable"
|
|
|
|
ng-click="$ctrl.addClaimedSale(sale.saleFk)">
|
2018-09-05 09:34:23 +00:00
|
|
|
<vn-td number>{{sale.saleFk}}</vn-td>
|
2019-10-18 23:18:25 +00:00
|
|
|
<vn-td>{{sale.landed | date: 'dd/MM/yyyy'}}</vn-td>
|
2018-09-05 09:34:23 +00:00
|
|
|
<vn-td number>{{sale.quantity}}</vn-td>
|
2019-02-10 21:52:35 +00:00
|
|
|
<vn-td expand>{{sale.concept}}</vn-td>
|
2019-01-31 10:44:03 +00:00
|
|
|
<vn-td number>{{sale.price | currency: 'EUR':2}}</vn-td>
|
2018-09-05 09:34:23 +00:00
|
|
|
<vn-td number>{{sale.discount}} %</vn-td>
|
|
|
|
<vn-td number>
|
2019-02-10 21:52:35 +00:00
|
|
|
{{sale.quantity * sale.price * ((100 - sale.discount) * / 100) | currency: 'EUR':2}}
|
2018-09-05 09:34:23 +00:00
|
|
|
</vn-td>
|
|
|
|
</vn-tr>
|
|
|
|
</vn-tbody>
|
|
|
|
</vn-table>
|
|
|
|
</tpl-body>
|
2018-10-02 07:52:38 +00:00
|
|
|
</vn-dialog>
|
|
|
|
<vn-crud-model
|
|
|
|
vn-id="lastTicketsModel"
|
2019-10-24 22:53:53 +00:00
|
|
|
url="Tickets"
|
2018-12-04 12:18:27 +00:00
|
|
|
limit="20"
|
2018-10-02 07:52:38 +00:00
|
|
|
data="lastTickets" auto-load="false">
|
|
|
|
</vn-crud-model>
|
|
|
|
<!-- Transfer Popover -->
|
|
|
|
<vn-popover class="lastTicketsPopover" vn-id="lastTicketsPopover">
|
2019-10-04 22:16:57 +00:00
|
|
|
<div class="ticketList vn-pa-md">
|
2019-10-11 15:38:04 +00:00
|
|
|
<vn-table model="lastTicketsModel" auto-load="false">
|
2018-10-02 07:52:38 +00:00
|
|
|
<vn-thead>
|
|
|
|
<vn-tr>
|
|
|
|
<vn-th field="id" number>ID</vn-th>
|
|
|
|
<vn-th field="shipped" default-order="DESC">F. envio</vn-th>
|
|
|
|
<vn-th>Agencia</vn-th>
|
|
|
|
<vn-th>Almacen</vn-th>
|
|
|
|
</vn-tr>
|
|
|
|
</vn-thead>
|
|
|
|
<vn-tbody>
|
|
|
|
<vn-tr
|
2019-02-10 21:52:35 +00:00
|
|
|
class="clickable"
|
|
|
|
ng-repeat="ticket in lastTickets"
|
|
|
|
ng-click="$ctrl.importTicketLines(ticket.id)">
|
2018-10-02 07:52:38 +00:00
|
|
|
<vn-td number>{{::ticket.id}}</vn-td>
|
2019-10-18 23:18:25 +00:00
|
|
|
<vn-td>{{::ticket.shipped | date: 'dd/MM/yyyy'}}</vn-td>
|
2018-10-02 07:52:38 +00:00
|
|
|
<vn-td>{{::ticket.agencyMode.name}}</vn-td>
|
|
|
|
<vn-td>{{::ticket.warehouse.name}}</vn-td>
|
|
|
|
</vn-tr>
|
|
|
|
</vn-tbody>
|
|
|
|
</vn-table>
|
|
|
|
</div>
|
2018-11-21 12:29:46 +00:00
|
|
|
</vn-popover>
|
2019-02-10 21:52:35 +00:00
|
|
|
<vn-item-descriptor-popover
|
2019-05-07 09:32:35 +00:00
|
|
|
vn-id="descriptor">
|
2019-02-21 12:48:34 +00:00
|
|
|
</vn-item-descriptor-popover>
|
|
|
|
<vn-ticket-descriptor-popover
|
|
|
|
vn-id="ticketDescriptor">
|
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?"
|
2019-10-30 15:57:14 +00:00
|
|
|
on-response="$ctrl.onUpdateGreugeResponse($response)">
|
2019-04-16 06:09:16 +00:00
|
|
|
</vn-confirm>
|