refs #5327 warnFix(ticket_sale): fix orderBy amount itemPackingType
gitea/salix/pipeline/head This commit looks good Details

This commit is contained in:
Alex Moreno 2023-06-12 08:33:31 +02:00
parent decc5e471f
commit 1a58424531
2 changed files with 8 additions and 2 deletions

View File

@ -69,7 +69,7 @@
<vn-th ng-click="$ctrl.sortBy('price')" field="price" number>Price</vn-th>
<vn-th ng-click="$ctrl.sortBy('discount')" field="discount" number>Disc</vn-th>
<vn-th ng-click="$ctrl.sortBy('amount')" field="amount" number>Amount</vn-th>
<vn-th ng-click="$ctrl.sortBy('itemPackingTypeFk')" field="itemPackingTypeFk" shrink>Packaging</vn-th>
<vn-th ng-click="$ctrl.sortBy('item.itemPackingTypeFk')" field="itemPackingTypeFk" shrink>Packaging</vn-th>
<vn-th shrink></vn-th>
</vn-tr>
</vn-thead>
@ -202,7 +202,7 @@
</span>
</vn-td>
<vn-td number>
{{$ctrl.getSaleTotal(sale) | currency: 'EUR':2}}
{{::sale.amount | currency: 'EUR':2}}
</vn-td>
<vn-td shrink>
{{::sale.item.itemPackingTypeFk | dashIfEmpty}}

View File

@ -34,6 +34,11 @@ class Controller extends Section {
}
get sales() {
if (this._sales) {
for (let sale of this._sales)
sale.amount = this.getSaleTotal(sale);
}
return this._sales;
}
@ -49,6 +54,7 @@ class Controller extends Section {
return ticketState && ticketState.state.code;
}
getConfig() {
let filter = {
fields: ['daysForWarningClaim'],