2018-12-20 13:37:29 +00:00
|
|
|
<vn-crud-model
|
|
|
|
auto-load="false"
|
2018-08-30 07:19:09 +00:00
|
|
|
vn-id="model"
|
|
|
|
url="claim/api/ClaimBeginnings"
|
|
|
|
filter="$ctrl.filter"
|
2018-12-20 13:37:29 +00:00
|
|
|
data="$ctrl.salesClaimed"
|
|
|
|
on-data-change="$ctrl.calculateTotals()">
|
2018-08-30 07:19:09 +00:00
|
|
|
</vn-crud-model>
|
|
|
|
<vn-vertical>
|
|
|
|
<vn-card pad-large>
|
|
|
|
<vn-vertical>
|
2018-09-05 09:45:33 +00:00
|
|
|
<vn-horizontal>
|
|
|
|
<vn-title vn-two>Detail</vn-title>
|
|
|
|
<div class="totalBox">
|
2018-12-20 13:37:29 +00:00
|
|
|
<vn-label-value label="Total"
|
|
|
|
value="{{$ctrl.paidTotal | currency:'€':2}}">
|
|
|
|
</vn-label-value>
|
|
|
|
<vn-label-value label="Total claimed"
|
|
|
|
value="{{$ctrl.claimedTotal | currency:'€':2}}">
|
|
|
|
</vn-label-value>
|
|
|
|
</div>
|
2018-09-05 09:45:33 +00:00
|
|
|
</vn-horizontal>
|
2018-08-30 07:19:09 +00:00
|
|
|
<vn-table model="model">
|
|
|
|
<vn-thead>
|
|
|
|
<vn-tr>
|
|
|
|
<vn-th number>Id</vn-th>
|
2018-12-20 13:37:29 +00:00
|
|
|
<vn-th>Landed</vn-th>
|
2018-08-30 07:19:09 +00:00
|
|
|
<vn-th number>Quantity</vn-th>
|
|
|
|
<vn-th number>Claimed</vn-th>
|
2018-12-20 13:37:29 +00:00
|
|
|
<vn-th>Description</vn-th>
|
2018-08-30 07:19:09 +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>
|
2018-11-23 13:30:01 +00:00
|
|
|
<vn-tr ng-repeat="saleClaimed in $ctrl.salesClaimed" vn-repeat-last>
|
2018-11-21 12:29:46 +00:00
|
|
|
<vn-td number>
|
|
|
|
<span
|
|
|
|
ng-click="$ctrl.showDescriptor($event, saleClaimed.sale.itemFk)"
|
|
|
|
pointer class="link">
|
2018-12-20 13:37:29 +00:00
|
|
|
{{::saleClaimed.sale.itemFk | zeroFill:6}}
|
2018-11-21 12:29:46 +00:00
|
|
|
</span>
|
|
|
|
</vn-td>
|
2018-12-20 13:37:29 +00:00
|
|
|
<vn-td>{{::saleClaimed.sale.ticket.landed | dateTime:'dd/MM/yyyy'}}</vn-td>
|
|
|
|
<vn-td number>{{::saleClaimed.sale.quantity}}</vn-td>
|
2018-08-30 07:19:09 +00:00
|
|
|
<vn-td number>
|
|
|
|
<vn-textfield
|
2018-09-05 09:45:33 +00:00
|
|
|
vn-focus
|
2018-08-30 07:19:09 +00:00
|
|
|
model="saleClaimed.quantity"
|
|
|
|
on-change="$ctrl.setClaimedQuantity(saleClaimed.id, saleClaimed.quantity)"
|
|
|
|
type="text">
|
|
|
|
</vn-textfield>
|
|
|
|
</vn-td>
|
2018-12-20 13:37:29 +00:00
|
|
|
<vn-td>{{::saleClaimed.sale.concept}}</vn-td>
|
|
|
|
<vn-td number>{{::saleClaimed.sale.price | currency:'€':2}}</vn-td>
|
|
|
|
<vn-td number>{{::saleClaimed.sale.discount}} %</vn-td>
|
2018-08-30 07:19:09 +00:00
|
|
|
<vn-td number>
|
2018-12-20 13:37:29 +00:00
|
|
|
{{::$ctrl.getSaleTotal(saleClaimed.sale) | currency:'€':2}}
|
2018-08-30 07:19:09 +00:00
|
|
|
</vn-td>
|
|
|
|
<vn-td number>
|
|
|
|
<vn-icon-button
|
|
|
|
medium-grey
|
|
|
|
margin-medium-v
|
2018-09-13 15:00:01 +00:00
|
|
|
vn-tooltip="Remove sale"
|
2018-12-11 07:50:54 +00:00
|
|
|
icon="delete"
|
2018-11-23 13:30:01 +00:00
|
|
|
ng-click="$ctrl.deleteClaimedSale($index)"
|
2018-08-30 07:19:09 +00:00
|
|
|
tabindex="-1">
|
|
|
|
</vn-icon-button>
|
|
|
|
</vn-td>
|
|
|
|
</vn-tr>
|
|
|
|
</vn-tbody>
|
2018-12-20 13:37:29 +00:00
|
|
|
<vn-empty-rows ng-if="$ctrl.salesClaimed.length === 0" translate>
|
2018-08-30 07:19:09 +00:00
|
|
|
No results
|
|
|
|
</vn-empty-rows>
|
|
|
|
</vn-table>
|
|
|
|
</vn-vertical>
|
|
|
|
</vn-card>
|
2018-09-13 15:00:01 +00:00
|
|
|
<a ng-click="$ctrl.openAddSalesDialog()" vn-tooltip="Add sale item" vn-bind="+" fixed-bottom-right>
|
2018-09-05 09:45:33 +00:00
|
|
|
<vn-float-button icon="add"></vn-float-button>
|
|
|
|
</a>
|
2018-12-20 13:37:29 +00:00
|
|
|
</vn-vertical>
|
2018-08-30 07:19:09 +00:00
|
|
|
<!-- Add Lines Dialog -->
|
2019-01-22 09:31:12 +00:00
|
|
|
<vn-dialog vn-id="add-sales" class="modalForm">
|
2018-08-30 07:19:09 +00:00
|
|
|
<tpl-body>
|
2019-01-22 09:31:12 +00:00
|
|
|
<vn-horizontal pad-medium class="header">
|
|
|
|
<h5><span translate>Claimable sales from ticket</span> {{$ctrl.claim.ticketFk}}</h5>
|
|
|
|
</vn-horizontal>
|
|
|
|
<vn-horizontal pad-medium>
|
|
|
|
<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($index)">
|
2019-01-23 07:37:52 +00:00
|
|
|
<vn-td number>{{sale.saleFk}}</vn-td>
|
2019-01-22 09:31:12 +00:00
|
|
|
<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="$ctrl.salesToClaim.length === 0" translate>
|
|
|
|
No results
|
|
|
|
</vn-empty-rows>
|
|
|
|
</vn-table>
|
|
|
|
</vn-horizontal>
|
2018-08-30 07:19:09 +00:00
|
|
|
</tpl-body>
|
2018-11-21 12:29:46 +00:00
|
|
|
</vn-dialog>
|
2018-12-20 13:37:29 +00:00
|
|
|
<vn-item-descriptor-popover
|
|
|
|
vn-id="descriptor"
|
|
|
|
quicklinks="$ctrl.quicklinks">
|
2018-11-21 12:29:46 +00:00
|
|
|
</vn-item-descriptor-popover>
|