
<patTemplate:tmpl name="pageoutput" unusedvars="strip">
<script language="javascript" type="text/javascript">
	<!--
	jomresJquery(document).ready(function () {
		make_datatable('admin_list_invoices', '{PAGETITLE}', '{LIVESITE}', '{AJAX_URL}');
		column_ids = new Array(4,6);
		dataTableSetHiddenColumns('admin_list_invoices', column_ids);
		
		var $content = jomresJquery('#filter_invoices').html();
		jomresJquery('#jomres_admin_toolbar').html($content);
		jomresJquery('#filter_invoices').empty();
		
		if (jomresJquery('#jomres_admin_toolbar').html().trim() != '')
			jomresJquery('#jomres_admin_toolbar').css("display", "block");
	});
	//-->
</script>

<h2 class="page-header">{PAGETITLE}</h2>

<div id="filter_invoices">
	<a href="#list_invoices_filters" role="button" data-toggle="modal" class="btn" onclick="jomresJquery('#ui-datepicker-div').appendTo('#list_invoices_filters');"><i class="icon-filter"></i> {HFILTER}</a>
</div>

<table id="admin_list_invoices" class="table table-striped" width="100%">
	<thead>
		<tr>
			<th>{COMMON_EDIT}</th>
			<th>Id</th>
			<th>{HFIRSTNAME}</th>
			<th>{HSURNAME}</th>
			<th>{_JRPORTAL_INVOICES_LINEITEMS}</th>
			<th>{HRAISED}</th>
			<th>{HDUE}</th>
			<th>{HPAID}</th>
			<th>{HGRAND_TOTAL}</th>
			<th>{HINITTOTAL}</th>
		</tr>
	</thead>
	<tbody>
	</tbody>
</table>
<h5>{HLEGEND}</h5>
<span class="label label-orange">{HPENDING}</span>
<span class="label label-green">{HPAID}</span>
<span class="label label-red">{HUNPAID}</span>
<span class="label label-black">{HCANCELLED}</span>

<form action="{JOMRES_SITEPAGE_URL_ADMIN}&task=list_invoices" method="post" name="filterInvoices" class="form-horizontal">
<div id="list_invoices_filters" class="modal hide fade" tabindex="-1" role="dialog" aria-labelledby="myModalLabel" aria-hidden="true">
	<div class="modal-header">
		<button type="button" class="close" data-dismiss="modal" aria-hidden="true">x</button>
		<h3 id="myModalLabel">{HFILTER}</h3>
	</div>
	<div class="modal-body">
		<div class="control-group">
			<div class="control-label">
				{HSTART}
			</div>
			<div class="controls">
				{START}
			</div>
		</div>
		<div class="control-group">
			<div class="control-label">
				{HEND}
			</div>
			<div class="controls">
				{END}
			</div>
		</div>
		<div class="control-group">
			<div class="control-label">
				{HINVOICE_TYPE}
			</div>
			<div class="controls">
				{INVOICE_TYPE}
			</div>
		</div>
		<div class="control-group">
			<div class="control-label">
				{HINVOICE_STATUS}
			</div>
			<div class="controls">
				{INVOICE_STATUS}
			</div>
		</div>
	</div>
	<div class="modal-footer">
		<a class="btn" data-dismiss="modal" aria-hidden="true">{COMMON_CLOSE}</a>
		<input type="submit" value="{HFILTER}" class="btn btn-primary" />
	</div>
</div>
<input type="hidden" name="task" value="list_invoices" />
<input type="hidden" name="cms_user_id" value="{CMS_USER_ID}" />
{CSRF_TOKEN}
</form>
</patTemplate:tmpl>