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>
|
|
|
|
<div class="totalBox">
|
2018-12-20 13:37:29 +00:00
|
|
|
<vn-label-value label="Total"
|
2019-01-31 10:44:03 +00:00
|
|
|
value="{{$ctrl.paidTotal | currency: 'EUR':2}}">
|
2018-12-20 13:37:29 +00:00
|
|
|
</vn-label-value>
|
|
|
|
<vn-label-value label="Total claimed"
|
2019-01-31 10:44:03 +00:00
|
|
|
value="{{$ctrl.claimedTotal | currency: 'EUR':2}}">
|
2018-12-20 13:37:29 +00:00
|
|
|
</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>
|
2019-02-10 21:52:35 +00:00
|
|
|
<vn-th center>Landed</vn-th>
|
2018-08-30 07:19:09 +00:00
|
|
|
<vn-th number>Quantity</vn-th>
|
2019-02-10 21:52:35 +00:00
|
|
|
<vn-th>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>
|
2019-02-10 21:52:35 +00:00
|
|
|
<vn-th></vn-th>
|
2018-08-30 07:19:09 +00:00
|
|
|
</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>
|
2019-02-10 21:52:35 +00:00
|
|
|
<vn-td center>{{::saleClaimed.sale.ticket.landed | dateTime:'dd/MM/yyyy'}}</vn-td>
|
2018-12-20 13:37:29 +00:00
|
|
|
<vn-td number>{{::saleClaimed.sale.quantity}}</vn-td>
|
2019-02-10 21:52:35 +00:00
|
|
|
<vn-td>
|
2019-03-26 06:29:45 +00:00
|
|
|
<vn-input-number vn-focus min="0" step="1"
|
2018-08-30 07:19:09 +00:00
|
|
|
model="saleClaimed.quantity"
|
2019-03-26 06:29:45 +00:00
|
|
|
on-change="$ctrl.setClaimedQuantity(saleClaimed.id, saleClaimed.quantity)">
|
|
|
|
</vn-input-number>
|
2018-08-30 07:19:09 +00:00
|
|
|
</vn-td>
|
2019-08-28 06:08:30 +00:00
|
|
|
<vn-td expand title="{{::saleClaimed.sale.concept}}">
|
|
|
|
<span
|
|
|
|
class="link"
|
2019-09-30 12:49:04 +00:00
|
|
|
ng-click="$ctrl.showItemDescriptor($event, saleClaimed.sale.itemFk)">
|
2019-08-28 06:08:30 +00:00
|
|
|
{{::saleClaimed.sale.concept}}
|
|
|
|
</span>
|
|
|
|
</vn-td>
|
2019-01-31 10:44:03 +00:00
|
|
|
<vn-td number>{{::saleClaimed.sale.price | currency: 'EUR':2}}</vn-td>
|
2019-06-12 06:19:02 +00:00
|
|
|
<vn-td number>
|
|
|
|
<span class="link"
|
|
|
|
vn-tooltip="Edit discount"
|
|
|
|
ng-click="$ctrl.showEditPopover($event, saleClaimed)">
|
|
|
|
{{::saleClaimed.sale.discount}} %
|
|
|
|
</span>
|
|
|
|
</vn-td>
|
2018-08-30 07:19:09 +00:00
|
|
|
<vn-td number>
|
2019-01-31 10:44:03 +00:00
|
|
|
{{::$ctrl.getSaleTotal(saleClaimed.sale) | currency: 'EUR':2}}
|
2018-08-30 07:19:09 +00:00
|
|
|
</vn-td>
|
2019-02-10 21:52:35 +00:00
|
|
|
<vn-td shrink>
|
2018-08-30 07:19:09 +00:00
|
|
|
<vn-icon-button
|
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>
|
|
|
|
</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-23 11:46:45 +00:00
|
|
|
<vn-dialog vn-id="add-sales" class="modal-form">
|
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>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.landed | dateTime: 'dd/MM/yyyy'}}</vn-td>
|
|
|
|
<vn-td number>{{sale.quantity}}</vn-td>
|
2019-09-30 12:49:04 +00:00
|
|
|
<vn-td expand title="{{::sale.concept}}">
|
|
|
|
<span
|
|
|
|
class="link"
|
|
|
|
ng-click="$ctrl.showItemDescriptor($event, sale.itemFk)">
|
|
|
|
{{sale.concept}}
|
|
|
|
</span>
|
|
|
|
</vn-td>
|
2019-01-31 10:44:03 +00:00
|
|
|
<vn-td number>{{sale.price | currency: 'EUR':2}}</vn-td>
|
2019-01-22 09:31:12 +00:00
|
|
|
<vn-td number>{{sale.discount}} %</vn-td>
|
|
|
|
<vn-td number>
|
2019-01-31 10:44:03 +00:00
|
|
|
{{(sale.quantity * sale.price) - ((sale.discount * (sale.quantity * sale.price))/100) | currency: 'EUR':2}}
|
2019-01-22 09:31:12 +00:00
|
|
|
</vn-td>
|
|
|
|
</vn-tr>
|
|
|
|
</vn-tbody>
|
|
|
|
</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
|
2019-05-07 09:32:35 +00:00
|
|
|
vn-id="descriptor">
|
2019-06-12 06:19:02 +00:00
|
|
|
</vn-item-descriptor-popover>
|
|
|
|
<vn-popover
|
|
|
|
class="edit dialog-summary"
|
|
|
|
vn-id="edit-popover"
|
|
|
|
on-open="$ctrl.getManaSalespersonMana()"
|
|
|
|
on-close="$ctrl.mana = null">
|
|
|
|
<vn-spinner
|
|
|
|
ng-if="$ctrl.mana == null"
|
|
|
|
style="padding: 1em;"
|
|
|
|
enable="true">
|
|
|
|
</vn-spinner>
|
|
|
|
<div ng-if="$ctrl.mana != null">
|
2019-06-13 07:21:36 +00:00
|
|
|
<vn-horizontal pad-medium class="header">
|
|
|
|
<h5>MANÁ: {{$ctrl.mana | currency: 'EUR':0}}</h5>
|
|
|
|
</vn-horizontal>
|
|
|
|
<div pad-medium>
|
|
|
|
<vn-input-number
|
|
|
|
vn-focus
|
|
|
|
label="Discount"
|
|
|
|
model="$ctrl.newDiscount"
|
|
|
|
type="text"
|
|
|
|
step="0.01"
|
|
|
|
on-change="$ctrl.updateDiscount()">
|
|
|
|
<t-right-icons>
|
|
|
|
<span class="filter">€</span>
|
|
|
|
</t-right-icons>
|
|
|
|
</vn-input-number>
|
|
|
|
<div class="simulator">
|
|
|
|
<p class="simulatorTitle" translate>New price</p>
|
2019-06-17 10:13:05 +00:00
|
|
|
<p>{{$ctrl.newPrice | currency: 'EUR':2}}
|
2019-06-13 07:21:36 +00:00
|
|
|
</p>
|
2019-06-12 06:19:02 +00:00
|
|
|
</div>
|
|
|
|
</div>
|
2019-06-13 07:21:36 +00:00
|
|
|
</div>
|
2019-06-12 06:19:02 +00:00
|
|
|
</vn-popover>
|