9 [% PROCESS 'i18n.inc' %]
10 [% SET footerjs = 1 %]
11 [% PROCESS 'accounts.inc' %]
12 [% INCLUDE 'doc-head-open.inc' %]
13 <title>[% FILTER collapse %]
15 [% t("Results") | html %] ›
17 [% t("Cash register statistics") | html %] ›
18 [% t("Reports") | html %] ›
19 [% t("Koha") | html %]
21 [% INCLUDE 'doc-head-close.inc' %]
24 <body id="cash_register_stats" class="rep">
25 [% WRAPPER 'header.inc' %]
26 [% INCLUDE 'cat-search.inc' %]
29 [% WRAPPER 'sub-header.inc' %]
30 <nav id="breadcrumbs" aria-label="Breadcrumb" class="breadcrumb">
33 <a href="/cgi-bin/koha/mainpage.pl">Home</a>
36 <a href="/cgi-bin/koha/reports/reports-home.pl">Reports</a>
41 <a href="/cgi-bin/koha/reports/cash_register_stats.pl">Cash register statistics</a>
44 <a href="#" aria-current="page">
50 <a href="#" aria-current="page">
51 Cash register statistics
59 <div class="main container-fluid">
61 <div class="col-sm-10 col-sm-push-2">
64 <h1>Cash register statistics</h1>
65 <form method="post" action="/cgi-bin/koha/reports/cash_register_stats.pl" id="frmCashRegister">
66 <fieldset class="rows">
67 <legend>Cash register statistics [% beginDate | $KohaDates %] to [% endDate | $KohaDates %]</legend>
71 <label for="from">From: </label>
72 <input type="text" size="10" id="from" name="from" value="[% beginDate | html %]" class="flatpickr" data-date_to="to" />
73 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
76 <label for="to">To: </label>
77 <input type="text" size="10" id="to" name="to" value="[% endDate | html %]" class="flatpickr" />
78 <div class="hint">[% INCLUDE 'date-format.inc' %]</div>
82 <label for="">Transaction type:</label>
83 <select name="transaction_type" id="transaction_type">
84 [% IF transaction_type == "ALL" %]
85 <option value="ALL" selected="selected">All transactions</option>
87 <option value="ALL">All transactions</option>
90 [% IF transaction_type == "ACT" %]
91 <option value="ACT" selected="selected">All payments to the library</option>
93 <option value="ACT">All payments to the library</option>
96 [% IF transaction_type == "FORW" %]
97 <option value="FORW" selected="selected">Write off</option>
99 <option value="FORW">Write off</option>
102 [% FOREACH debit_type IN debit_types %]
103 [% IF transaction_type == debit_type.code %]
104 <option value="[% debit_type.code | html %]" selected="selected">[% debit_type.description | html %]</option>
106 <option value="[% debit_type.code | html %]">[% debit_type.description | html %]</option>
110 [% FOREACH credit_type IN credit_types %]
111 [% IF transaction_type == credit_type.code %]
112 <option value="[% credit_type.code | html %]" selected="selected">[% credit_type.description | html %]</option>
114 <option value="[% credit_type.code | html %]">[% credit_type.description | html %]</option>
120 <label>Transaction library</label>
121 <select name="branch" id="branch">
122 <option value="ALL">All</option>
123 [% FOREACH branchloo IN branchloop %]
124 [% IF ( branchloo.selected ) %]
125 <option value="[% branchloo.branchcode | html %]" selected="selected">[% branchloo.branchname | html %]</option>
127 <option value="[% branchloo.branchcode | html %]">[% branchloo.branchname | html %]</option>
132 [% IF Koha.Preference('UseCashRegisters') %]
134 <label for="registerid">Cash register: </label>
135 <select name="registerid" id="registerid">
136 <option id="noregister" selected="selected" value="">-- All --</option>
137 [% PROCESS options_for_registers registers => Registers.all( selected => registerid ) %]
144 <fieldset class="rows">
145 <legend>Output</legend>
148 <label for="outputscreen">To screen into the browser: </label>
149 <input type="radio" checked="checked" name="output" id="outputscreen" value="screen" />
152 <label for="outputfile">To a file:</label>
153 <input type="radio" name="output" value="file" id="outputfile" />
154 <label class="inline" for="basename">Named: </label><input type="text" name="basename" id="basename" value="Export" />
160 <fieldset class="action">
161 <input type="submit" value="Submit" class="btn btn-default" name="do_it" />
167 <table id="tbl_cash_register_stats">
170 <th>Manager name</th>
171 <th>Patron card number</th>
173 <th>Transaction library</th>
174 <th>Transaction date</th>
176 <th>Transaction type</th>
179 <th>Bibliographic record title</th>
184 [% FOREACH loopresul IN loopresult %]
186 <td>[% loopresul.mfirstname | html %] [% loopresul.msurname | html %]</td>
187 <td><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% loopresul.borrowernumber | uri %]">[% loopresul.cardnumber | html %]</a></td>
188 <td>[% loopresul.bfirstname | html %] [% loopresul.bsurname | html %]</td>
189 <td>[% loopresul.branchname | html %]</td>
190 <td>[% loopresul.date | $KohaDates %]</td>
191 <td>[% loopresul.timestamp | $KohaDates with_hours = 1 %]</td>
192 <td>[% loopresul.type_description | html %]</td>
193 <td>[% loopresul.note | html %]</td>
194 <td style="text-align:right;">[% loopresul.amount | $Price %]</td>
195 <td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% loopresul.biblionumber | uri %]">[% loopresul.title | html %]</a></td>
196 <td>[% loopresul.barcode | html %]</td>
197 <td>[% ItemTypes.GetDescription(loopresul.itype) | html %]</td>
202 [% IF transaction_type == "ACT" %]
203 <th colspan="8" style="text-align:right;">TOTAL</th>
204 <th style="text-align:right;">[% total | $Price %]</th>
205 <th colspan="3"> </th>
211 [% END %] [%# do_it %]
214 </div> <!-- /.col-sm-10.col-sm-push-2 -->
216 <div class="col-sm-2 col-sm-pull-10">
218 [% INCLUDE 'reports-menu.inc' %]
220 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
221 </div> <!-- /.row -->
223 [% MACRO jsinclude BLOCK %]
224 [% Asset.js("js/register_selection.js") | $raw %]
225 [% INCLUDE 'datatables.inc' %]
227 $(document).ready(function() {
228 $("#tbl_cash_register_stats").dataTable($.extend(true, {}, dataTablesDefaults, {
230 "pagingType": "full_numbers"
234 [% INCLUDE 'calendar.inc' %]
238 $(document).ready(function() {
240 $('#frmCashRegister').submit(function() {
241 var isFormValid = true;
242 var alertString= _("Form not submitted because of the following problem(s)")+"\n";
244 alertString +="-------------------------------------------------------------------\n\n";
246 if ( !$('#from').val() || !$('#to').val()){
248 alertString += "\n- " + _("Dates cannot be empty");
260 [% INCLUDE 'intranet-bottom.inc' %]