7 [% INCLUDE 'doc-head-open.inc' %]
8 <title>Koha › Reports [% IF ( do_it ) %]› Cash register statistics › Results[% ELSE %]› Cash register statistics[% END %]</title>
9 [% INCLUDE 'doc-head-close.inc' %]
10 [% Asset.css("css/datatables.css") | $raw %]
13 <body id="cash_register_stats" class="rep">
14 [% INCLUDE 'header.inc' %]
15 [% INCLUDE 'cat-search.inc' %]
17 <div id="breadcrumbs">
18 <a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/reports/reports-home.pl">Reports</a>
21 <a href="/cgi-bin/koha/reports/cash_register_stats.pl">Cash register statistics</a> › Results
23 Cash register statistics
27 <div class="main container-fluid">
29 <div class="col-sm-10 col-sm-push-2">
32 <h1>Cash register statistics</h1>
33 <form method="post" action="/cgi-bin/koha/reports/cash_register_stats.pl" id="frmCashRegister">
34 <fieldset class="rows">
35 <legend>Cash register statistics [% beginDate | $KohaDates %] to [% endDate | $KohaDates %]</legend>
39 <label for="from">From: </label>
40 <input type="text" size="10" id="from" name="from" value="[% beginDate | $KohaDates %]" class="datepickerfrom" />
41 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
44 <label for="to">To: </label>
45 <input type="text" size="10" id="to" name="to" value="[% endDate | $KohaDates %]" class="datepickerto" />
46 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
50 <label for="">Transaction type:</label>
51 <select name="transaction_type" id="transaction_type">
52 [% IF transaction_type == "ALL" %]
53 <option value="ALL" selected="selected">All transactions</option>
55 <option value="ALL">All transactions</option>
58 [% IF transaction_type == "ACT" %]
59 <option value="ACT" selected="selected">All payments to the library</option>
61 <option value="ACT">All payments to the library</option>
64 [% IF transaction_type == "C" %]
65 <option value="C" selected="selected">Credit</option>
67 <option value="C">Credit</option>
70 [% IF transaction_type == "CR" %]
71 <option value="CR" selected="selected">Credit (item returned)</option>
73 <option value="CR">Credit (item returned)</option>
76 [% IF transaction_type == "FORW" %]
77 <option value="FORW" selected="selected">Write off</option>
79 <option value="FORW">Write off</option>
82 [% IF transaction_type == "F" %]
83 <option value="F" selected="selected">Fine</option>
85 <option value="F">Fine</option>
88 [% IF transaction_type == "FU" %]
89 <option value="FU" selected="selected">Accruing fine</option>
91 <option value="FU">Accruing fine</option>
94 [% IF transaction_type == "PAY" %]
95 <option value="PAY" selected="selected">Payment</option>
97 <option value="PAY">Payment</option>
100 [% IF transaction_type == "A" %]
101 <option value="A" selected="selected">Account management fee</option>
103 <option value="A">Account management fee</option>
106 [% IF transaction_type == "M" %]
107 <option value="M" selected="selected">Sundry</option>
109 <option value="M">Sundry</option>
112 [% IF transaction_type == "L" %]
113 <option value="L" selected="selected">Lost item</option>
115 <option value="L">Lost item</option>
118 [% IF transaction_type == "N" %]
119 <option value="N" selected="selected">New card</option>
121 <option value="N">New card</option>
124 [% FOREACH manualinv IN manualinv_types %]
125 [% value_manualinv = manualinv.authorised_value|truncate(5, '') %]
126 [% IF transaction_type == value_manualinv %]
127 <option value="[% value_manualinv | html %]" selected="selected">[% manualinv.authorised_value | html %]</option>
129 <option value="[% value_manualinv | html %]">[% manualinv.authorised_value | html %]</option>
135 <label>Transaction branch</label>
136 <select name="branch" id="branch">
137 <option value="ALL">All</option>
138 [% FOREACH branchloo IN branchloop %]
139 [% IF ( branchloo.selected ) %]
140 <option value="[% branchloo.branchcode | html %]" selected="selected">[% branchloo.branchname | html %]</option>
142 <option value="[% branchloo.branchcode | html %]">[% branchloo.branchname | html %]</option>
152 <fieldset class="rows">
153 <legend>Output</legend>
156 <label for="outputscreen">To screen into the browser: </label>
157 <input type="radio" checked="checked" name="output" id="outputscreen" value="screen" />
160 <label for="outputfile">To a file:</label>
161 <input type="radio" name="output" value="file" id="outputfile" />
162 <label class="inline" for="basename">Named: </label><input type="text" name="basename" id="basename" value="Export" />
168 <fieldset class="action">
169 <input type="submit" value="Submit" name="do_it" />
175 <table id="tbl_cash_register_stats">
178 <th>Manager name</th>
179 <th>Patron card number</th>
181 <th>Transaction branch</th>
182 <th>Transaction date</th>
183 <th>Transaction type</th>
186 <th>Bibliographic record title</th>
191 [% FOREACH loopresul IN loopresult %]
193 <td>[% loopresul.mfirstname | html %] [% loopresul.msurname | html %]</td>
194 <td><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% loopresul.borrowernumber | uri %]">[% loopresul.cardnumber | html %]</a></td>
195 <td>[% loopresul.bfirstname | html %] [% loopresul.bsurname | html %]</td>
196 <td>[% loopresul.branchname | html %]</td>
197 <td>[% loopresul.date | $KohaDates %]</td>
199 [% IF loopresul.accounttype == "ACT" %]
200 <span>All payments to the library</span>
201 [% ELSIF loopresul.accounttype == "C" || loopresul.accounttype == "CR" %]
203 [% ELSIF loopresul.accounttype == "FORW" || loopresul.accounttype == "W" %]
204 <span>Write off</span>
205 [% ELSIF loopresul.accounttype == "F" %]
207 [% ELSIF loopresul.accounttype == "FU" %]
208 <span>Accruing fine</span>
209 [% ELSIF loopresul.accounttype == "Pay" %]
211 [% ELSIF loopresul.accounttype == "A" %]
212 <span>Account management fee</span>
213 [% ELSIF loopresul.accounttype == "M" %]
215 [% ELSIF loopresul.accounttype == "L" || loopresul.accounttype == "LR" %]
216 <span>Lost item</span>
217 [% ELSIF loopresul.accounttype == "N" %]
218 <span>New card</span>
220 [% FOREACH manualinv IN manualinv_types %]
221 [% value_manualinv = manualinv.authorised_value|truncate(5, '') %]
222 [% IF loopresul.accounttype == value_manualinv %]
223 <span>[% manualinv.authorised_value | html %]</span>
229 <td>[% loopresul.note | html %]</td>
230 <td style="text-align:right;">[% loopresul.amount | $Price %]</td>
231 <td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% loopresul.biblionumber | uri %]">[% loopresul.title | html %]</a></td>
232 <td>[% loopresul.barcode | html %]</td>
233 <td>[% ItemTypes.GetDescription(loopresul.itype) | html %]</td>
238 [% IF transaction_type == "ACT" %]
239 <th colspan="7" style="text-align:right;">TOTAL</th>
240 <th style="text-align:right;">[% total | $Price %]</th>
241 <th colspan="3"> </th>
247 [% END %] [%# do_it %]
250 </div> <!-- /.col-sm-10.col-sm-push-2 -->
252 <div class="col-sm-2 col-sm-pull-10">
254 [% INCLUDE 'reports-menu.inc' %]
256 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
257 </div> <!-- /.row -->
259 [% MACRO jsinclude BLOCK %]
260 [% INCLUDE 'datatables.inc' %]
262 $(document).ready(function() {
263 $("#tbl_cash_register_stats").dataTable($.extend(true, {}, dataTablesDefaults, {
264 "iDisplayLength": 50,
265 "sPaginationType": "full_numbers"
269 [% INCLUDE 'calendar.inc' %]
273 $(document).ready(function() {
274 // http://jqueryui.com/demos/datepicker/#date-range
275 var dates = $( "#filter_date_begin, #filter_date_end" ).datepicker({
278 onSelect: function( selectedDate ) {
279 var option = this.id == "filter_date_begin" ? "minDate" : "maxDate",
280 instance = $( this ).data( "datepicker" );
281 date = $.datepicker.parseDate(
282 instance.settings.dateFormat ||
283 $.datepicker._defaults.dateFormat,
284 selectedDate, instance.settings );
285 dates.not( this ).datepicker( "option", option, date );
289 $('#frmCashRegister').submit(function() {
290 var isFormValid = true;
291 var alertString= _("Form not submitted because of the following problem(s)")+"\n";
293 alertString +="-------------------------------------------------------------------\n\n";
295 if ( !$('#from').val() || !$('#to').val()){
297 alertString += "\n- " + _("Dates cannot be empty");
309 [% INCLUDE 'intranet-bottom.inc' %]