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 <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
23 <a href="/cgi-bin/koha/mainpage.pl">Home</a>
26 <a href="/cgi-bin/koha/reports/reports-home.pl">Reports</a>
31 <a href="/cgi-bin/koha/reports/cash_register_stats.pl">Cash register statistics</a>
34 <a href="#" aria-current="page">
40 <a href="#" aria-current="page">
41 Cash register statistics
48 <div class="main container-fluid">
50 <div class="col-sm-10 col-sm-push-2">
53 <h1>Cash register statistics</h1>
54 <form method="post" action="/cgi-bin/koha/reports/cash_register_stats.pl" id="frmCashRegister">
55 <fieldset class="rows">
56 <legend>Cash register statistics [% beginDate | $KohaDates %] to [% endDate | $KohaDates %]</legend>
60 <label for="from">From: </label>
61 <input type="text" size="10" id="from" name="from" value="[% beginDate | $KohaDates %]" class="datepickerfrom" />
62 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
65 <label for="to">To: </label>
66 <input type="text" size="10" id="to" name="to" value="[% endDate | $KohaDates %]" class="datepickerto" />
67 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
71 <label for="">Transaction type:</label>
72 <select name="transaction_type" id="transaction_type">
73 [% IF transaction_type == "ALL" %]
74 <option value="ALL" selected="selected">All transactions</option>
76 <option value="ALL">All transactions</option>
79 [% IF transaction_type == "ACT" %]
80 <option value="ACT" selected="selected">All payments to the library</option>
82 <option value="ACT">All payments to the library</option>
85 [% IF transaction_type == "FORW" %]
86 <option value="FORW" selected="selected">Write off</option>
88 <option value="FORW">Write off</option>
91 [% FOREACH debit_type IN debit_types %]
92 [% IF transaction_type == debit_type.code %]
93 <option value="[% debit_type.code | html %]" selected="selected">[% debit_type.description | html %]</option>
95 <option value="[% debit_type.code | html %]">[% debit_type.description | html %]</option>
99 [% FOREACH credit_type IN credit_types %]
100 [% IF transaction_type == credit_type.code %]
101 <option value="[% credit_type.code | html %]" selected="selected">[% credit_type.description | html %]</option>
103 <option value="[% credit_type.code | html %]">[% credit_type.description | html %]</option>
109 <label>Transaction library</label>
110 <select name="branch" id="branch">
111 <option value="ALL">All</option>
112 [% FOREACH branchloo IN branchloop %]
113 [% IF ( branchloo.selected ) %]
114 <option value="[% branchloo.branchcode | html %]" selected="selected">[% branchloo.branchname | html %]</option>
116 <option value="[% branchloo.branchcode | html %]">[% branchloo.branchname | html %]</option>
121 [% IF Koha.Preference('UseCashRegisters') %]
123 <label for="registerid">Cash register: </label>
124 <select name="registerid" id="registerid">
125 <option id="noregister" selected="selected" value="">-- All --</option>
126 [% PROCESS options_for_registers registers => Registers.all( selected => registerid ) %]
133 <fieldset class="rows">
134 <legend>Output</legend>
137 <label for="outputscreen">To screen into the browser: </label>
138 <input type="radio" checked="checked" name="output" id="outputscreen" value="screen" />
141 <label for="outputfile">To a file:</label>
142 <input type="radio" name="output" value="file" id="outputfile" />
143 <label class="inline" for="basename">Named: </label><input type="text" name="basename" id="basename" value="Export" />
149 <fieldset class="action">
150 <input type="submit" value="Submit" name="do_it" />
156 <table id="tbl_cash_register_stats">
159 <th>Manager name</th>
160 <th>Patron card number</th>
162 <th>Transaction library</th>
163 <th>Transaction date</th>
164 <th>Transaction type</th>
167 <th>Bibliographic record title</th>
172 [% FOREACH loopresul IN loopresult %]
174 <td>[% loopresul.mfirstname | html %] [% loopresul.msurname | html %]</td>
175 <td><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% loopresul.borrowernumber | uri %]">[% loopresul.cardnumber | html %]</a></td>
176 <td>[% loopresul.bfirstname | html %] [% loopresul.bsurname | html %]</td>
177 <td>[% loopresul.branchname | html %]</td>
178 <td>[% loopresul.date | $KohaDates %]</td>
180 [% IF loopresul.credit_type == "ACT" %]
181 <span>All payments to the library</span>
183 [%- PROCESS account_type_description account=loopresul -%]
186 <td>[% loopresul.note | html %]</td>
187 <td style="text-align:right;">[% loopresul.amount | $Price %]</td>
188 <td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% loopresul.biblionumber | uri %]">[% loopresul.title | html %]</a></td>
189 <td>[% loopresul.barcode | html %]</td>
190 <td>[% ItemTypes.GetDescription(loopresul.itype) | html %]</td>
195 [% IF transaction_type == "ACT" %]
196 <th colspan="7" style="text-align:right;">TOTAL</th>
197 <th style="text-align:right;">[% total | $Price %]</th>
198 <th colspan="3"> </th>
204 [% END %] [%# do_it %]
207 </div> <!-- /.col-sm-10.col-sm-push-2 -->
209 <div class="col-sm-2 col-sm-pull-10">
211 [% INCLUDE 'reports-menu.inc' %]
213 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
214 </div> <!-- /.row -->
216 [% MACRO jsinclude BLOCK %]
217 [% Asset.js("js/register_selection.js") | $raw %]
218 [% INCLUDE 'datatables.inc' %]
220 $(document).ready(function() {
221 $("#tbl_cash_register_stats").dataTable($.extend(true, {}, dataTablesDefaults, {
222 "iDisplayLength": 50,
223 "sPaginationType": "full_numbers"
227 [% INCLUDE 'calendar.inc' %]
231 $(document).ready(function() {
232 // http://jqueryui.com/demos/datepicker/#date-range
233 var dates = $( "#filter_date_begin, #filter_date_end" ).datepicker({
236 onSelect: function( selectedDate ) {
237 var option = this.id == "filter_date_begin" ? "minDate" : "maxDate",
238 instance = $( this ).data( "datepicker" );
239 date = $.datepicker.parseDate(
240 instance.settings.dateFormat ||
241 $.datepicker._defaults.dateFormat,
242 selectedDate, instance.settings );
243 dates.not( this ).datepicker( "option", option, date );
247 $('#frmCashRegister').submit(function() {
248 var isFormValid = true;
249 var alertString= _("Form not submitted because of the following problem(s)")+"\n";
251 alertString +="-------------------------------------------------------------------\n\n";
253 if ( !$('#from').val() || !$('#to').val()){
255 alertString += "\n- " + _("Dates cannot be empty");
267 [% INCLUDE 'intranet-bottom.inc' %]