2018-04-13 14:03:43 +00:00
|
|
|
<mg-ajax path="/ticket/api/Sales/saleComponentFilter" options="vnIndex" actions="$ctrl.sales = index.model.instances"></mg-ajax>
|
|
|
|
<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">
|
|
|
|
<span translate>Base</span> {{::$ctrl.base() | currency:'€':3}}
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td number colspan="7">
|
|
|
|
<span translate>Margin</span> {{::$ctrl.profitMargin() | currency:'€':3}}
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
<tr>
|
|
|
|
<td number colspan="7">
|
|
|
|
<span translate>Total</span> {{::$ctrl.total() | currency:'€':3}}
|
|
|
|
</td>
|
|
|
|
</tr>
|
|
|
|
</tfoot>
|
|
|
|
<tbody ng-repeat="sale in $ctrl.sales track by sale.id">
|
|
|
|
<tr>
|
|
|
|
<td rowspan="{{
|
|
|
|
::sale.components.length + 1
|
|
|
|
}}" number>{{::sale.itemFk}}</td>
|
|
|
|
<td rowspan="{{
|
|
|
|
::sale.components.length + 1
|
2018-04-17 07:59:27 +00:00
|
|
|
}}"><vn-fetched-tags sale="sale"/></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>
|
|
|
|
</tr>
|
|
|
|
</tbody>
|
|
|
|
</table>
|
|
|
|
</vn-vertical>
|
|
|
|
<vn-paging margin-large-top vn-one index="index" total="index.model.count"></vn-paging>
|
|
|
|
</vn-card>
|
|
|
|
</vn-vertical>
|