{* $Id: orders.tpl,v 1.19.2.5 2003/03/28 13:59:24 svowl Exp $ *} { include file="location.tpl" last_location=$lng.lbl_search_orders } {assign var="total" value="0"} {assign var="total_paid" value="0"} {$lng.txt_search_orders_header}
{$lng.lbl_status_codes}: I - {$lng.lbl_not_finished}, Q - {$lng.lbl_queued}, P - {$lng.lbl_processed}, B - {$lng.lbl_backordered}, D - {$lng.lbl_declined}, F - {$lng.lbl_failed}, C - {$lng.lbl_complete}.

{capture name=dialog} {if $usertype ne "C"} {/if} {if $usertype eq "A"} {/if} {if $usertype ne "C"} {/if}
{$lng.lbl_order_id}
{$lng.lbl_customer}
{$lng.lbl_provider}
{$lng.lbl_order_status}: *
{$lng.lbl_csv_delimiter}: * {include file="provider/main/ie_delimiter.tpl"}
{$lng.lbl_order_date_from}: * {html_select_date prefix="Start" time=$start_date start_year=$config.Company.start_year end_year=$config.Company.end_year}
{$lng.lbl_order_date_through}: * {html_select_date prefix="End" time=$end_date start_year=$config.Company.start_year end_year=$config.Company.end_year display_days=yes}
    {if $usertype ne "C"}   {/if}   {if $usertype eq "A"} {/literal} {/if}
{/capture} {include file="dialog.tpl" title=$lng.lbl_search_orders content=$smarty.capture.dialog extra="width=100%"}

{if $smarty.get.mode eq "deleted"} {$lng.lbl_all_orders_deleted} {elseif $smarty.server.QUERY_STRING ne "" and $items_count ge "0"} {if $items_count gt "1"} {$total_items} {$lng.lbl_orders_found}
{$lng.lbl_displaying}: {$first_item} - {$last_item} {$lng.lbl_orders} {else} {$items_count} {$lng.lbl_orders_found} {/if} {/if} {if $orders ne ""}

{capture name=dialog} { include file="customer/main/navigation.tpl" }

{section name=cat_num loop=$orders} {math equation="x + ordertotal" x=$total ordertotal=$orders[cat_num].total assign="total"} {if $orders[cat_num].status eq "P" or $orders[cat_num].status eq "C"} {math equation="x + ordertotal" x=$total_paid ordertotal=$orders[cat_num].total assign="total_paid"} {/if} { if %cat_num.first% } {/if} { if %cat_num.last% }
#{$orders[cat_num].orderid} {$orders[cat_num].status} {$orders[cat_num].date|date_format:"%d-%m-%Y %T"}   {if $usertype eq "A"} { $orders[cat_num].provider } {else} { $orders[cat_num].firstname } { $orders[cat_num].lastname } {/if} {include file="currency.tpl" value=$orders[cat_num].total}
{$lng.lbl_gross_total}: {include file="currency.tpl" value=$total}
{$lng.lbl_total_paid}: {include file="currency.tpl" value=$total_paid}
{/if} {/section}
{include file="buttons/print_all.tpl"}   {if $usertype eq "A" or $usertype eq "P"} {include file="buttons/display_labels.tpl"}   {/if} {include file="buttons/details.tpl"} {if $usertype eq "A" or $usertype eq "P"}   {include file="buttons/delete.tpl"} {/if}
{ include file="customer/main/navigation.tpl" } {/capture} {include file="dialog.tpl" title=$lng.lbl_search_results content=$smarty.capture.dialog extra="width=100%"} {/if}