View | Details | Raw Unified | Return to bug 6934
Collapse All | Expand All

(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/reports-menu.inc (-1 / +1 lines)
Lines 10-16 Link Here
10
		<li><a href="/cgi-bin/koha/reports/catalogue_stats.pl">Catalog</a></li>
10
		<li><a href="/cgi-bin/koha/reports/catalogue_stats.pl">Catalog</a></li>
11
		<li><a href="/cgi-bin/koha/reports/issues_stats.pl">Circulation</a></li>
11
		<li><a href="/cgi-bin/koha/reports/issues_stats.pl">Circulation</a></li>
12
        <li><a href="/cgi-bin/koha/reports/serials_stats.pl">Serials</a></li>
12
        <li><a href="/cgi-bin/koha/reports/serials_stats.pl">Serials</a></li>
13
        <li><a href="/cgi-bin/koha/reports/cash_register_stats.pl">Cash Register</a></li>
13
        <li><a href="/cgi-bin/koha/reports/cash_register_stats.pl">Cash register</a></li>
14
        <li><a href="/cgi-bin/koha/reports/reserves_stats.pl">Holds</a></li>        
14
        <li><a href="/cgi-bin/koha/reports/reserves_stats.pl">Holds</a></li>        
15
	</ul>
15
	</ul>
16
16
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/reports/cash_register_stats.tt (-6 / +18 lines)
Lines 8-14 Link Here
8
<script type="text/javascript" id="js">$(document).ready(function() {
8
<script type="text/javascript" id="js">$(document).ready(function() {
9
 $(document).ready(function() {
9
 $(document).ready(function() {
10
    $("#tbl_cash_register_stats").dataTable($.extend(true, {}, dataTablesDefaults, {
10
    $("#tbl_cash_register_stats").dataTable($.extend(true, {}, dataTablesDefaults, {
11
        "iDisplayLength": 50
11
        "iDisplayLength": 50,
12
        "sPaginationType": "full_numbers"
12
    }));
13
    }));
13
 });
14
 });
14
}); </script>
15
}); </script>
Lines 218-223 $(document).ready(function() { Link Here
218
                    <label for="outputfile">To a file:</label>
219
                    <label for="outputfile">To a file:</label>
219
                    <input type="radio" name="output" value="file" id="outputfile" />
220
                    <input type="radio" name="output" value="file" id="outputfile" />
220
                    <label class="inline" for="basename">Named: </label><input type="text" name="basename" id="basename" value="Export" />
221
                    <label class="inline" for="basename">Named: </label><input type="text" name="basename" id="basename" value="Export" />
222
                    <label class="inline" for="sep">Delimiter: </label>
223
                    <select name="sep" id="sep" size="1">
224
                        [% FOREACH value IN CGIsepChoice.values.sort() %]
225
                           [% IF ( value == CGIsepChoice.default ) %]
226
                               <option value="[% value %]" selected="selected">[% value %]</option>
227
                           [% ELSE %]
228
                              <option value="[% value %]">[% value %]</option>
229
                           [% END %]
230
                        [% END %]
231
                    </select>
232
221
                </li>
233
                </li>
222
            </ol>
234
            </ol>
223
        </fieldset>
235
        </fieldset>
Lines 233-247 $(document).ready(function() { Link Here
233
        <thead>
245
        <thead>
234
        <tr>
246
        <tr>
235
            <th>Manager name</th>
247
            <th>Manager name</th>
236
            <th>Borrower cardnumber</th>
248
            <th>Patron cardnumber</th>
237
            <th>Borrower name</th>
249
            <th>Patron name</th>
238
            <th>Branch</th>
250
            <th>Library</th>
239
            <th>Transaction date</th>
251
            <th>Transaction date</th>
240
            <th>Transaction type</th>
252
            <th>Transaction type</th>
241
            <th>Amount</th>
253
            <th>Amount</th>
242
            <th>Biblio title</th>
254
            <th>Biblio title</th>
243
            <th>Barcode</th>
255
            <th>Barcode</th>
244
            <th>Document type</th>
256
            <th>Item type</th>
245
        </tr>
257
        </tr>
246
        </thead>
258
        </thead>
247
        [% FOREACH loopresul IN loopresult %]
259
        [% FOREACH loopresul IN loopresult %]
Lines 261-267 $(document).ready(function() { Link Here
261
                    [% ELSIF loopresul.accounttype == "F" %]
273
                    [% ELSIF loopresul.accounttype == "F" %]
262
                        <span>Fine</span>
274
                        <span>Fine</span>
263
                    [% ELSIF loopresul.accounttype == "FU" %]
275
                    [% ELSIF loopresul.accounttype == "FU" %]
264
                        <span>Fine - long period</span>
276
                        <span>Accruing fine</span>
265
                    [% ELSIF loopresul.accounttype == "Pay" %]
277
                    [% ELSIF loopresul.accounttype == "Pay" %]
266
                        <span>Payment</span>
278
                        <span>Payment</span>
267
                    [% ELSIF loopresul.accounttype == "A" %]
279
                    [% ELSIF loopresul.accounttype == "A" %]
(-)a/reports/cash_register_stats.pl (-15 / +18 lines)
Lines 14-21 Link Here
14
# with Koha; if not, write to the Free Software Foundation, Inc.,
14
# with Koha; if not, write to the Free Software Foundation, Inc.,
15
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
15
# 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301 USA.
16
16
17
use strict;
17
use Modern::Perl;
18
use warnings;
19
use C4::Auth;
18
use C4::Auth;
20
use CGI;
19
use CGI;
21
use C4::Context;
20
use C4::Context;
Lines 23-29 use C4::Reports; Link Here
23
use C4::Output;
22
use C4::Output;
24
use C4::Koha;
23
use C4::Koha;
25
use C4::Circulation;
24
use C4::Circulation;
26
use C4::Dates qw/format_date format_date_in_iso/;
25
use DateTime;
26
use Koha::DateUtils qw/output_pref dt_from_string/;
27
use C4::Budgets qw/GetCurrency GetCurrencies/;
27
use C4::Budgets qw/GetCurrency GetCurrencies/;
28
#use Data::Dumper;
28
#use Data::Dumper;
29
#use Smart::Comments;
29
#use Smart::Comments;
Lines 46-63 my $output = $input->param("output"); Link Here
46
my $basename         = $input->param("basename");
46
my $basename         = $input->param("basename");
47
my $transaction_type = $input->param("transaction_type") || 'ACT';
47
my $transaction_type = $input->param("transaction_type") || 'ACT';
48
my $branchcode       = $input->param("branch") || C4::Context->userenv->{'branch'};
48
my $branchcode       = $input->param("branch") || C4::Context->userenv->{'branch'};
49
our $sep = ",";
49
our $sep = $input->param("sep") // ',';
50
$sep = "\t" if ($sep eq 'tabulation');
50
51
51
$template->param(
52
$template->param(
52
    do_it => $do_it,
53
    do_it => $do_it,
53
    DHTMLcalendar_dateformat => C4::Dates->DHTMLcalendar(),
54
    #DHTMLcalendar_dateformat => C4::Dates->DHTMLcalendar(),
55
    CGIsepChoice => GetDelimiterChoices,
54
);
56
);
55
57
56
#Initialize date pickers to today
58
#Initialize date pickers to today
57
my $today = C4::Dates->today('iso');
59
my $now = DateTime->today;
58
my $fromDate = $today;
60
my $today = $now->strftime('%d/%m/%Y');
59
my $toDate   = $today;
61
my $fromDate = dt_from_string($today, 'metric');
60
62
my $toDate   = dt_from_string($today, 'metric');
61
### fromdate today: $fromDate
63
### fromdate today: $fromDate
62
64
63
my $query_manualinv = "SELECT id, authorised_value FROM authorised_values WHERE category = 'MANUAL_INV'";
65
my $query_manualinv = "SELECT id, authorised_value FROM authorised_values WHERE category = 'MANUAL_INV'";
Lines 69-76 my $manualinv_types = $sth_manualinv->fetchall_arrayref({}); Link Here
69
71
70
if ($do_it) {
72
if ($do_it) {
71
73
72
    $fromDate = format_date_in_iso($input->param("filter_date_begin"));
74
    $fromDate = dt_from_string($input->param("filter_date_begin"), 'metric');
73
    $toDate   = format_date_in_iso($input->param("filter_date_end"));
75
    $toDate   = dt_from_string($input->param("filter_date_end"), 'metric');
74
76
75
    my $whereTType = '';
77
    my $whereTType = '';
76
78
Lines 119-125 if ($do_it) { Link Here
119
        $row->{amountoutstanding} = 0 if (!$row->{amountoutstanding});
121
        $row->{amountoutstanding} = 0 if (!$row->{amountoutstanding});
120
        #if ((abs($row->{amount}) - $row->{amountoutstanding}) > 0) {
122
        #if ((abs($row->{amount}) - $row->{amountoutstanding}) > 0) {
121
            $row->{amount} = sprintf("%.2f", abs ($row->{amount}));
123
            $row->{amount} = sprintf("%.2f", abs ($row->{amount}));
122
            $row->{date} = format_date($row->{date});
124
            $row->{date} = output_pref({ dt => dt_from_string($row->{date}, 'sql'), date_format => 'metric', dateonly => 1 });
123
            ### date : $row->{date}
125
            ### date : $row->{date}
124
126
125
            push (@loopresult, $row);
127
            push (@loopresult, $row);
Lines 178-189 if ($do_it) { Link Here
178
### fromdate final: $fromDate
180
### fromdate final: $fromDate
179
### toDate final: $toDate
181
### toDate final: $toDate
180
$template->param(
182
$template->param(
181
    beginDate        => format_date($fromDate),
183
    beginDate        => output_pref({dt => $fromDate, date_format => 'metric', dateonly => 1}),
182
    endDate          => format_date($toDate),
184
    endDate          => output_pref({dt => $toDate, date_format => 'metric', dateonly => 1}),
183
    transaction_type => $transaction_type,
185
    transaction_type => $transaction_type,
184
    branchloop       => C4::Branch::GetBranchesLoop($branchcode),
186
    branchloop       => C4::Branch::GetBranchesLoop($branchcode),
185
    manualinv_types  => $manualinv_types,
187
    manualinv_types  => $manualinv_types,
188
    CGIsepChoice => GetDelimiterChoices,
186
);
189
);
190
187
output_html_with_http_headers $input, $cookie, $template->output;
191
output_html_with_http_headers $input, $cookie, $template->output;
188
192
189
1;
193
1;
190
- 

Return to bug 6934