%def name = "insert_row(item)">
${ item.sellable.code } |
${ item.sellable.get_description() } |
${ item.get_quantity_unit_string() } |
${ format_price(item.price) if not item.has_children() else '' }
% if item.sale_discount and not item.has_children():
${ _("{discount_value} discount").format(
discount_value=format_percentage(item.sale_discount))}
% endif
|
${ format_price(item.get_total()) if not item.has_children() else '' } |
%def>
${ _("Code") } |
${ _("Item") } |
${ _("Quantity") } |
${ _("Price") } |
${ _("Sub-Total") } |
|
|
|
|
|
% for item in report.order.get_items(with_children=False):
${ insert_row(item) }
% for child in item.children_items:
${ insert_row(child) }
% endfor
% endfor
|
|
${ report.order.get_items_total_quantity() } |
${ _("Subtotal:") } |
${ format_price(report.order.get_sale_subtotal()) } |
% if report.order.discount_value:
|
|
|
${ _("Discount:") } |
${ format_price(report.order.discount_value) } |
% endif
|
|
|
${ _("Total:") } |
${ format_price(report.order.get_total_sale_amount()) } |