[calc] if ( $CGI->{showarchive} ) { delete $Values->{showpending}; $Values->{showarchive} = 1; $Scratch->{archive_sense} = 'eq'; $Scratch->{archive_img} = 'left.gif'; $Scratch->{archive_nm} = 'unarchive'; $Scratch->{archive_label} = 'archived'; } elsif($CGI->{showpending}) { delete $Values->{showarchive}; $Values->{showpending} = 1; $Scratch->{archive_sense} = 'ne'; $Scratch->{archive_img} = 'right.gif'; $Scratch->{archive_nm} = 'archive'; $Scratch->{archive_label} = 'pending'; } elsif(! $Values->{showarchive} and ! $Values->{showpending}) { delete $Values->{showarchive}; $Values->{showpending} = 1; $Scratch->{archive_sense} = 'ne'; $Scratch->{archive_img} = 'right.gif'; $Scratch->{archive_nm} = 'archive'; $Scratch->{archive_label} = 'pending'; } else { $CGI->{showpending} = $Values->{showpending}; $CGI->{showarchive} = $Values->{showarchive}; } if($CGI->{checked_status}) { $Values->{checked_status} = $CGI->{checked_status}; } else { $Values->{checked_status} ||= '__UI_SHIPPED_STATUS__'; } return; [/calc] [set icon_name]icon_orders.gif[/set] [seti page_title] [if value showarchive] [L]Orders[/L]: [L]Archived Orders[/L] [set help_name]order.main.archived[/set] [else] [L]Orders[/L]: [L]Pending Orders[/L] [set help_name]order.main.pending[/set] [/else] [/if] [/seti] [set ui_class]Orders[/set] [tmp page_perm]order=l[/tmp] [perl tables="[cgi mv_data_table] [scratch extra_tables] __UI_META_TABLE__"] delete $Scratch->{ui_location}; my $dest = $CGI->{ui_sequence_destination} || '__UI_BASE__/order_status'; if($CGI->{ui_sequence_edit}) { my $doit; $CGI->{item_id_left} =~ s/-_NULL_-/\0/g; $CGI->{item_id_left} =~ s/\0+/,/g; $CGI->{item_id_left} =~ s/,+/,/g; if($CGI->{item_id_left} =~ s/^(.*?),//) { $CGI->{item_id} = $1; $doit = 1; } elsif ($CGI->{item_id_left}) { $CGI->{item_id} = delete $CGI->{item_id_left}; delete $CGI->{ui_sequence_edit}; $doit = 1; } else { delete $CGI->{item_id}; delete $CGI->{ui_sequence_edit}; } return unless $doit; $Scratch->{ui_location} = $Tag->area( { href => $dest, form => qq{ item_id=$CGI->{item_id} item_id_left=$CGI->{item_id_left} ui_sequence_edit=$CGI->{ui_sequence_edit} }, }); return; } [/perl] [if scratch ui_location] [comment]Comes from above include[/comment] [bounce href="[scratchd ui_location]"] [/if] @_UI_STD_HEAD_@ [comment] [/comment] [value name=mv_data_table set=transactions hide=1] [if-mm !tables] [set ui_error] [L]Not authorized for order administration. Contact administrator?[/L] [/set] [bounce page="__UI_BASE__/error"] [/if-mm] [tmp can_delete][if-mm advanced order=d]1[/if-mm][/tmp] [include include/order_delete_archive] [calc] if ($CGI->{mv_like_spec}) { my @f = split /\0/, $CGI->{mv_like_field}; my @s = split /\0/, $CGI->{mv_like_spec}; my @q = 'ra=yes'; my $found; for(my $i = 0; $i < @f; $i++) { next unless length $s[$i]; $found++; push @q, "lf=$f[$i]"; push @q, "ls=$s[$i]"; } if($found) { $CGI->{ui_text_qualification} = join "\n", @q; } else { $CGI->{ui_text_qualification} = "" } } return if $CGI->{ui_text_qualification}; return unless $Variable->{ORDER_VIEW_LARGE} or $Config->{Database}{transactions}{LARGE}; $Scratch->{ui_location} = $Tag->area( { href => '__UI_BASE__/flex_select', form => q( mv_data_table=transactions page_title=Order select page_banner=Order select ui_searchpage=__UI_BASE__/order ), }, ); return; [/calc] [if scratch ui_location] [comment]Comes from above include[/comment] [bounce href="[scratchd ui_location]"] [/if] [update values] [if scratch message]
[scratchd message][/if] [output name=search_box]