[calc] $Values->{ui_data_fields} = $CGI->{ui_data_fields} = 'status archive delete'; $CGI->{mv_data_table} = 'transactions'; $CGI->{item_id} ||= $CGI->{order}; $CGI->{order} = $CGI->{item_id}; return; [/calc] [if cgi ship_auto] [calc] my $orders = join ",", delete $CGI->{item_id}, delete $CGI->{item_id_left}; $orders =~ s/-_NULL_-/\0/g; $orders =~ s/\0+/,/g; $orders =~ s/,+/,/g; delete $CGI->{order}; $Scratch->{order_list} = $orders; [/calc] [flag type=write value=1 tables="orderline transactions"] [loop list="[scratch order_list]"] [update-order-status order_number="[loop-code]" ship_all=1 [if-loop-data transactions order_id] settle_transaction="__SETTLE_TRANSACTION__" [/if-loop-data] archive=1] [if scratch ship_notice_username] [email-raw][include etc/ship_notice][/email-raw] [/if] [/loop] [/if] [if !cgi order] [bounce page="__UI_BASE__/order"] [/if] [set ui_class]Orders[/set] [seti page_title][L]Order status[/L] -- [cgi order][/seti] [tmp page_banner][L]Order status[/L]: [L]order[/L] [page href="__UI_BASE__/order_view" form="order=[cgi order]"][cgi order][/tmp] [set help_name]item.edit[/set] [set icon_name]icon_item.gif[/set] @_UI_STD_HEAD_@ [tmp form_include]
Actions
[tmp tmp_orderid][data table=transactions col=order_id key="[cgi order]"][/tmp]
[button form=tform extra='style="font-weight: bold"' text="[L]Update the order[/L]"] mv_todo=back order=[cgi code] [tag flag write]orderline transactions[/tag] [update-order-status order-number="[cgi code]" cancel-order="[if cgi ship_all eq 2]1[/if]" ] [if scratch ship_notice_username] [email-raw][include etc/ship_notice][/email-raw] [/if] [/button] [L]Email[/L]
[if variable SETTLE_TRANSACTION]
[if scratch tmp_orderid] [L]Settle transaction[/L] [L]Void transaction[/L] [/if] [/if] [L]Archive transaction at end[/L]
[/tmp] [table-editor table=transactions key="[cgi order]" output_map=1 button_delete=1 form-name=tform table-width="100%" next-text="[L]Update status only, no ship function[/L]" ok-button-style="font-weight: normal; font-size: smaller" no-table-meta=1 mv-nextpage="__UI_BASE__/order" ui_data_fields="code status tracking_number order_id auth_code archived deleted" include-form="[scratch form_include]" include-before="order_id" widget.code=hidden_text help.order_id='* = [L]settled[/L], - = [L]voided[/L]' link-table=orderline link-key=order_number link-fields="order_number sku quantity price tracking_number status" link-before=order_id link-no-blank=1 link-label="[L]Ordered Items[/L]" hidden.ui_sequence_destination="@@MV_PAGE@@" /]
@_UI_STD_FOOTER_@