125 lines
5.6 KiB
HTML
125 lines
5.6 KiB
HTML
<vn-crud-model
|
|
auto-load="false"
|
|
vn-id="model"
|
|
url="claim/api/ClaimBeginnings"
|
|
filter="$ctrl.filter"
|
|
data="$ctrl.salesClaimed"
|
|
on-data-change="$ctrl.calculateTotals()">
|
|
</vn-crud-model>
|
|
<vn-vertical>
|
|
<vn-card pad-large>
|
|
<vn-vertical>
|
|
<vn-horizontal>
|
|
<vn-title vn-two>Detail</vn-title>
|
|
<div class="totalBox">
|
|
<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>
|
|
</vn-horizontal>
|
|
<vn-table model="model">
|
|
<vn-thead>
|
|
<vn-tr>
|
|
<vn-th number>Id</vn-th>
|
|
<vn-th>Landed</vn-th>
|
|
<vn-th number>Quantity</vn-th>
|
|
<vn-th number>Claimed</vn-th>
|
|
<vn-th>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>
|
|
<vn-td number>
|
|
<span
|
|
ng-click="$ctrl.showDescriptor($event, saleClaimed.sale.itemFk)"
|
|
pointer class="link">
|
|
{{::saleClaimed.sale.itemFk | zeroFill:6}}
|
|
</span>
|
|
</vn-td>
|
|
<vn-td>{{::saleClaimed.sale.ticket.landed | dateTime:'dd/MM/yyyy'}}</vn-td>
|
|
<vn-td number>{{::saleClaimed.sale.quantity}}</vn-td>
|
|
<vn-td number>
|
|
<vn-textfield
|
|
vn-focus
|
|
model="saleClaimed.quantity"
|
|
on-change="$ctrl.setClaimedQuantity(saleClaimed.id, saleClaimed.quantity)"
|
|
type="text">
|
|
</vn-textfield>
|
|
</vn-td>
|
|
<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>
|
|
<vn-td number>
|
|
{{::$ctrl.getSaleTotal(saleClaimed.sale) | currency:'€':2}}
|
|
</vn-td>
|
|
<vn-td number>
|
|
<vn-icon-button
|
|
medium-grey
|
|
margin-medium-v
|
|
vn-tooltip="Remove sale"
|
|
icon="delete"
|
|
ng-click="$ctrl.deleteClaimedSale($index)"
|
|
tabindex="-1">
|
|
</vn-icon-button>
|
|
</vn-td>
|
|
</vn-tr>
|
|
</vn-tbody>
|
|
<vn-empty-rows ng-if="$ctrl.salesClaimed.length === 0" translate>
|
|
No results
|
|
</vn-empty-rows>
|
|
</vn-table>
|
|
</vn-vertical>
|
|
</vn-card>
|
|
<a ng-click="$ctrl.openAddSalesDialog()" vn-tooltip="Add sale item" vn-bind="+" fixed-bottom-right>
|
|
<vn-float-button icon="add"></vn-float-button>
|
|
</a>
|
|
</vn-vertical>
|
|
<!-- Add Lines Dialog -->
|
|
<vn-dialog vn-id="add-sales" class="modalForm">
|
|
<tpl-body>
|
|
<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)">
|
|
<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="$ctrl.salesToClaim.length === 0" translate>
|
|
No results
|
|
</vn-empty-rows>
|
|
</vn-table>
|
|
</vn-horizontal>
|
|
</tpl-body>
|
|
</vn-dialog>
|
|
<vn-item-descriptor-popover
|
|
vn-id="descriptor"
|
|
quicklinks="$ctrl.quicklinks">
|
|
</vn-item-descriptor-popover> |