7 [% PROCESS 'accounts.inc' %]
8 [% INCLUDE 'doc-head-open.inc' %]
9 <title>Koha › Reports [% IF ( do_it ) %]› Cash register statistics › Results[% ELSE %]› Cash register statistics[% END %]</title>
10 [% INCLUDE 'doc-head-close.inc' %]
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 == "PAY" %]
83 <option value="PAY" selected="selected">Payment</option>
85 <option value="PAY">Payment</option>
88 [% FOREACH debit_type IN debit_types %]
89 [% IF transaction_type == debit_type.code %]
90 <option value="[% debit_type.code | html %]" selected="selected">[% debit_type.description | html %]</option>
92 <option value="[% debit_type.code | html %]">[% debit_type.description | html %]</option>
98 <label>Transaction library</label>
99 <select name="branch" id="branch">
100 <option value="ALL">All</option>
101 [% FOREACH branchloo IN branchloop %]
102 [% IF ( branchloo.selected ) %]
103 <option value="[% branchloo.branchcode | html %]" selected="selected">[% branchloo.branchname | html %]</option>
105 <option value="[% branchloo.branchcode | html %]">[% branchloo.branchname | html %]</option>
115 <fieldset class="rows">
116 <legend>Output</legend>
119 <label for="outputscreen">To screen into the browser: </label>
120 <input type="radio" checked="checked" name="output" id="outputscreen" value="screen" />
123 <label for="outputfile">To a file:</label>
124 <input type="radio" name="output" value="file" id="outputfile" />
125 <label class="inline" for="basename">Named: </label><input type="text" name="basename" id="basename" value="Export" />
131 <fieldset class="action">
132 <input type="submit" value="Submit" name="do_it" />
138 <table id="tbl_cash_register_stats">
141 <th>Manager name</th>
142 <th>Patron card number</th>
144 <th>Transaction library</th>
145 <th>Transaction date</th>
146 <th>Transaction type</th>
149 <th>Bibliographic record title</th>
154 [% FOREACH loopresul IN loopresult %]
156 <td>[% loopresul.mfirstname | html %] [% loopresul.msurname | html %]</td>
157 <td><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% loopresul.borrowernumber | uri %]">[% loopresul.cardnumber | html %]</a></td>
158 <td>[% loopresul.bfirstname | html %] [% loopresul.bsurname | html %]</td>
159 <td>[% loopresul.branchname | html %]</td>
160 <td>[% loopresul.date | $KohaDates %]</td>
162 [% IF loopresul.credit_type == "ACT" %]
163 <span>All payments to the library</span>
165 [%- PROCESS account_type_description account=loopresul -%]
168 <td>[% loopresul.note | html %]</td>
169 <td style="text-align:right;">[% loopresul.amount | $Price %]</td>
170 <td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% loopresul.biblionumber | uri %]">[% loopresul.title | html %]</a></td>
171 <td>[% loopresul.barcode | html %]</td>
172 <td>[% ItemTypes.GetDescription(loopresul.itype) | html %]</td>
177 [% IF transaction_type == "ACT" %]
178 <th colspan="7" style="text-align:right;">TOTAL</th>
179 <th style="text-align:right;">[% total | $Price %]</th>
180 <th colspan="3"> </th>
186 [% END %] [%# do_it %]
189 </div> <!-- /.col-sm-10.col-sm-push-2 -->
191 <div class="col-sm-2 col-sm-pull-10">
193 [% INCLUDE 'reports-menu.inc' %]
195 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
196 </div> <!-- /.row -->
198 [% MACRO jsinclude BLOCK %]
199 [% INCLUDE 'datatables.inc' %]
201 $(document).ready(function() {
202 $("#tbl_cash_register_stats").dataTable($.extend(true, {}, dataTablesDefaults, {
203 "iDisplayLength": 50,
204 "sPaginationType": "full_numbers"
208 [% INCLUDE 'calendar.inc' %]
212 $(document).ready(function() {
213 // http://jqueryui.com/demos/datepicker/#date-range
214 var dates = $( "#filter_date_begin, #filter_date_end" ).datepicker({
217 onSelect: function( selectedDate ) {
218 var option = this.id == "filter_date_begin" ? "minDate" : "maxDate",
219 instance = $( this ).data( "datepicker" );
220 date = $.datepicker.parseDate(
221 instance.settings.dateFormat ||
222 $.datepicker._defaults.dateFormat,
223 selectedDate, instance.settings );
224 dates.not( this ).datepicker( "option", option, date );
228 $('#frmCashRegister').submit(function() {
229 var isFormValid = true;
230 var alertString= _("Form not submitted because of the following problem(s)")+"\n";
232 alertString +="-------------------------------------------------------------------\n\n";
234 if ( !$('#from').val() || !$('#to').val()){
236 alertString += "\n- " + _("Dates cannot be empty");
248 [% INCLUDE 'intranet-bottom.inc' %]