Revision 422 (by ahitrov, 2014/02/28 20:20:43) Order accounting reports
<fieldset>
<legend>Отчет по заказам</legend>
	<form name="searchdoc" action="orders.html" method="GET" target="_blank">
	<table width="100%" border="0" cellpadding="0" cellspacing="6" class="tform">
	<tr><td><b>Выберите статус:</b></td></tr>
	<tr><td><& "/contenido/components/select.msn", name=>'status', values => \@status_values, check => 4, style=>'width:100%;font-size:8pt;' &></td>
	<tr><td><b>Сортировать:</b></td></tr>
	<tr><td><& "/contenido/components/select.msn", name=>'sort', values => \@sorts, style=>'width:100%;font-size:8pt;' &></td>
	<tr><td height="5"></td></tr>
	<tr><td><b>Диапазон дат:</b></td></tr>
	<tr><td><& "/contenido/components/inputs/date.msn", name => 'from' &></td></tr>
	<tr><td><& "/contenido/components/inputs/date.msn", name => 'to' &></td></tr>
	<tr><td><b>Отобразить:</b></td></tr>
	<tr><td><& "/contenido/components/select.msn", name=>'show', values => \@shows, style=>'width:100%;font-size:8pt;' &></td>
	<tr><td><input type="submit" value="Отобрать" class="btn"></td></tr>
	</table>
	</form>
</fieldset>

<%once>

    my @sorts = (
	'id'	=> 'по номеру заказа',
	'uid'	=> 'по пользователю',
    );

    my @shows = (
	'html'	=> 'В виде HTML',
	'tsv'	=> 'Tab-separated текст',
    );

</%once>
<%args>


</%args>
<%init>

    my @props = webshop::Order->new($keeper)->structure;
    my ($prop_status) = grep { $_->{attr} eq 'status' } @props;
    my @status_values = map { $_->[0] => $_->[1] } @{$prop_status->{cases}};

</%init>