Expose "discount type" for Trainwrewck line items
This commit is contained in:
parent
3553f23eab
commit
2290d9f990
|
@ -254,7 +254,8 @@ class TransactionView(MasterView):
|
||||||
g = factory(
|
g = factory(
|
||||||
key='{}.discounts'.format(route_prefix),
|
key='{}.discounts'.format(route_prefix),
|
||||||
data=[] if use_buefy else item.discounts,
|
data=[] if use_buefy else item.discounts,
|
||||||
columns=['description', 'amount'],
|
columns=['discount_type', 'description', 'amount'],
|
||||||
|
labels={'discount_type': "Type"},
|
||||||
request=self.request)
|
request=self.request)
|
||||||
|
|
||||||
if use_buefy:
|
if use_buefy:
|
||||||
|
@ -273,6 +274,7 @@ class TransactionView(MasterView):
|
||||||
discounts_data = []
|
discounts_data = []
|
||||||
for discount in item.discounts:
|
for discount in item.discounts:
|
||||||
discounts_data.append({
|
discounts_data.append({
|
||||||
|
'discount_type': discount.discount_type,
|
||||||
'description': discount.description,
|
'description': discount.description,
|
||||||
'amount': app.render_currency(discount.amount),
|
'amount': app.render_currency(discount.amount),
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue