mirror of
https://github.com/pretix/pretix.git
synced 2026-05-06 15:24:02 +00:00
PDF editor: Add variable for price including bundles (Z#23197864) (#5284)
This commit is contained in:
@@ -159,8 +159,17 @@ DEFAULT_VARIABLES = OrderedDict((
|
||||
"editor_sample": _("123.45 EUR"),
|
||||
"evaluate": lambda op, order, event: money_filter(op.price, event.currency)
|
||||
}),
|
||||
("price_with_bundled", {
|
||||
"label": _("Price including bundled products"),
|
||||
"editor_sample": _("123.45 EUR"),
|
||||
"evaluate": lambda op, order, event: money_filter(op.price + sum(
|
||||
p.price
|
||||
for p in op.addons.all()
|
||||
if not p.canceled and p.is_bundled
|
||||
), event.currency)
|
||||
}),
|
||||
("price_with_addons", {
|
||||
"label": _("Price including add-ons"),
|
||||
"label": _("Price including add-ons and bundled products"),
|
||||
"editor_sample": _("123.45 EUR"),
|
||||
"evaluate": lambda op, order, event: money_filter(op.price + sum(
|
||||
p.price
|
||||
|
||||
Reference in New Issue
Block a user