116 lines
5.2 KiB
HTML
116 lines
5.2 KiB
HTML
|
<vn-crud-model
|
||
|
vn-id="model"
|
||
|
url="claim/api/ClaimEnds"
|
||
|
filter="$ctrl.filter"
|
||
|
data="$ctrl.salesClaimed" on-data-change="$ctrl.onDataChange()">
|
||
|
</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>
|
||
|
<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()">
|
||
|
<vn-td number>{{saleClaimed.sale.id}}</vn-td>
|
||
|
<vn-td>
|
||
|
<vn-autocomplete
|
||
|
vn-one
|
||
|
id="claimDestinationFk"
|
||
|
field="saleClaimed.claimDestinationFk"
|
||
|
url="/claim/api/ClaimDestinations"
|
||
|
select-fields="['id','description']"
|
||
|
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
|
||
|
vn-tooltip="Remove tag"
|
||
|
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>
|
||
|
<!-- 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>
|