{include file="clearheader.html"}
<!--// $Id$ //-->
<TABLE WIDTH="100%" CELLPADDING="3" ALIGN="CENTER">
	<TR>
		<TD WIDTH="535" VALIGN="TOP">
			<P class="hdf"><B>{$layout.pagetitle}</B>
			{if $layout.username}<BR><span class="sdr"><B>{$layout.username}</B></span>{/if}
			{if $layout.registry}<BR><span class="sdr"><B>{$layout.registry}</B></span>{/if}
			{if $layout.group}<BR><span class="sdr"><B>{$layout.group}</B></span>{/if}
			</P>
		</TD>
		<TD WIDTH="180" ALIGN="RIGHT" NOWRAP>
			LMS {$layout.lmsv} @ {$layout.hostname}<BR>
			{t a=trans($smarty.now|date_format:"l") b=$smarty.now|date_format:"Y-m-d"}<!date-format>$a, $b{/t}
			<br>
			{t a=$layout.logname}Prepared by: $a{/t}
		</TD>
	</TR>
</TABLE>
<BR>
<TABLE WIDTH="100%" CELLPADDING="3" BORDER="1" ALIGN="CENTER">
	<TR>
		<TD WIDTH="15" ALIGN="CENTER" CLASS="HEAD">
			{trans("No.")}
		</TD>
		<TD WIDTH="45" CLASS="HEAD" ALIGN="CENTER">
			{trans("Date")}
		</TD>
		<TD WIDTH="50" CLASS="HEAD" ALIGN="CENTER">
			{trans("Number")}
		</TD>
		<TD WIDTH="225" CLASS="HEAD" ALIGN="CENTER">
			{trans("Customer")}
		</TD>
		<TD WIDTH="120" CLASS="HEAD" ALIGN="CENTER">
			{trans("Title")}
		</TD>
		<TD WIDTH="50" CLASS="HEAD" ALIGN="CENTER">
			{trans("Income")}
		</TD>
		<TD WIDTH="50" CLASS="HEAD" ALIGN="CENTER">
			{trans("Expense")}
		</TD>
		<TD WIDTH="50" CLASS="HEAD" ALIGN="CENTER">
			{trans("After")}
		</TD>
	</TR>
	{cycle values="white,grey" print=false}
	{section name=receiptlist loop=$receiptlist}
	<TR class="{cycle}">
		<TD ALIGN="CENTER">
			{counter}.
		</TD>
		<TD ALIGN="RIGHT" NOWRAP>
			{$receiptlist[receiptlist].cdate|date_format:"d.m.Y"}
		</TD>
		<TD ALIGN="RIGHT" NOWRAP>
			{$receiptlist[receiptlist].number}
		</TD>
		<TD ALIGN="LEFT">
			{$receiptlist[receiptlist].customer}
		</TD>
		<TD ALIGN="LEFT">
			{foreach from=$receiptlist[receiptlist].title item=title}
				{$title}<BR>
			{/foreach}
		</TD>
		<TD ALIGN="RIGHT" NOWRAP>
			{if $receiptlist[receiptlist].value > 0}{moneyf($receiptlist[receiptlist].value, $receiptlist[receiptlist].currency)}{else}-{/if}
		</TD>
		<TD ALIGN="RIGHT" NOWRAP>
			{if $receiptlist[receiptlist].value < 0}{moneyf($receiptlist[receiptlist].value*-1, $receiptlist[receiptlist].currency)}{else}-{/if}
		</TD>
		<TD ALIGN="RIGHT" NOWRAP>
			{moneyf($receiptlist[receiptlist].after)}
		</TD>
	</TR>
	{sectionelse}
	<tr>
		<td colspan="8" class="empty-table">
			{trans("No such cash receipts in database.")}
		</td>
	</tr>
	{/section}
	<TR>
		<TD CLASS="HEADGREY" COLSPAN="5" ALIGN="RIGHT">
			<B>{trans("Total:")}</B><HR>
			<B>{trans("Balance:")}</B><BR>
			<B>{trans("Initial balance:")}</B><BR>
			<B>{trans("Final balance:")}</B>
			{if $listdata.advances}<BR><B>{trans("Not accounted advances:")}</B>{/if}
		</TD>
		<TD CLASS="HEADGREY" ALIGN="RIGHT" nowrap>
			<B>{moneyf($listdata.totalincome)}</B><HR>
			<B>{moneyf($listdata.totalincome - $listdata.totalexpense)}</B><BR>
			<B>{moneyf($listdata.startbalance)}</B><BR>
			<B>{moneyf($listdata.endbalance)}</B>
			{if $listdata.advances}<BR><B>{moneyf($listdata.advances)}</B>{/if}
		</TD>
		<TD CLASS="HEADGREY" ALIGN="RIGHT" nowrap>
			<B>{moneyf($listdata.totalexpense)}</B><HR>
		</TD>
		<TD CLASS="HEADGREY"></TD>
	</TR>
</TABLE>
{include file="clearfooter.html"}
