6 [% INCLUDE 'doc-head-open.inc' %]
7 <title>Koha › Reports [% IF ( do_it ) %]› Cash register statistics › Results[% ELSE %]› Cash register statistics[% END %]</title>
8 [% INCLUDE 'doc-head-close.inc' %]
9 [% Asset.css("css/datatables.css") %]
12 <body id="cash_register_stats" class="rep">
13 [% INCLUDE 'header.inc' %]
14 [% INCLUDE 'cat-search.inc' %]
16 <div id="breadcrumbs">
17 <a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/reports/reports-home.pl">Reports</a>
20 <a href="/cgi-bin/koha/reports/cash_register_stats.pl">Cash register statistics</a> › Results
22 Cash register statistics
26 <div id="doc3" class="yui-t2">
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 %]" selected="selected">[% manualinv.authorised_value %]</option>
129 <option value="[% value_manualinv %]">[% manualinv.authorised_value %]</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 %]" selected="selected">[% branchloo.branchname %]</option>
142 <option value="[% branchloo.branchcode %]">[% branchloo.branchname %]</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>Biblio title</th>
191 [% FOREACH loopresul IN loopresult %]
193 <td>[% loopresul.mfirstname %] [% loopresul.msurname %]</td>
194 <td><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% loopresul.borrowernumber %]">[% loopresul.cardnumber %]</a></td>
195 <td>[% loopresul.bfirstname %] [% loopresul.bsurname %]</td>
196 <td>[% loopresul.branchname %]</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 %]</span>
229 <td>[% loopresul.note %]</td>
230 <td style="text-align:right;">[% loopresul.amount | $Price %]</td>
231 <td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% loopresul.biblionumber %]">[% loopresul.title %]</a></td>
232 <td>[% loopresul.barcode %]</td>
233 <td>[% ItemTypes.GetDescription(loopresul.itype) %]</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 %]
251 [% INCLUDE 'reports-menu.inc' %]
255 [% MACRO jsinclude BLOCK %]
256 [% INCLUDE 'datatables.inc' %]
257 <script type="text/javascript" id="js">
258 $(document).ready(function() {
259 $("#tbl_cash_register_stats").dataTable($.extend(true, {}, dataTablesDefaults, {
260 "iDisplayLength": 50,
261 "sPaginationType": "full_numbers"
265 [% INCLUDE 'calendar.inc' %]
266 <script type="text/javascript">
269 $(document).ready(function() {
270 // http://jqueryui.com/demos/datepicker/#date-range
271 var dates = $( "#filter_date_begin, #filter_date_end" ).datepicker({
274 onSelect: function( selectedDate ) {
275 var option = this.id == "filter_date_begin" ? "minDate" : "maxDate",
276 instance = $( this ).data( "datepicker" );
277 date = $.datepicker.parseDate(
278 instance.settings.dateFormat ||
279 $.datepicker._defaults.dateFormat,
280 selectedDate, instance.settings );
281 dates.not( this ).datepicker( "option", option, date );
285 $('#frmCashRegister').submit(function() {
286 var isFormValid = true;
287 var alertString= _("Form not submitted because of the following problem(s)")+"\n";
289 alertString +="-------------------------------------------------------------------\n\n";
291 if ( !$('#from').val() || !$('#to').val()){
293 alertString += "\n- " + _("Dates cannot be empty");
305 [% INCLUDE 'intranet-bottom.inc' %]