2018-11-29 10:09:08 +00:00
|
|
|
<vn-crud-model
|
2018-08-31 05:53:38 +00:00
|
|
|
vn-id="model"
|
|
|
|
url="/ticket/api/Sales"
|
|
|
|
link="{ticketFk: $ctrl.$stateParams.id}"
|
|
|
|
filter="::$ctrl.filter"
|
|
|
|
data="components">
|
|
|
|
</vn-crud-model>
|
2018-04-13 14:03:43 +00:00
|
|
|
<vn-vertical>
|
|
|
|
<vn-card pad-large>
|
|
|
|
<vn-vertical>
|
|
|
|
<vn-title>Components</vn-title>
|
|
|
|
<table class="vn-grid">
|
|
|
|
<thead>
|
|
|
|
<tr>
|
|
|
|
<th number translate>Item</th>
|
|
|
|
<th translate>Description</th>
|
|
|
|
<th number translate>Quantity</th>
|
|
|
|
<th translate>Serie</th>
|
|
|
|
<th translate>Components</th>
|
|
|
|
<th number translate>Import</th>
|
|
|
|
<th number translate>Total import</th>
|
|
|
|
</tr>
|
|
|
|
</thead>
|
|
|
|
<tfoot>
|
|
|
|
<tr>
|
|
|
|
<td number colspan="7">
|
2018-10-25 08:54:16 +00:00
|
|
|
<span translate>Base</span> {{$ctrl.base() | currency:'€':3}}
|
2018-04-13 14:03:43 +00:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td number colspan="7">
|
2018-10-25 08:54:16 +00:00
|
|
|
<span translate>Margin</span> {{$ctrl.profitMargin() | currency:'€':3}}
|
2018-04-13 14:03:43 +00:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td number colspan="7">
|
2018-10-25 08:54:16 +00:00
|
|
|
<span translate>Total</span> {{$ctrl.total() | currency:'€':3}}
|
2018-04-13 14:03:43 +00:00
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</tfoot>
|
2018-08-31 05:53:38 +00:00
|
|
|
<tbody ng-repeat="sale in components track by sale.id">
|
2018-04-13 14:03:43 +00:00
|
|
|
<tr>
|
|
|
|
<td rowspan="{{
|
|
|
|
::sale.components.length + 1
|
2018-09-06 06:04:43 +00:00
|
|
|
}}" number>
|
|
|
|
<span pointer
|
|
|
|
ng-click="$ctrl.showDescriptor($event, sale.itemFk)"
|
|
|
|
class="link">
|
|
|
|
{{("000000"+sale.itemFk).slice(-6)}}
|
|
|
|
</span>
|
|
|
|
</td>
|
2018-04-13 14:03:43 +00:00
|
|
|
<td rowspan="{{
|
|
|
|
::sale.components.length + 1
|
2018-11-06 09:49:38 +00:00
|
|
|
}}"><vn-fetched-tags max-length="6" item="sale.item"/></td>
|
2018-04-13 14:03:43 +00:00
|
|
|
<td rowspan="{{
|
|
|
|
::sale.components.length + 1
|
|
|
|
}}" number>{{::sale.quantity}}</td>
|
|
|
|
</tr>
|
|
|
|
<tr
|
|
|
|
ng-repeat="component in sale.components track by component.componentFk">
|
|
|
|
<td ng-class="::{
|
|
|
|
first: $index == 0,last: $index == sale.components.length - 1
|
|
|
|
}">{{::component.componentRate.componentType.type}}</td>
|
|
|
|
<td ng-class="::{
|
|
|
|
first: $index == 0,last: $index == sale.components.length - 1
|
|
|
|
}">{{::component.componentRate.name}}</td>
|
|
|
|
<td ng-class="::{
|
|
|
|
first: $index == 0,last: $index == sale.components.length - 1
|
|
|
|
}" number>{{::component.value | currency:'€':3}}</td>
|
|
|
|
<td ng-class="::{
|
|
|
|
first: $index == 0,last: $index == sale.components.length - 1
|
|
|
|
}" number>{{::sale.quantity * component.value | currency:'€':3}}</td>
|
2018-05-07 06:33:45 +00:00
|
|
|
</tr>
|
2018-08-31 05:53:38 +00:00
|
|
|
<tr ng-if="model.data.length === 0" class="list list-element">
|
2018-05-07 06:33:45 +00:00
|
|
|
<td colspan="7" style="text-align: center" translate>No results</td>
|
|
|
|
</tr>
|
2018-04-13 14:03:43 +00:00
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</vn-vertical>
|
2018-08-31 05:53:38 +00:00
|
|
|
<!-- <vn-paging vn-one margin-large-top index="index" total="index.model.count"></vn-paging> -->
|
2018-04-13 14:03:43 +00:00
|
|
|
</vn-card>
|
|
|
|
</vn-vertical>
|
2018-09-04 09:49:00 +00:00
|
|
|
<vn-item-descriptor-popover vn-id="descriptor"
|
|
|
|
quicklinks="$ctrl.quicklinks">
|
|
|
|
</vn-item-descriptor-popover>
|