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

191 lines
8.1 KiB
HTML
Raw Normal View History

2018-11-27 14:02:54 +00:00
<vn-crud-model auto-load="false"
2018-09-05 09:34:23 +00:00
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>
2018-12-14 11:56:21 +00:00
<vn-vertical compact>
2018-09-05 09:34:23 +00:00
<vn-card pad-large>
<vn-vertical>
<vn-horizontal>
<vn-title vn-two>Action</vn-title>
2018-11-27 07:48:01 +00:00
<div class="totalBox" ng-show="$ctrl.salesClaimed.length > 0">
2018-09-05 09:34:23 +00:00
<vn-label-value label="Total claimed"
value="{{$ctrl.claimedTotal | currency:'€':2}}">
</vn-label-value>
</div>
</vn-horizontal>
<vn-horizontal>
<vn-tool-bar margin-medium-bottom>
<vn-button
2018-09-27 07:50:31 +00:00
label="Import claim"
ng-click="$ctrl.importToNewRefundTicket()"
2018-09-27 07:50:31 +00:00
vn-tooltip="Imports claim details">
</vn-button>
<vn-button
label="Import ticket"
ng-click="$ctrl.showLastTickets($event)"
vn-tooltip="Imports ticket lines">
</vn-button>
<vn-input-range
vn-one
label="Responsability"
value="$ctrl.claim.responsibility"
max="5"
min="1"
step="1"
vn-acl="salesAssistant"
2019-01-15 11:06:19 +00:00
on-change="$ctrl.saveResponsibility(value)">
</vn-input-range>
</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"
icon="delete"
2018-09-05 09:34:23 +00:00
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>
</vn-dialog>
<vn-crud-model
vn-id="lastTicketsModel"
url="/claim/api/Tickets"
2018-12-04 12:18:27 +00:00
limit="20"
data="lastTickets" auto-load="false">
</vn-crud-model>
<!-- Transfer Popover -->
<vn-popover class="lastTicketsPopover" vn-id="lastTicketsPopover">
<div class="ticketList" pad-medium>
2018-11-27 14:02:54 +00:00
<vn-table model="lastTicketsModel" auto-load="false" 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>