2018-09-05 09:34:23 +00:00
|
|
|
<vn-crud-model
|
|
|
|
vn-id="model"
|
|
|
|
url="claim/api/ClaimEnds"
|
|
|
|
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>
|
|
|
|
<vn-vertical>
|
|
|
|
<vn-card pad-large>
|
|
|
|
<vn-vertical>
|
|
|
|
<vn-horizontal>
|
|
|
|
<vn-title vn-two>Action</vn-title>
|
|
|
|
<div class="totalBox">
|
|
|
|
<vn-label-value label="Total claimed"
|
|
|
|
value="{{$ctrl.claimedTotal | currency:'€':2}}">
|
|
|
|
</vn-label-value>
|
|
|
|
</div>
|
|
|
|
</vn-horizontal>
|
2018-09-25 12:37:35 +00:00
|
|
|
<vn-horizontal>
|
|
|
|
<vn-tool-bar margin-medium-bottom>
|
|
|
|
<vn-button
|
2018-09-27 07:50:31 +00:00
|
|
|
label="Import claim"
|
2018-09-25 12:37:35 +00:00
|
|
|
ng-click="$ctrl.importToNewRefundTicket()"
|
2018-09-27 07:50:31 +00:00
|
|
|
vn-tooltip="Imports claim details">
|
2018-09-25 12:37:35 +00:00
|
|
|
</vn-button>
|
2018-10-02 07:52:38 +00:00
|
|
|
<vn-button
|
|
|
|
label="Import ticket"
|
|
|
|
ng-click="$ctrl.showLastTickets($event)"
|
|
|
|
vn-tooltip="Imports ticket lines">
|
|
|
|
</vn-button>
|
2018-09-25 12:37:35 +00:00
|
|
|
</vn-tool-bar>
|
|
|
|
</vn-horizontal>
|
2018-09-05 09:34:23 +00:00
|
|
|
<vn-table model="model">
|
|
|
|
<vn-thead>
|
|
|
|
<vn-tr>
|
|
|
|
<vn-th number>Id</vn-th>
|
|
|
|
<vn-th>Destination</vn-th>
|
|
|
|
<vn-th number>Landed</vn-th>
|
|
|
|
<vn-th number>Quantity</vn-th>
|
|
|
|
<vn-th number>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()">
|
2018-11-21 12:29:46 +00:00
|
|
|
<vn-td number>
|
|
|
|
<span
|
|
|
|
ng-click="$ctrl.showDescriptor($event, saleClaimed.sale.itemFk)"
|
|
|
|
pointer class="link">
|
|
|
|
{{("000000"+saleClaimed.sale.itemFk).slice(-6)}}
|
|
|
|
</span>
|
|
|
|
</vn-td>
|
2018-09-05 09:34:23 +00:00
|
|
|
<vn-td>
|
|
|
|
<vn-autocomplete
|
|
|
|
vn-one
|
|
|
|
id="claimDestinationFk"
|
|
|
|
field="saleClaimed.claimDestinationFk"
|
|
|
|
url="/claim/api/ClaimDestinations"
|
2018-10-18 07:24:20 +00:00
|
|
|
fields="['id','description']"
|
2018-09-05 09:34:23 +00:00
|
|
|
value-field="id"
|
|
|
|
show-field="description"
|
|
|
|
on-change="$ctrl.setClaimDestination(saleClaimed.id, value)">
|
|
|
|
</vn-autocomplete>
|
|
|
|
</vn-td>
|
|
|
|
<vn-td number>{{saleClaimed.sale.ticket.landed | dateTime: 'dd/MM/yyyy'}}</vn-td>
|
|
|
|
<vn-td number>{{saleClaimed.sale.quantity}}</vn-td>
|
|
|
|
<vn-td number>{{saleClaimed.sale.concept}}</vn-td>
|
|
|
|
<vn-td number>{{saleClaimed.sale.price | currency:'€':2}}</vn-td>
|
|
|
|
<vn-td number>{{saleClaimed.sale.discount}} %</vn-td>
|
|
|
|
<vn-td number>
|
|
|
|
{{(saleClaimed.sale.quantity * saleClaimed.sale.price) -
|
|
|
|
((saleClaimed.sale.discount *
|
|
|
|
(saleClaimed.sale.quantity * saleClaimed.sale.price))/100) | currency:'€':2
|
|
|
|
}}
|
|
|
|
</vn-td>
|
|
|
|
<vn-td number>
|
|
|
|
<vn-icon-button
|
|
|
|
medium-grey
|
|
|
|
margin-medium-v
|
2018-09-13 15:00:01 +00:00
|
|
|
vn-tooltip="Remove line"
|
2018-09-05 09:34:23 +00:00
|
|
|
icon="remove_circle_outline"
|
|
|
|
ng-click="$ctrl.deleteClaimedSale(saleClaimed.id)"
|
|
|
|
tabindex="-1">
|
|
|
|
</vn-icon-button>
|
|
|
|
</vn-td>
|
|
|
|
</vn-tr>
|
|
|
|
</vn-tbody>
|
|
|
|
<vn-empty-rows ng-if="model.data.length === 0" translate>
|
|
|
|
No results
|
|
|
|
</vn-empty-rows>
|
|
|
|
</vn-table>
|
|
|
|
</vn-vertical>
|
|
|
|
</vn-card>
|
2018-10-03 06:00:19 +00:00
|
|
|
<vn-button-bar>
|
2018-10-08 05:31:55 +00:00
|
|
|
{{$ctrl.resolvedStateText}}
|
|
|
|
<vn-button
|
|
|
|
label="Regularize"
|
|
|
|
ng-click="$ctrl.regularize()"
|
|
|
|
disabled="$ctrl.claim.claimStateFk == $ctrl.resolvedState">
|
|
|
|
</vn-button>
|
2018-10-03 06:00:19 +00:00
|
|
|
</vn-button-bar>
|
2018-09-05 09:34:23 +00:00
|
|
|
<!-- WIP
|
|
|
|
<a ng-click="$ctrl.openAddSalesDialog()" vn-tooltip="New item" vn-bind="+" fixed-bottom-right>
|
|
|
|
<vn-float-button icon="add"></vn-float-button>
|
|
|
|
</a>
|
|
|
|
-->
|
|
|
|
|
|
|
|
<!-- Add Lines Dialog -->
|
|
|
|
<vn-dialog
|
|
|
|
vn-id="addSales">
|
|
|
|
<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>
|
|
|
|
<vn-th number>Landed</vn-th>
|
|
|
|
<vn-th number>Quantity</vn-th>
|
|
|
|
<vn-th number>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="sale in $ctrl.salesToClaim" class="clickable" ng-click="$ctrl.addClaimedSale(sale.saleFk)">
|
|
|
|
<vn-td number>{{sale.saleFk}}</vn-td>
|
|
|
|
<vn-td number>{{sale.landed | dateTime: 'dd/MM/yyyy'}}</vn-td>
|
|
|
|
<vn-td number>{{sale.quantity}}</vn-td>
|
|
|
|
<vn-td number>{{sale.concept}}</vn-td>
|
|
|
|
<vn-td number>{{sale.price | currency:'€':2}}</vn-td>
|
|
|
|
<vn-td number>{{sale.discount}} %</vn-td>
|
|
|
|
<vn-td number>
|
|
|
|
{{(sale.quantity * sale.price) - ((sale.discount * (sale.quantity * sale.price))/100) | currency:'€':2}}
|
|
|
|
</vn-td>
|
|
|
|
</vn-tr>
|
|
|
|
</vn-tbody>
|
|
|
|
<vn-empty-rows ng-if="model.data.length === 0" translate>
|
|
|
|
No results
|
|
|
|
</vn-empty-rows>
|
|
|
|
</vn-table>
|
|
|
|
</tpl-body>
|
2018-10-02 07:52:38 +00:00
|
|
|
</vn-dialog>
|
|
|
|
|
|
|
|
|
|
|
|
<vn-crud-model
|
|
|
|
vn-id="lastTicketsModel"
|
|
|
|
url="/claim/api/Tickets"
|
|
|
|
data="lastTickets" auto-load="false">
|
|
|
|
</vn-crud-model>
|
|
|
|
<!-- Transfer Popover -->
|
|
|
|
<vn-popover class="lastTicketsPopover" vn-id="lastTicketsPopover">
|
|
|
|
<div class="ticketList" pad-medium>
|
|
|
|
<vn-table model="lastTicketsModel" class="vn-grid">
|
|
|
|
<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
|
|
|
|
class="clickable"
|
|
|
|
ng-repeat="ticket in lastTickets"
|
|
|
|
ng-click="$ctrl.importTicketLines(ticket.id)">
|
|
|
|
<vn-td number>{{::ticket.id}}</vn-td>
|
|
|
|
<vn-td>{{::ticket.shipped | date: 'dd/MM/yyyy'}}</vn-td>
|
|
|
|
<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>
|
|
|
|
<vn-item-descriptor-popover vn-id="descriptor"
|
|
|
|
quicklinks="$ctrl.quicklinks">
|
|
|
|
</vn-item-descriptor-popover>
|