10 [% PROCESS 'accounts.inc' %]
11 [% INCLUDE 'doc-head-open.inc' %]
12 <title>[% IF ( do_it ) %]Cash register statistics › Results[% ELSE %]Cash register statistics[% END %] › Reports › Koha</title>
13 [% INCLUDE 'doc-head-close.inc' %]
16 <body id="cash_register_stats" class="rep">
17 [% WRAPPER 'header.inc' %]
18 [% INCLUDE 'cat-search.inc' %]
21 [% WRAPPER 'sub-header.inc' %]
22 <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
25 <a href="/cgi-bin/koha/mainpage.pl">Home</a>
28 <a href="/cgi-bin/koha/reports/reports-home.pl">Reports</a>
33 <a href="/cgi-bin/koha/reports/cash_register_stats.pl">Cash register statistics</a>
36 <a href="#" aria-current="page">
42 <a href="#" aria-current="page">
43 Cash register statistics
51 <div class="main container-fluid">
53 <div class="col-sm-10 col-sm-push-2">
56 <h1>Cash register statistics</h1>
57 <form method="post" action="/cgi-bin/koha/reports/cash_register_stats.pl" id="frmCashRegister">
58 <fieldset class="rows">
59 <legend>Cash register statistics [% beginDate | $KohaDates %] to [% endDate | $KohaDates %]</legend>
63 <label for="from">From: </label>
64 <input type="text" size="10" id="from" name="from" value="[% beginDate | html %]" class="flatpickr" data-date_to="to" />
65 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
68 <label for="to">To: </label>
69 <input type="text" size="10" id="to" name="to" value="[% endDate | html %]" class="flatpickr" />
70 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
74 <label for="">Transaction type:</label>
75 <select name="transaction_type" id="transaction_type">
76 [% IF transaction_type == "ALL" %]
77 <option value="ALL" selected="selected">All transactions</option>
79 <option value="ALL">All transactions</option>
82 [% IF transaction_type == "ACT" %]
83 <option value="ACT" selected="selected">All payments to the library</option>
85 <option value="ACT">All payments to the library</option>
88 [% IF transaction_type == "FORW" %]
89 <option value="FORW" selected="selected">Write off</option>
91 <option value="FORW">Write off</option>
94 [% FOREACH debit_type IN debit_types %]
95 [% IF transaction_type == debit_type.code %]
96 <option value="[% debit_type.code | html %]" selected="selected">[% debit_type.description | html %]</option>
98 <option value="[% debit_type.code | html %]">[% debit_type.description | html %]</option>
102 [% FOREACH credit_type IN credit_types %]
103 [% IF transaction_type == credit_type.code %]
104 <option value="[% credit_type.code | html %]" selected="selected">[% credit_type.description | html %]</option>
106 <option value="[% credit_type.code | html %]">[% credit_type.description | html %]</option>
112 <label>Transaction library</label>
113 <select name="branch" id="branch">
114 <option value="ALL">All</option>
115 [% FOREACH branchloo IN branchloop %]
116 [% IF ( branchloo.selected ) %]
117 <option value="[% branchloo.branchcode | html %]" selected="selected">[% branchloo.branchname | html %]</option>
119 <option value="[% branchloo.branchcode | html %]">[% branchloo.branchname | html %]</option>
124 [% IF Koha.Preference('UseCashRegisters') %]
126 <label for="registerid">Cash register: </label>
127 <select name="registerid" id="registerid">
128 <option id="noregister" selected="selected" value="">-- All --</option>
129 [% PROCESS options_for_registers registers => Registers.all( selected => registerid ) %]
136 <fieldset class="rows">
137 <legend>Output</legend>
140 <label for="outputscreen">To screen into the browser: </label>
141 <input type="radio" checked="checked" name="output" id="outputscreen" value="screen" />
144 <label for="outputfile">To a file:</label>
145 <input type="radio" name="output" value="file" id="outputfile" />
146 <label class="inline" for="basename">Named: </label><input type="text" name="basename" id="basename" value="Export" />
152 <fieldset class="action">
153 <input type="submit" value="Submit" class="btn btn-default" name="do_it" />
159 <table id="tbl_cash_register_stats">
162 <th>Manager name</th>
163 <th>Patron card number</th>
165 <th>Transaction library</th>
166 <th>Transaction date</th>
168 <th>Transaction type</th>
171 <th>Bibliographic record title</th>
176 [% FOREACH loopresul IN loopresult %]
178 <td>[% loopresul.mfirstname | html %] [% loopresul.msurname | html %]</td>
179 <td><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% loopresul.borrowernumber | uri %]">[% loopresul.cardnumber | html %]</a></td>
180 <td>[% loopresul.bfirstname | html %] [% loopresul.bsurname | html %]</td>
181 <td>[% loopresul.branchname | html %]</td>
182 <td>[% loopresul.date | $KohaDates %]</td>
183 <td>[% loopresul.timestamp | $KohaDates with_hours = 1 %]</td>
184 <td>[% loopresul.type_description | html %]</td>
185 <td>[% loopresul.note | html %]</td>
186 <td style="text-align:right;">[% loopresul.amount | $Price %]</td>
187 <td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% loopresul.biblionumber | uri %]">[% loopresul.title | html %]</a></td>
188 <td>[% loopresul.barcode | html %]</td>
189 <td>[% ItemTypes.GetDescription(loopresul.itype) | html %]</td>
194 [% IF transaction_type == "ACT" %]
195 <th colspan="8" style="text-align:right;">TOTAL</th>
196 <th style="text-align:right;">[% total | $Price %]</th>
197 <th colspan="3"> </th>
203 [% END %] [%# do_it %]
206 </div> <!-- /.col-sm-10.col-sm-push-2 -->
208 <div class="col-sm-2 col-sm-pull-10">
210 [% INCLUDE 'reports-menu.inc' %]
212 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
213 </div> <!-- /.row -->
215 [% MACRO jsinclude BLOCK %]
216 [% Asset.js("js/register_selection.js") | $raw %]
217 [% INCLUDE 'datatables.inc' %]
219 $(document).ready(function() {
220 $("#tbl_cash_register_stats").dataTable($.extend(true, {}, dataTablesDefaults, {
221 "iDisplayLength": 50,
222 "sPaginationType": "full_numbers"
226 [% INCLUDE 'calendar.inc' %]
230 $(document).ready(function() {
232 $('#frmCashRegister').submit(function() {
233 var isFormValid = true;
234 var alertString= _("Form not submitted because of the following problem(s)")+"\n";
236 alertString +="-------------------------------------------------------------------\n\n";
238 if ( !$('#from').val() || !$('#to').val()){
240 alertString += "\n- " + _("Dates cannot be empty");
252 [% INCLUDE 'intranet-bottom.inc' %]