[set page_title][L]Order manager[/L]: [L]View order[/L][/set] [set ui_class]Orders[/set] [set help_name]order.view[/set] [set icon_name]icon_orders.gif[/set] @_UI_STD_HEAD_@ [calc] delete $Scratch->{ui_bounce}; if ($CGI->{order}) { if($CGI->{deliver_encrypted}) { my $dir = q{__ORDER_DIRECTORY__} || 'orders'; my $ord = $Tag->filter('filesafe', $CGI->{order}); $Tag->deliver({ file => "orders/$ord", get_encrypted => 1, type => 'application/pgp-encrypted', }); } return; } $CGI->{order} = $CGI->{mv_arg} or $Scratch->{ui_bounce} = '__UI_BASE__/order'; return; [/calc] [if scratch ui_bounce] [bounce page="[scratch ui_bounce]"] [/if] [update values] [perl tables=country]### pre-open database for calcs below[/perl] [loop list="[value-extended order]"]

[L]User Name[/L]: [loop-data transactions username]

[L]Order Status[/L]: [page href="admin/order_status" form="order=[loop-code]"] [display table=transactions col=status type=display key="[loop-code]"] [if-loop-data transactions archived == 1] ([L]archived[/L]) [/if-loop-data] [if-loop-data transactions deleted == 1] ([L]deleted[/L]) [/if-loop-data]

[L]Affiliate[/L]: [if-loop-data transactions affiliate] [page href="admin/affiliate" form="affiliate=[loop-data transactions affiliate]" ][loop-data transactions affiliate] [else] [L]none[/L] [/else] [/if-loop-data]

[L]Order Date[/L]: [convert-date fmt="%b %e, %Y %l:%M %P"][loop-data transactions order_date][/convert-date]

[loop prefix=customer list="[loop-data transactions username]"]

[L]Customer Details[/L]

[L]Customer[/L]: | [customer-data userdb fname] [customer-data userdb lname]
[if-customer-data userdb company]
[L]Company[/L]: | [customer-data userdb company]
[/if-customer-data] [if-customer-data userdb phone_night]
[L]Home phone[/L]: | [customer-data userdb phone_night]
[/if-customer-data] [if-customer-data userdb phone_day]
[L]Work phone[/L]: | [customer-data userdb phone_day]
[/if-customer-data]
[L]Email[/L]: | [loop-data transactions email]
[L]Payment type[/L]: | [loop-data transactions payment_method]
[if-loop-data transactions shipmode]
[L]Ship method[/L]: | [loop-data transactions shipmode]
[/if-loop-data]
[if type=file term="[either]__ORDER_DIRECTORY__[or]orders[/either]/[loop-code]"]
| [page href="process/[loop-code].pgp" add_dot_html=0 form=" deliver_encrypted=1 mv_todo=return mv_nextpage=@@MV_PAGE@@ order=[loop-code] "][L]Decrypt Credit Card[/L]
[/if]

[/loop]

[L]Billing Details[/L]

[if-loop-data transactions b_address1] [loop prefix=bill list="[loop-code]"]

[L]Name[/L]: | [loop-data transactions b_fname] [loop-data transactions b_lname]
[if-bill-data transactions b_company]
[L]Company[/L]: | [loop-data transactions b_company]
[/if-bill-data]
[L]Address[/L]: | [loop-data transactions b_address1] [if-bill-data transactions b_address2] [loop-data transactions b_address2] [/if-bill-data]
[if-bill-data transactions b_country =~ /^US|^CA/]
[L]City, State, Zip[/L]: | [loop-data transactions b_city], [loop-data transactions state] [loop-data transactions zip]
[else]
[L]City[/L]: | [loop-data transactions b_city]
[if-bill-data transactions b_state]
[L]State[/L]: | [loop-data transactions b_state]
[/if-bill-data] [if-bill-data transactions b_zip]
[L]Postal code[/L]: | [loop-data transactions b_zip]
[/if-bill-data] [/else] [/if-bill-data]
[L]Country[/L]: | [data table=country col=name key="[loop-data transactions b_country]"]

[/loop] [else] [L]Same as shipping address[/L] [/else] [/if-loop-data]

[L]Shipping Details[/L]

[L]Name[/L]: | [loop-data transactions fname] [loop-data transactions lname]
[if-loop-data transactions company]
[L]Company[/L]: | [loop-data transactions company]
[/if-loop-data]
[L]Address[/L]: | [loop-data transactions address1] [if-loop-data transactions address2] [loop-data transactions address2] [/if-loop-data]
[if-loop-data transactions country =~ /^US|^CA/]
[L]City, State, Zip[/L]: | [loop-data transactions city], [loop-data transactions state] [loop-data transactions zip]
[else]
[L]City[/L]: | [loop-data transactions city]
[if-loop-data transactions state]
[L]State[/L]: | [loop-data transactions state]
[/if-loop-data] [if-loop-data transactions zip]
[L]Postal code[/L]: | [loop-data transactions zip]
[/if-loop-data] [/else] [/if-loop-data]
[L]Country[/L]: | [data table=country col=name key="[loop-data transactions country]"]

[L]Status[/L] | [L]SKU[/L] | [L]Name[/L] | [L]Qty[/L] | [L]Unit Price[/L] | [L]Total[/L]
[query list=1 table=orderline sql="select * from orderline where order_number = '[loop-code]'" ignore_undefined=1]

[page href="admin/order_status" form="order=[loop-code]" ] [display table=orderline column=status key="[sql-code]" type=display ] [calc] $total_weight += ([field field=weight key="[sql-param sku]"] + 0 || 0) * [sql-data orderline quantity]; return; [/calc]

[sql-param sku]

[sql-filter 30.][sql-param description][/sql-filter] [if-sql-param size]
[L]Size[/L]: [sql-param size] [/if-sql-param] [if-sql-param color]
[L]Color[/L]: [sql-param color] [/if-sql-param] [if-sql-param options]
[L]Options[/L]: [sql-param options] [/if-sql-param]

[sql-param quantity]

[currency][sql-param price][/currency]

[currency][sql-param subtotal][/currency]

[if-sql-param separate_address]
| SHIP TO: [calc] my $ad = q{[sql-param separate_address]}; $ad =~ s/\s*\n+\s*/ * /g; return $ad; [/calc] |
[/if-sql-param] [/query]
[L]Item Total[/L]: | [currency][loop-data transactions subtotal][/currency]
[L]Tax[/L]: | [currency][loop-data transactions salestax][/currency]
[L]Total Weight[/L]: | [calc]$total_weight[/calc]
[if-loop-data transactions handling > 0]
[L]Handling[/L] | [currency][loop-data transactions handling][/currency]
[/if-loop-data]
[L]Shipping[/L] | [currency][loop-data transactions shipping][/currency]
[L]GRAND TOTAL:[/L] | [currency][loop-data transactions total_cost][/currency]

[seti page_banner][L]View Order[/L]: [loop-code][/seti] [output name=bottom_buttons] [form-session-id] [set [L]Return[/L]] viewnext= vieworder= [/set] [if-loop-data transactions archived] [else] [/else] [/if-loop-data] [if-mm advanced order=d] [/if-mm] [output] [/loop] @_UI_STD_FOOTER_@