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 == "FORW" %]
65 <option value="FORW" selected="selected">Write off</option>
67 <option value="FORW">Write off</option>
70 [% FOREACH debit_type IN debit_types %]
71 [% IF transaction_type == debit_type.code %]
72 <option value="[% debit_type.code | html %]" selected="selected">[% debit_type.description | html %]</option>
74 <option value="[% debit_type.code | html %]">[% debit_type.description | html %]</option>
78 [% FOREACH credit_type IN credit_types %]
79 [% IF transaction_type == credit_type.code %]
80 <option value="[% credit_type.code | html %]" selected="selected">[% credit_type.description | html %]</option>
82 <option value="[% credit_type.code | html %]">[% credit_type.description | html %]</option>
88 <label>Transaction library</label>
89 <select name="branch" id="branch">
90 <option value="ALL">All</option>
91 [% FOREACH branchloo IN branchloop %]
92 [% IF ( branchloo.selected ) %]
93 <option value="[% branchloo.branchcode | html %]" selected="selected">[% branchloo.branchname | html %]</option>
95 <option value="[% branchloo.branchcode | html %]">[% branchloo.branchname | html %]</option>
105 <fieldset class="rows">
106 <legend>Output</legend>
109 <label for="outputscreen">To screen into the browser: </label>
110 <input type="radio" checked="checked" name="output" id="outputscreen" value="screen" />
113 <label for="outputfile">To a file:</label>
114 <input type="radio" name="output" value="file" id="outputfile" />
115 <label class="inline" for="basename">Named: </label><input type="text" name="basename" id="basename" value="Export" />
121 <fieldset class="action">
122 <input type="submit" value="Submit" name="do_it" />
128 <table id="tbl_cash_register_stats">
131 <th>Manager name</th>
132 <th>Patron card number</th>
134 <th>Transaction library</th>
135 <th>Transaction date</th>
136 <th>Transaction type</th>
139 <th>Bibliographic record title</th>
144 [% FOREACH loopresul IN loopresult %]
146 <td>[% loopresul.mfirstname | html %] [% loopresul.msurname | html %]</td>
147 <td><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% loopresul.borrowernumber | uri %]">[% loopresul.cardnumber | html %]</a></td>
148 <td>[% loopresul.bfirstname | html %] [% loopresul.bsurname | html %]</td>
149 <td>[% loopresul.branchname | html %]</td>
150 <td>[% loopresul.date | $KohaDates %]</td>
152 [% IF loopresul.credit_type == "ACT" %]
153 <span>All payments to the library</span>
155 [%- PROCESS account_type_description account=loopresul -%]
158 <td>[% loopresul.note | html %]</td>
159 <td style="text-align:right;">[% loopresul.amount | $Price %]</td>
160 <td><a href="/cgi-bin/koha/catalogue/detail.pl?biblionumber=[% loopresul.biblionumber | uri %]">[% loopresul.title | html %]</a></td>
161 <td>[% loopresul.barcode | html %]</td>
162 <td>[% ItemTypes.GetDescription(loopresul.itype) | html %]</td>
167 [% IF transaction_type == "ACT" %]
168 <th colspan="7" style="text-align:right;">TOTAL</th>
169 <th style="text-align:right;">[% total | $Price %]</th>
170 <th colspan="3"> </th>
176 [% END %] [%# do_it %]
179 </div> <!-- /.col-sm-10.col-sm-push-2 -->
181 <div class="col-sm-2 col-sm-pull-10">
183 [% INCLUDE 'reports-menu.inc' %]
185 </div> <!-- /.col-sm-2.col-sm-pull-10 -->
186 </div> <!-- /.row -->
188 [% MACRO jsinclude BLOCK %]
189 [% INCLUDE 'datatables.inc' %]
191 $(document).ready(function() {
192 $("#tbl_cash_register_stats").dataTable($.extend(true, {}, dataTablesDefaults, {
193 "iDisplayLength": 50,
194 "sPaginationType": "full_numbers"
198 [% INCLUDE 'calendar.inc' %]
202 $(document).ready(function() {
203 // http://jqueryui.com/demos/datepicker/#date-range
204 var dates = $( "#filter_date_begin, #filter_date_end" ).datepicker({
207 onSelect: function( selectedDate ) {
208 var option = this.id == "filter_date_begin" ? "minDate" : "maxDate",
209 instance = $( this ).data( "datepicker" );
210 date = $.datepicker.parseDate(
211 instance.settings.dateFormat ||
212 $.datepicker._defaults.dateFormat,
213 selectedDate, instance.settings );
214 dates.not( this ).datepicker( "option", option, date );
218 $('#frmCashRegister').submit(function() {
219 var isFormValid = true;
220 var alertString= _("Form not submitted because of the following problem(s)")+"\n";
222 alertString +="-------------------------------------------------------------------\n\n";
224 if ( !$('#from').val() || !$('#to').val()){
226 alertString += "\n- " + _("Dates cannot be empty");
238 [% INCLUDE 'intranet-bottom.inc' %]