# Orders by SKU

[set first_done][/set] [search-region more=1 search=" ra=yes st=db fi=orderline ml=999999 tf=sku to=x "] [set first_done_sku][/set] [search-list] [item-change 0][condition][item-data orderline sku][/condition]
[if scratch first_done_sku] [value prev_data_sku] [/if] |  |  | [if scratch first_done_sku] [summary name=subtotal.orderline.quantity.sku total=1][summary name=subtotal.orderline.quantity.sku reset=1] [/if] | [if scratch first_done_sku] [filter op=|'currency'| interpolate=1][summary name=subtotal.orderline.subtotal.sku total=1][summary name=subtotal.orderline.subtotal.sku reset=1][/filter] [/if] |
sku | title | order_number | quantity | subtotal | price
--- | --- | --- | --- | --- | ---
[/item-change 0] [set first_done_sku]1[/set]
[page href="config/edit_record" form=" mv_action=return mv_data_table=products mv_arg=[item-data orderline sku] "][item-data orderline sku] | [data table=products column=title key='[item-data orderline sku]'] | [page href="config/edit_record" form=" mv_action=return mv_data_table=transactions mv_arg=[item-data orderline order_number] "][item-data orderline order_number] | [item-data orderline quantity][summary name=total.orderline.quantity hide=1 amount="[item-data orderline quantity]"][summary name=subtotal.orderline.quantity.sku hide=1 amount="[item-data orderline quantity]"] | [page href="config/edit_record" form=" mv_action=return mv_data_table=orderline mv_arg=[item-data orderline code] "][filter op=|'currency'| interpolate=1][item-data orderline subtotal][/filter][summary name=total.orderline.subtotal hide=1 amount="[item-data orderline subtotal]"][summary name=subtotal.orderline.subtotal.sku hide=1 amount="[item-data orderline subtotal]"] | [page href="config/edit_record" form=" mv_action=return mv_data_table=pricing mv_arg=[item-data products sku] "][filter op=|'currency'| interpolate=1][data table=products column=price key='[item-data orderline sku]'][/filter]
[value name=prev_data_sku hide=1 set=|[item-data orderline sku]|] [/search-list]
[if scratch first_done_sku] [value prev_data_sku] [/if] |  |  | [if scratch first_done_sku] [summary name=subtotal.orderline.quantity.sku total=1][summary name=subtotal.orderline.quantity.sku reset=1] [/if] | [if scratch first_done_sku] [filter op=|'currency'| interpolate=1][summary name=subtotal.orderline.subtotal.sku total=1][summary name=subtotal.orderline.subtotal.sku reset=1][/filter] [/if] |
TOTAL |  |  | [summary name=total.orderline.quantity total=1] | [filter op=|'currency'| interpolate=1][summary name=total.orderline.subtotal total=1] [/filter] |
[/search-region]