+[% USE KohaDates %]
[% INCLUDE 'doc-head-open.inc' %]
-<title>Koha › Reports [% IF ( do_it ) %]› Cash Register Statistics › Results[% ELSE %]› Cash Register Statistics[% END %]</title>
+<title>Koha › Reports [% IF ( do_it ) %]› Cash register statistics › Results[% ELSE %]› Cash register statistics[% END %]</title>
[% INCLUDE 'doc-head-close.inc' %]
<link rel="stylesheet" type="text/css" href="[% themelang %]/css/datatables.css" />
[% INCLUDE 'datatables.inc' %]
[% INCLUDE 'datatables-strings.inc' %]
<script type="text/javascript" src="[% themelang %]/js/datatables.js"></script>
-<script type="text/javascript" id="js">$(document).ready(function() {
+<script type="text/javascript" id="js">
$(document).ready(function() {
$("#tbl_cash_register_stats").dataTable($.extend(true, {}, dataTablesDefaults, {
- "iDisplayLength": 50
+ "iDisplayLength": 50,
+ "sPaginationType": "full_numbers"
}));
});
-}); </script>
+</script>
[% INCLUDE 'calendar.inc' %]
<script type="text/javascript">
//<![CDATA[
}
$(document).ready(function() {
-
// http://jqueryui.com/demos/datepicker/#date-range
var dates = $( "#filter_date_begin, #filter_date_end" ).datepicker({
changeMonth: true,
alert(alertString);
return false;
}
-
- $(this).submit();
});
});
<a href="/cgi-bin/koha/mainpage.pl">Home</a> › <a href="/cgi-bin/koha/reports/reports-home.pl">Reports</a>
›
[% IF ( do_it ) %]
- <a href="/cgi-bin/koha/reports/cash_register_stats.pl">Cash Register Statistics</a> › Results
+ <a href="/cgi-bin/koha/reports/cash_register_stats.pl">Cash register statistics</a> › Results
[% ELSE %]
- Cash Register Statistics
+ Cash register statistics
[% END %]
</div>
<h1>Cash register statistics</h1>
<form method="post" action="/cgi-bin/koha/reports/cash_register_stats.pl" id="frmCashRegister">
<fieldset class="rows">
- <legend>Cash Register statistics [% beginDate %] to [% endDate %]</legend>
+ <legend>Cash register statistics [% beginDate | $KohaDates %] to [% endDate | $KohaDates %]</legend>
<table>
<thead>
<tr>
<tr>
<td>
<label for="filter_date_begin">From</label>
- <input type="text" size="10" id="filter_date_begin" name="filter_date_begin" value="[% beginDate %]" />
+ <input type="text" size="10" id="filter_date_begin" name="filter_date_begin" value="[% beginDate | $KohaDates %]" />
<label for="filter_date_end">To</label>
- <input type="text" size="10" id="filter_date_end" name="filter_date_end" value="[% endDate %]" />
+ <input type="text" size="10" id="filter_date_end" name="filter_date_end" value="[% endDate | $KohaDates %]" />
</td>
</tr>
</tbody>
[% END %]
[% IF transaction_type == "FU" %]
- <option value="FU" selected="selected">Fine - long period</option>
+ <option value="FU" selected="selected">Accruing fine</option>
[% ELSE %]
- <option value="FU">Fine - long period</option>
+ <option value="FU">Accruing fine</option>
[% END %]
[% IF transaction_type == "PAY" %]
[% END %]
[% IF transaction_type == "A" %]
- <option value="A" selected="selected">Account Management Fee</option>
+ <option value="A" selected="selected">Account management fee</option>
[% ELSE %]
<option value="A">Account Management Fee</option>
[% END %]
<label for="outputfile">To a file:</label>
<input type="radio" name="output" value="file" id="outputfile" />
<label class="inline" for="basename">Named: </label><input type="text" name="basename" id="basename" value="Export" />
+ <label class="inline" for="sep">Delimiter: </label>
+ <select name="sep" id="sep" size="1">
+ [% FOREACH value IN CGIsepChoice.values.sort() %]
+ [% IF ( value == CGIsepChoice.default ) %]
+ <option value="[% value %]" selected="selected">[% value %]</option>
+ [% ELSE %]
+ <option value="[% value %]">[% value %]</option>
+ [% END %]
+ [% END %]
+ </select>
+
</li>
</ol>
</fieldset>
<thead>
<tr>
<th>Manager name</th>
- <th>Borrower cardnumber</th>
- <th>Borrower name</th>
- <th>Branch</th>
+ <th>Patron cardnumber</th>
+ <th>Patron name</th>
+ <th>Library</th>
<th>Transaction date</th>
<th>Transaction type</th>
<th>Amount</th>
<th>Biblio title</th>
<th>Barcode</th>
- <th>Document type</th>
+ <th>Item type</th>
</tr>
</thead>
[% FOREACH loopresul IN loopresult %]
<td><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% loopresul.borrowernumber %]">[% loopresul.cardnumber %]</a></td>
<td>[% loopresul.bfirstname %] [% loopresul.bsurname %]</td>
<td>[% loopresul.branchname %]</td>
- <td>[% loopresul.date %]</td>
+ <td>[% loopresul.date | $KohaDates %]</td>
<td>
[% IF loopresul.accounttype == "ACT" %]
<span>Active transactions</span>
[% ELSIF loopresul.accounttype == "F" %]
<span>Fine</span>
[% ELSIF loopresul.accounttype == "FU" %]
- <span>Fine - long period</span>
+ <span>Accruing fine</span>
[% ELSIF loopresul.accounttype == "Pay" %]
<span>Payment</span>
[% ELSIF loopresul.accounttype == "A" %]
# with Koha; if not, write to the Free Software Foundation, Inc.,
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
-use strict;
-use warnings;
+use Modern::Perl;
use C4::Auth;
use CGI;
use C4::Context;
use C4::Output;
use C4::Koha;
use C4::Circulation;
-use C4::Dates qw/format_date format_date_in_iso/;
+use DateTime;
+use Koha::DateUtils;
use C4::Budgets qw/GetCurrency GetCurrencies/;
#use Data::Dumper;
#use Smart::Comments;
my $basename = $input->param("basename");
my $transaction_type = $input->param("transaction_type") || 'ACT';
my $branchcode = $input->param("branch") || C4::Context->userenv->{'branch'};
-our $sep = ",";
+our $sep = $input->param("sep") // ',';
+$sep = "\t" if ($sep eq 'tabulation');
$template->param(
do_it => $do_it,
- DHTMLcalendar_dateformat => C4::Dates->DHTMLcalendar(),
+ CGIsepChoice => GetDelimiterChoices,
);
#Initialize date pickers to today
-my $today = C4::Dates->today('iso');
-my $fromDate = $today;
-my $toDate = $today;
-
+my $fromDate = dt_from_string;
+my $toDate = dt_from_string;
### fromdate today: $fromDate
my $query_manualinv = "SELECT id, authorised_value FROM authorised_values WHERE category = 'MANUAL_INV'";
if ($do_it) {
- $fromDate = format_date_in_iso($input->param("filter_date_begin"));
- $toDate = format_date_in_iso($input->param("filter_date_end"));
+ $fromDate = output_pref({ dt => eval { dt_from_string($input->param("filter_date_begin")) } || dt_from_string,
+ dateformat => 'sql', dateonly => 1 }); #for sql query
+ $toDate = output_pref({ dt => eval { dt_from_string($input->param("filter_date_end")) } || dt_from_string,
+ dateformat => 'sql', dateonly => 1 }); #for sql query
my $whereTType = '';
$row->{amountoutstanding} = 0 if (!$row->{amountoutstanding});
#if ((abs($row->{amount}) - $row->{amountoutstanding}) > 0) {
$row->{amount} = sprintf("%.2f", abs ($row->{amount}));
- $row->{date} = format_date($row->{date});
+ $row->{date} = dt_from_string($row->{date}, 'sql');
### date : $row->{date}
push (@loopresult, $row);
### fromdate final: $fromDate
### toDate final: $toDate
$template->param(
- beginDate => format_date($fromDate),
- endDate => format_date($toDate),
+ beginDate => dt_from_string($fromDate),
+ endDate => dt_from_string($toDate),
transaction_type => $transaction_type,
branchloop => C4::Branch::GetBranchesLoop($branchcode),
manualinv_types => $manualinv_types,
+ CGIsepChoice => GetDelimiterChoices,
);
+
output_html_with_http_headers $input, $cookie, $template->output;
1;