Main Koha release repository
https://koha-community.org
You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
238 lines
9.8 KiB
238 lines
9.8 KiB
[% USE raw %]
|
|
[% USE Asset %]
|
|
[% USE KohaDates %]
|
|
[% USE Price %]
|
|
[% USE ItemTypes %]
|
|
[% SET footerjs = 1 %]
|
|
[% PROCESS 'accounts.inc' %]
|
|
[% INCLUDE 'doc-head-open.inc' %]
|
|
<title>Koha › Reports [% IF ( do_it ) %]› Cash register statistics › Results[% ELSE %]› Cash register statistics[% END %]</title>
|
|
[% INCLUDE 'doc-head-close.inc' %]
|
|
</head>
|
|
|
|
<body id="cash_register_stats" class="rep">
|
|
[% INCLUDE 'header.inc' %]
|
|
[% INCLUDE 'cat-search.inc' %]
|
|
|
|
<div id="breadcrumbs">
|
|
<a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/reports/reports-home.pl">Reports</a>
|
|
›
|
|
[% IF ( do_it ) %]
|
|
<a href="/cgi-bin/koha/reports/cash_register_stats.pl">Cash register statistics</a> › Results
|
|
[% ELSE %]
|
|
Cash register statistics
|
|
[% END %]
|
|
</div>
|
|
|
|
<div class="main container-fluid">
|
|
<div class="row">
|
|
<div class="col-sm-10 col-sm-push-2">
|
|
<main>
|
|
|
|
<h1>Cash register statistics</h1>
|
|
<form method="post" action="/cgi-bin/koha/reports/cash_register_stats.pl" id="frmCashRegister">
|
|
<fieldset class="rows">
|
|
<legend>Cash register statistics [% beginDate | $KohaDates %] to [% endDate | $KohaDates %]</legend>
|
|
<ol>
|
|
<br>
|
|
<li>
|
|
<label for="from">From: </label>
|
|
<input type="text" size="10" id="from" name="from" value="[% beginDate | $KohaDates %]" class="datepickerfrom" />
|
|
<div class="hint">[% INCLUDE 'date-format.inc' %]</div>
|
|
</li>
|
|
<li>
|
|
<label for="to">To: </label>
|
|
<input type="text" size="10" id="to" name="to" value="[% endDate | $KohaDates %]" class="datepickerto" />
|
|
<div class="hint">[% INCLUDE 'date-format.inc' %]</div>
|
|
</li>
|
|
|
|
<li>
|
|
<label for="">Transaction type:</label>
|
|
<select name="transaction_type" id="transaction_type">
|
|
[% IF transaction_type == "ALL" %]
|
|
<option value="ALL" selected="selected">All transactions</option>
|
|
[% ELSE %]
|
|
<option value="ALL">All transactions</option>
|
|
[% END %]
|
|
|
|
[% IF transaction_type == "ACT" %]
|
|
<option value="ACT" selected="selected">All payments to the library</option>
|
|
[% ELSE %]
|
|
<option value="ACT">All payments to the library</option>
|
|
[% END %]
|
|
|
|
[% IF transaction_type == "FORW" %]
|
|
<option value="FORW" selected="selected">Write off</option>
|
|
[% ELSE %]
|
|
<option value="FORW">Write off</option>
|
|
[% END %]
|
|
|
|
[% FOREACH debit_type IN debit_types %]
|
|
[% IF transaction_type == debit_type.code %]
|
|
<option value="[% debit_type.code | html %]" selected="selected">[% debit_type.description | html %]</option>
|
|
[% ELSE %]
|
|
<option value="[% debit_type.code | html %]">[% debit_type.description | html %]</option>
|
|
[% END %]
|
|
[% END %]
|
|
|
|
[% FOREACH credit_type IN credit_types %]
|
|
[% IF transaction_type == credit_type.code %]
|
|
<option value="[% credit_type.code | html %]" selected="selected">[% credit_type.description | html %]</option>
|
|
[% ELSE %]
|
|
<option value="[% credit_type.code | html %]">[% credit_type.description | html %]</option>
|
|
[% END %]
|
|
[% END %]
|
|
</select>
|
|
</li>
|
|
<li>
|
|
<label>Transaction library</label>
|
|
<select name="branch" id="branch">
|
|
<option value="ALL">All</option>
|
|
[% FOREACH branchloo IN branchloop %]
|
|
[% IF ( branchloo.selected ) %]
|
|
<option value="[% branchloo.branchcode | html %]" selected="selected">[% branchloo.branchname | html %]</option>
|
|
[% ELSE %]
|
|
<option value="[% branchloo.branchcode | html %]">[% branchloo.branchname | html %]</option>
|
|
[% END %]
|
|
[% END %]
|
|
</select>
|
|
</td>
|
|
</tr>
|
|
</li>
|
|
</ol>
|
|
</fieldset>
|
|
|
|
<fieldset class="rows">
|
|
<legend>Output</legend>
|
|
<ol>
|
|
<li>
|
|
<label for="outputscreen">To screen into the browser: </label>
|
|
<input type="radio" checked="checked" name="output" id="outputscreen" value="screen" />
|
|
</li>
|
|
<li>
|
|
<label for="outputfile">To a file:</label>
|
|
<input type="radio" name="output" value="file" id="outputfile" />
|
|
<label class="inline" for="basename">Named: </label><input type="text" name="basename" id="basename" value="Export" />
|
|
|
|
</li>
|
|
</ol>
|
|
</fieldset>
|
|
|
|
<fieldset class="action">
|
|
<input type="submit" value="Submit" name="do_it" />
|
|
</fieldset>
|
|
</form>
|
|
|
|
[% IF ( do_it ) %]
|
|
<div> </div>
|
|
<table id="tbl_cash_register_stats">
|
|
<thead>
|
|
<tr>
|
|
<th>Manager name</th>
|
|
<th>Patron card number</th>
|
|
<th>Patron name</th>
|
|
<th>Transaction library</th>
|
|
<th>Transaction date</th>
|
|
<th>Transaction type</th>
|
|
<th>Notes</th>
|
|
<th>Amount</th>
|
|
<th>Bibliographic record title</th>
|
|
<th>Barcode</th>
|
|
<th>Item type</th>
|
|
</tr>
|
|
</thead>
|
|
[% FOREACH loopresul IN loopresult %]
|
|
<tr>
|
|
<td>[% loopresul.mfirstname | html %] [% loopresul.msurname | html %]</td>
|
|
<td><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% loopresul.borrowernumber | uri %]">[% loopresul.cardnumber | html %]</a></td>
|
|
<td>[% loopresul.bfirstname | html %] [% loopresul.bsurname | html %]</td>
|
|
<td>[% loopresul.branchname | html %]</td>
|
|
<td>[% loopresul.date | $KohaDates %]</td>
|
|
<td>
|
|
[% IF loopresul.credit_type == "ACT" %]
|
|
<span>All payments to the library</span>
|
|
[% ELSE %]
|
|
[%- PROCESS account_type_description account=loopresul -%]
|
|
[% END %]
|
|
</td>
|
|
<td>[% loopresul.note | html %]</td>
|
|
<td style="text-align:right;">[% loopresul.amount | $Price %]</td>
|
|
<td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% loopresul.biblionumber | uri %]">[% loopresul.title | html %]</a></td>
|
|
<td>[% loopresul.barcode | html %]</td>
|
|
<td>[% ItemTypes.GetDescription(loopresul.itype) | html %]</td>
|
|
</tr>
|
|
[% END %]
|
|
<tfoot>
|
|
<tr>
|
|
[% IF transaction_type == "ACT" %]
|
|
<th colspan="7" style="text-align:right;">TOTAL</th>
|
|
<th style="text-align:right;">[% total | $Price %]</th>
|
|
<th colspan="3"> </th>
|
|
[% END %]
|
|
</tr>
|
|
</tfoot>
|
|
</table>
|
|
|
|
[% END %] [%# do_it %]
|
|
|
|
</main>
|
|
</div> <!-- /.col-sm-10.col-sm-push-2 -->
|
|
|
|
<div class="col-sm-2 col-sm-pull-10">
|
|
<aside>
|
|
[% INCLUDE 'reports-menu.inc' %]
|
|
</aside>
|
|
</div> <!-- /.col-sm-2.col-sm-pull-10 -->
|
|
</div> <!-- /.row -->
|
|
|
|
[% MACRO jsinclude BLOCK %]
|
|
[% INCLUDE 'datatables.inc' %]
|
|
<script id="js">
|
|
$(document).ready(function() {
|
|
$("#tbl_cash_register_stats").dataTable($.extend(true, {}, dataTablesDefaults, {
|
|
"iDisplayLength": 50,
|
|
"sPaginationType": "full_numbers"
|
|
}));
|
|
});
|
|
</script>
|
|
[% INCLUDE 'calendar.inc' %]
|
|
<script>
|
|
actTotal = "";
|
|
|
|
$(document).ready(function() {
|
|
// http://jqueryui.com/demos/datepicker/#date-range
|
|
var dates = $( "#filter_date_begin, #filter_date_end" ).datepicker({
|
|
changeMonth: true,
|
|
numberOfMonths: 1,
|
|
onSelect: function( selectedDate ) {
|
|
var option = this.id == "filter_date_begin" ? "minDate" : "maxDate",
|
|
instance = $( this ).data( "datepicker" );
|
|
date = $.datepicker.parseDate(
|
|
instance.settings.dateFormat ||
|
|
$.datepicker._defaults.dateFormat,
|
|
selectedDate, instance.settings );
|
|
dates.not( this ).datepicker( "option", option, date );
|
|
}
|
|
});
|
|
|
|
$('#frmCashRegister').submit(function() {
|
|
var isFormValid = true;
|
|
var alertString= _("Form not submitted because of the following problem(s)")+"\n";
|
|
|
|
alertString +="-------------------------------------------------------------------\n\n";
|
|
|
|
if ( !$('#from').val() || !$('#to').val()){
|
|
isFormValid = false;
|
|
alertString += "\n- " + _("Dates cannot be empty");
|
|
}
|
|
|
|
if (!isFormValid) {
|
|
alert(alertString);
|
|
return false;
|
|
}
|
|
});
|
|
});
|
|
</script>
|
|
[% END %]
|
|
|
|
[% INCLUDE 'intranet-bottom.inc' %]
|
|
|