fixed styles & discounts
gitea/salix/1923-ticket-summary-discount There was a failure building this commit Details

This commit is contained in:
Joan Sanchez 2019-12-12 08:22:04 +01:00
parent 304355fb9d
commit af47ab6cac
2 changed files with 32 additions and 12 deletions

View File

@ -115,7 +115,7 @@
</vn-td> </vn-td>
<vn-td number>{{::sale.price | currency: 'EUR':2}}</vn-td> <vn-td number>{{::sale.price | currency: 'EUR':2}}</vn-td>
<vn-td number>{{::sale.discount}} %</vn-td> <vn-td number>{{::sale.discount}} %</vn-td>
<vn-td number>{{::sale.quantity * sale.price | currency: 'EUR':2}}</vn-td> <vn-td number>{{::sale.quantity * sale.price * ((100 - sale.discount) / 100) | currency: 'EUR':2}}</vn-td>
</vn-tr> </vn-tr>
</vn-tbody> </vn-tbody>
</vn-table> </vn-table>
@ -139,25 +139,27 @@
</vn-tbody> </vn-tbody>
</vn-table> </vn-table>
</vn-one> </vn-one>
<vn-one ng-if="$ctrl.summary.services.length != 0"> <vn-one class="services" ng-if="$ctrl.summary.services.length != 0">
<h4 translate>Service</h4> <h4 translate>Service</h4>
<vn-table model="model"> <vn-table model="model">
<vn-thead> <vn-thead>
<vn-tr> <vn-tr>
<vn-th number>Id</vn-th> <vn-th shrink></vn-th>
<vn-th number>Quantity</vn-th> <vn-th class="identifier" number shrink>Id</vn-th>
<vn-th>Description</vn-th> <vn-th number shrink>Quantity</vn-th>
<vn-th number>Price</vn-th> <vn-th expand>Description</vn-th>
<vn-th>Tax class</vn-th> <vn-th number shrink>Price</vn-th>
<vn-th class="tax-class">Tax class</vn-th>
</vn-tr> </vn-tr>
</vn-thead> </vn-thead>
<vn-tbody> <vn-tbody>
<vn-tr ng-repeat="service in $ctrl.summary.services"> <vn-tr ng-repeat="service in $ctrl.summary.services">
<vn-td number>{{::service.id}}</vn-td> <vn-td></vn-td>
<vn-td number>{{::service.quantity}}</vn-td> <vn-td class="identifier" number shrink>{{::service.id}}</vn-td>
<vn-td number shrink>{{::service.quantity}}</vn-td>
<vn-td expand>{{::service.description}}</vn-td> <vn-td expand>{{::service.description}}</vn-td>
<vn-td number>{{::service.price}}</vn-td> <vn-td number shrink>{{::service.price}}</vn-td>
<vn-td>{{::service.taxClass.description}}</vn-td> <vn-td class="tax-class">{{::service.taxClass.description}}</vn-td>
</vn-tr> </vn-tr>
</vn-tbody> </vn-tbody>
</vn-table> </vn-table>

View File

@ -31,7 +31,7 @@ vn-ticket-summary .summary {
} }
} }
& > div > vn-horizontal > vn-one { & > vn-horizontal > vn-one {
min-width: 10em; min-width: 10em;
&.taxes { &.taxes {
@ -44,5 +44,23 @@ vn-ticket-summary .summary {
margin: .2em; margin: .2em;
} }
} }
&.services {
.vn-table > vn-thead .identifier,
.vn-table > vn-tbody .identifier {
min-width: 3.5em
}
.vn-table > vn-thead .tax-class,
.vn-table > vn-tbody .tax-class {
min-width: 11em;
width: 1px
}
.vn-table > vn-tbody vn-td:first-child {
min-width: 24px;
}
}
} }
} }