70 lines
2.7 KiB
HTML
70 lines
2.7 KiB
HTML
<vn-crud-model
|
|
vn-id="model"
|
|
url="Sales"
|
|
link="{ticketFk: $ctrl.$stateParams.id}"
|
|
filter="::$ctrl.filter"
|
|
data="components"
|
|
auto-load="true">
|
|
</vn-crud-model>
|
|
<vn-data-viewer model="model" class="vn-w-xl">
|
|
<vn-card class="vn-pa-lg text-right" name="base-sum">
|
|
<span translate>Base to commission</span> {{$ctrl.base() | currency: 'EUR':3}}
|
|
</vn-card>
|
|
<vn-card class="vn-mt-md">
|
|
<table class="vn-table">
|
|
<thead>
|
|
<tr>
|
|
<th number translate>Item</th>
|
|
<th translate expand>Description</th>
|
|
<th number translate>Quantity</th>
|
|
<th translate>Serie</th>
|
|
<th translate>Components</th>
|
|
<th number translate>Import</th>
|
|
<th number translate>Total</th>
|
|
</tr>
|
|
</thead>
|
|
<tbody ng-repeat="sale in components track by sale.id">
|
|
<tr style="height: initial;">
|
|
<td rowspan="{{::sale.components.length + 1}}" number>
|
|
<span
|
|
ng-click="$ctrl.showDescriptor($event, sale.itemFk)"
|
|
class="link">
|
|
{{sale.itemFk | zeroFill:6}}
|
|
</span>
|
|
</td>
|
|
<td rowspan="{{::sale.components.length + 1}}" expand>
|
|
<vn-fetched-tags
|
|
max-length="6"
|
|
item="::sale.item"
|
|
name="::sale.concept"
|
|
sub-name="::sale.item.subName">
|
|
</vn-fetched-tags>
|
|
</td>
|
|
<td rowspan="{{::sale.components.length + 1}}" number>
|
|
{{::sale.quantity}}
|
|
</td>
|
|
</tr>
|
|
<tr
|
|
ng-repeat="component in sale.components track by component.componentFk"
|
|
class="components">
|
|
<td>
|
|
{{::component.componentRate.componentType.type}}
|
|
</td>
|
|
<td>
|
|
{{::component.componentRate.name}}
|
|
</td>
|
|
<td number>
|
|
{{::component.value | currency: 'EUR':3}}
|
|
</td>
|
|
<td number>
|
|
{{::sale.quantity * component.value | currency: 'EUR':3}}
|
|
</td>
|
|
</tr>
|
|
</tbody>
|
|
</table>
|
|
</vn-card>
|
|
</vn-data-viewer>
|
|
<vn-item-descriptor-popover
|
|
vn-id="descriptor"
|
|
quicklinks="$ctrl.quicklinks">
|
|
</vn-item-descriptor-popover> |