[if cgi showpending] [value name=showarchive set=""] [/if] [value name=mv_data_table set=transactions hide=1] [if-mm !tables] [set ui_error] Not authorized for order administration. Contact administrator? [/set] [bounce page="__UI_BASE__/error"] [/if-mm] [set page_perm]order[/set] [set meta_header] [/set] [tag flag write]transactions[/tag] [perl tables=transactions] delete $Scratch->{ui_location}; my $db = $Db{transactions}; if(! $db) { $Scratch->{error_message} = "Error: no transactions database.
"; $Scratch->{ui_location} = "__UI_BASE__/error"; return; } my ($value, $action_col); if($CGI->{archiveorder}) { $value = 1; $action_col = 'archived'; } elsif($CGI->{unarchiveorder}) { $value = 0; $action_col = 'archived'; } elsif($CGI->{deleteorder}) { $value = 1; $action_col = 'deleted'; } elsif($CGI->{vieworder} and ! $CGI->{viewnext}) { $CGI->{order} =~ s/^\0+//; $CGI->{order} =~ s/\0+$//; $Scratch->{ui_location} = $Tag->area('__UI_BASE__/order_view', $CGI->{order}); } elsif($CGI->{xload}) { $Scratch->{ui_location} = $Tag->area('__UI_BASE__/dbdownload'); } else { $CGI->{order} =~ s/^\0+//; $CGI->{order} =~ s/\0.*//s; $Scratch->{start_at} = "sm=$CGI->{order}"; } if($action_col) { for(grep $_, @{$CGI_array->{order}}) { $db->set_field($_, $action_col, $value); } } if(@errors) { my $plural = @errors > 1 ? 's' : ''; return "Error$plural:
"; } if($CGI->{viewnext}) { my $ordnum = $CGI->{order}; $ordnum =~ s/[\0,\s].*//; return if ! $ordnum; $ordnum++; CHECKNEXT: { if (! $db->record_exists($ordnum) ) { undef $ordnum; last CHECKNEXT; } if ($db->field($ordnum, 'deleted') ) { $ordnum++; next CHECKNEXT; } if ($Values->{showarchive} and ! $db->field($ordnum, 'archived') ) { undef $ordnum; last CHECKNEXT; } else { last CHECKNEXT; } } if ($ordnum) { $Scratch->{ui_location} = $Tag->area( { href => '__UI_BASE__/order_view', form => "order=$ordnum", } ); } else { $Scratch->{message} = "[L]No next order.[/L]"; } } return; [/perl] [if scratch ui_location] [bounce href=`delete $Scratch->{ui_location}`] [/if] [set icon_name]admin/icon_orders.gif[/set] [seti page_title] [if value showarchive] Orders: archived orders [set help_name]order.main.archived[/set] [else] Orders: pending orders [set help_name]order.main.pending[/set] [/else] [/if] [/seti] [update values] @_UI_STD_HEAD_@ [if scratch message]
[scratch message]
[set message][/set] [/if]
[if value showarchive] [set archive_sense]=[/set] [else] [set archive_sense]!=[/set] [/else] [/if] View Order Stats

[if value showarchive] [if-mm advanced order=u] [/if-mm] [else] [if-mm advanced order=a] [/if-mm] [/else] [/if]

[if-mm advanced order=d] [/if-mm]
[comment] [/comment] [set Start list here] [calc] $CGI->{order} =~ s/^\0+//s; $CGI->{order} =~ s/\0.*//s; $Scratch->{start_at} = "sm=$CGI->{order}"; return; [/calc] mv_nextpage=@@MV_PAGE@@ [/set]
Specific order [loop more=1 search=" fi=transactions ml=__UI_SZ_LIST_ORDER__ md=1 st=db co=yes sf=archived se=1 tf=order_number op=[scratch archive_sense] [scratch start_at][set start_at][/set] sf=deleted se=1 op=ne rf=code,order_date,total_cost "]

[more-list]
Orders [matches] of [value mv_search_match_count]: [more][/more-list] [/loop]

@_UI_STD_FOOTER_@