10 [% PROCESS 'accounts.inc' %]
11 [% INCLUDE 'doc-head-open.inc' %]
12 <title>Koha › Reports [% IF ( do_it ) %]› Cash register statistics › Results[% ELSE %]› Cash register statistics[% END %]</title>
13 [% INCLUDE 'doc-head-close.inc' %]
16 <body id="cash_register_stats" class="rep">
17 [% INCLUDE 'header.inc' %]
18 [% INCLUDE 'cat-search.inc' %]
20 <div id="breadcrumbs">
21 <a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/reports/reports-home.pl">Reports</a>
24 <a href="/cgi-bin/koha/reports/cash_register_stats.pl">Cash register statistics</a> › Results
26 Cash register statistics
30 <div class="main container-fluid">
32 <div class="col-sm-10 col-sm-push-2">
35 <h1>Cash register statistics</h1>
36 <form method="post" action="/cgi-bin/koha/reports/cash_register_stats.pl" id="frmCashRegister">
37 <fieldset class="rows">
38 <legend>Cash register statistics [% beginDate | $KohaDates %] to [% endDate | $KohaDates %]</legend>
42 <label for="from">From: </label>
43 <input type="text" size="10" id="from" name="from" value="[% beginDate | $KohaDates %]" class="datepickerfrom" />
44 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
47 <label for="to">To: </label>
48 <input type="text" size="10" id="to" name="to" value="[% endDate | $KohaDates %]" class="datepickerto" />
49 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
53 <label for="">Transaction type:</label>
54 <select name="transaction_type" id="transaction_type">
55 [% IF transaction_type == "ALL" %]
56 <option value="ALL" selected="selected">All transactions</option>
58 <option value="ALL">All transactions</option>
61 [% IF transaction_type == "ACT" %]
62 <option value="ACT" selected="selected">All payments to the library</option>
64 <option value="ACT">All payments to the library</option>
67 [% IF transaction_type == "FORW" %]
68 <option value="FORW" selected="selected">Write off</option>
70 <option value="FORW">Write off</option>
73 [% FOREACH debit_type IN debit_types %]
74 [% IF transaction_type == debit_type.code %]
75 <option value="[% debit_type.code | html %]" selected="selected">[% debit_type.description | html %]</option>
77 <option value="[% debit_type.code | html %]">[% debit_type.description | html %]</option>
81 [% FOREACH credit_type IN credit_types %]
82 [% IF transaction_type == credit_type.code %]
83 <option value="[% credit_type.code | html %]" selected="selected">[% credit_type.description | html %]</option>
85 <option value="[% credit_type.code | html %]">[% credit_type.description | html %]</option>
91 <label>Transaction library</label>
92 <select name="branch" id="branch">
93 <option value="ALL">All</option>
94 [% FOREACH branchloo IN branchloop %]
95 [% IF ( branchloo.selected ) %]
96 <option value="[% branchloo.branchcode | html %]" selected="selected">[% branchloo.branchname | html %]</option>
98 <option value="[% branchloo.branchcode | html %]">[% branchloo.branchname | html %]</option>
103 [% IF Koha.Preference('UseCashRegisters') %]
105 <label for="registerid">Cash register: </label>
106 <select name="registerid" id="registerid">
107 [% PROCESS options_for_registers registers => Registers.all( selected => registerid ) %]
114 <fieldset class="rows">
115 <legend>Output</legend>
118 <label for="outputscreen">To screen into the browser: </label>
119 <input type="radio" checked="checked" name="output" id="outputscreen" value="screen" />
122 <label for="outputfile">To a file:</label>
123 <input type="radio" name="output" value="file" id="outputfile" />
124 <label class="inline" for="basename">Named: </label><input type="text" name="basename" id="basename" value="Export" />
130 <fieldset class="action">
131 <input type="submit" value="Submit" name="do_it" />
137 <table id="tbl_cash_register_stats">
140 <th>Manager name</th>
141 <th>Patron card number</th>
143 <th>Transaction library</th>
144 <th>Transaction date</th>
145 <th>Transaction type</th>
148 <th>Bibliographic record title</th>
153 [% FOREACH loopresul IN loopresult %]
155 <td>[% loopresul.mfirstname | html %] [% loopresul.msurname | html %]</td>
156 <td><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% loopresul.borrowernumber | uri %]">[% loopresul.cardnumber | html %]</a></td>
157 <td>[% loopresul.bfirstname | html %] [% loopresul.bsurname | html %]</td>
158 <td>[% loopresul.branchname | html %]</td>
159 <td>[% loopresul.date | $KohaDates %]</td>
161 [% IF loopresul.credit_type == "ACT" %]
162 <span>All payments to the library</span>
164 [%- PROCESS account_type_description account=loopresul -%]
167 <td>[% loopresul.note | html %]</td>
168 <td style="text-align:right;">[% loopresul.amount | $Price %]</td>
169 <td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% loopresul.biblionumber | uri %]">[% loopresul.title | html %]</a></td>
170 <td>[% loopresul.barcode | html %]</td>
171 <td>[% ItemTypes.GetDescription(loopresul.itype) | html %]</td>
176 [% IF transaction_type == "ACT" %]
177 <th colspan="7" style="text-align:right;">TOTAL</th>
178 <th style="text-align:right;">[% total | $Price %]</th>
179 <th colspan="3"> </th>
185 [% END %] [%# do_it %]
188 </div> <!-- /.col-sm-10.col-sm-push-2 -->
190 <div class="col-sm-2 col-sm-pull-10">
192 [% INCLUDE 'reports-menu.inc' %]
194 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
195 </div> <!-- /.row -->
197 [% MACRO jsinclude BLOCK %]
198 [% Asset.js("js/register_selection.js") | $raw %]
199 [% INCLUDE 'datatables.inc' %]
201 $(document).ready(function() {
202 $("#tbl_cash_register_stats").dataTable($.extend(true, {}, dataTablesDefaults, {
203 "iDisplayLength": 50,
204 "sPaginationType": "full_numbers"
208 [% INCLUDE 'calendar.inc' %]
212 $(document).ready(function() {
213 // http://jqueryui.com/demos/datepicker/#date-range
214 var dates = $( "#filter_date_begin, #filter_date_end" ).datepicker({
217 onSelect: function( selectedDate ) {
218 var option = this.id == "filter_date_begin" ? "minDate" : "maxDate",
219 instance = $( this ).data( "datepicker" );
220 date = $.datepicker.parseDate(
221 instance.settings.dateFormat ||
222 $.datepicker._defaults.dateFormat,
223 selectedDate, instance.settings );
224 dates.not( this ).datepicker( "option", option, date );
228 $('#frmCashRegister').submit(function() {
229 var isFormValid = true;
230 var alertString= _("Form not submitted because of the following problem(s)")+"\n";
232 alertString +="-------------------------------------------------------------------\n\n";
234 if ( !$('#from').val() || !$('#to').val()){
236 alertString += "\n- " + _("Dates cannot be empty");
248 [% INCLUDE 'intranet-bottom.inc' %]