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

209 lines
8.7 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>
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: 'EUR':2}}">
2018-09-05 09:34:23 +00:00
</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"
2019-04-16 06:09:16 +00:00
max="$ctrl.maxResponsibility"
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-one
style = "text-align:right">
<vn-check
vn-one
label="Is paid with mana"
field="$ctrl.claim.isChargedToMana"
vn-acl="salesAssistant"
on-change="$ctrl.saveMana(value)">
</vn-check>
</vn-one>
</vn-horizontal>
2018-09-05 09:34:23 +00:00
<vn-table model="model">
<vn-thead>
<vn-tr>
<vn-th number>Id</vn-th>
2019-02-21 12:48:34 +00:00
<vn-th number>Ticket</vn-th>
2018-09-05 09:34:23 +00:00
<vn-th>Destination</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="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)"
2019-02-10 21:52:35 +00:00
class="link">
{{saleClaimed.sale.itemFk | zeroFill:6}}
2018-11-21 12:29:46 +00:00
</span>
</vn-td>
2019-02-21 12:48:34 +00:00
<vn-td number>
<span
class="link"
ng-click="$ctrl.showTicketDescriptor($event, saleClaimed.sale.ticketFk)">
{{::saleClaimed.sale.ticketFk}}
</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>
2019-02-10 21:52:35 +00:00
<vn-td>{{saleClaimed.sale.ticket.landed | dateTime: 'dd/MM/yyyy'}}</vn-td>
2018-09-05 09:34:23 +00:00
<vn-td number>{{saleClaimed.sale.quantity}}</vn-td>
2019-02-10 21:52:35 +00:00
<vn-td expand>{{saleClaimed.sale.concept}}</vn-td>
<vn-td number>{{saleClaimed.sale.price | currency: 'EUR':2}}</vn-td>
2018-09-05 09:34:23 +00:00
<vn-td number>{{saleClaimed.sale.discount}} %</vn-td>
<vn-td number>
2019-02-10 21:52:35 +00:00
{{saleClaimed.sale.quantity * saleClaimed.sale.price *
((100 - saleClaimed.sale.discount) / 100) | currency: 'EUR':2}}
2018-09-05 09:34:23 +00:00
</vn-td>
2019-02-10 21:52:35 +00:00
<vn-td shrink>
2018-09-05 09:34:23 +00:00
<vn-icon-button
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-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 -->
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-02-10 21:52:35 +00:00
<vn-td>{{sale.landed | dateTime: '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>
<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>
</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
2019-02-10 21:52:35 +00:00
class="clickable"
ng-repeat="ticket in lastTickets"
ng-click="$ctrl.importTicketLines(ticket.id)">
<vn-td number>{{::ticket.id}}</vn-td>
2019-02-27 16:04:00 +00:00
<vn-td>{{::ticket.shipped | dateTime: '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>
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?"
on-response="$ctrl.onUpdateGreugeResponse(response)">
</vn-confirm>