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

(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/checkouts-table-footer.inc (-2 / +3 lines)
Lines 1-8 Link Here
1
<tfoot>
1
<tfoot>
2
	<tr>
2
	<tr>
3
        <td colspan="9" style="text-align: right; font-weight:bold;">Totals:</td>
3
        <td colspan="9" style="text-align: right; font-weight:bold;">Totals:</td>
4
		<td>[% totaldue %]</td>
4
        <td>[% totaldue %]</td>
5
		<td>[% totalprice %]</td>
5
        <td>[% finetotal %]</td>
6
        <td>[% totalprice %]</td>
6
                <td colspan="3"><div class="date-select">
7
                <td colspan="3"><div class="date-select">
7
            <p><label for="newduedate">Renewal due date:</label> <input type="text" size="12" id="newduedate" name="newduedate" value="[% newduedate %]" readonly="readonly" />
8
            <p><label for="newduedate">Renewal due date:</label> <input type="text" size="12" id="newduedate" name="newduedate" value="[% newduedate %]" readonly="readonly" />
8
</p>
9
</p>
(-)a/koha-tmpl/intranet-tmpl/prog/en/includes/checkouts-table.inc (+1 lines)
Lines 19-24 Link Here
19
                        <th scope="col">Checked out from</th>
19
                        <th scope="col">Checked out from</th>
20
                        <th scope="col">Call no</th>
20
                        <th scope="col">Call no</th>
21
                        <th scope="col">Charge</th>
21
                        <th scope="col">Charge</th>
22
                        <th scope="col">Fine</th>
22
                        <th scope="col">Price</th>
23
                        <th scope="col">Price</th>
23
                        <th scope="col">Renew <p class="column-tool"><a href="#" id="CheckAllRenewals">select all</a> | <a href="#" id="UncheckAllRenewals">none</a></p></th>
24
                        <th scope="col">Renew <p class="column-tool"><a href="#" id="CheckAllRenewals">select all</a> | <a href="#" id="UncheckAllRenewals">none</a></p></th>
24
                        <th scope="col">Check in <p class="column-tool"><a href="#" id="CheckAllCheckins">select all</a> | <a href="#" id="UncheckAllCheckins">none</a></p></th>
25
                        <th scope="col">Check in <p class="column-tool"><a href="#" id="CheckAllCheckins">select all</a> | <a href="#" id="UncheckAllCheckins">none</a></p></th>
(-)a/koha-tmpl/intranet-tmpl/prog/en/js/checkouts.js (-1 / +16 lines)
Lines 273-278 $(document).ready(function() { Link Here
273
                },
273
                },
274
                {
274
                {
275
                    "mDataProp": function ( oObj ) {
275
                    "mDataProp": function ( oObj ) {
276
                        if ( ! oObj.fine ) oObj.fine = 0;
277
                        return parseFloat(oObj.fine).toFixed(2);
278
                    }
279
                },
280
                {
281
                    "mDataProp": function ( oObj ) {
276
                        if ( ! oObj.price ) oObj.price = 0;
282
                        if ( ! oObj.price ) oObj.price = 0;
277
                        return parseFloat(oObj.price).toFixed(2);
283
                        return parseFloat(oObj.price).toFixed(2);
278
                    }
284
                    }
Lines 376-389 $(document).ready(function() { Link Here
376
            ],
382
            ],
377
            "fnFooterCallback": function ( nRow, aaData, iStart, iEnd, aiDisplay ) {
383
            "fnFooterCallback": function ( nRow, aaData, iStart, iEnd, aiDisplay ) {
378
                var total_charge = 0;
384
                var total_charge = 0;
385
                var total_fine  = 0;
379
                var total_price = 0;
386
                var total_price = 0;
380
                for ( var i=0; i < aaData.length; i++ ) {
387
                for ( var i=0; i < aaData.length; i++ ) {
381
                    total_charge += aaData[i]['charge'] * 1;
388
                    total_charge += aaData[i]['charge'] * 1;
389
                    total_fine += aaData[i]['fine'] * 1;
382
                    total_price  += aaData[i]['price'] * 1;
390
                    total_price  += aaData[i]['price'] * 1;
383
                }
391
                }
384
                var nCells = nRow.getElementsByTagName('td');
392
                var nCells = nRow.getElementsByTagName('td');
385
                nCells[1].innerHTML = total_charge.toFixed(2);
393
                nCells[1].innerHTML = total_charge.toFixed(2);
386
                nCells[2].innerHTML = total_price.toFixed(2);
394
                nCells[2].innerHTML = total_fine.toFixed(2);
395
                nCells[3].innerHTML = total_price.toFixed(2);
387
            },
396
            },
388
            "bPaginate": false,
397
            "bPaginate": false,
389
            "bProcessing": true,
398
            "bProcessing": true,
Lines 508-513 $(document).ready(function() { Link Here
508
                    },
517
                    },
509
                    {
518
                    {
510
                        "mDataProp": function ( oObj ) {
519
                        "mDataProp": function ( oObj ) {
520
                            if ( ! oObj.fine ) oObj.fine = 0;
521
                            return parseFloat(oObj.fine).toFixed(2);
522
                        }
523
                    },
524
                    {
525
                        "mDataProp": function ( oObj ) {
511
                            if ( ! oObj.price ) oObj.price = 0;
526
                            if ( ! oObj.price ) oObj.price = 0;
512
                            return parseFloat(oObj.price).toFixed(2);
527
                            return parseFloat(oObj.price).toFixed(2);
513
                        }
528
                        }
(-)a/svc/checkouts (-1 / +3 lines)
Lines 27-32 use C4::Auth qw(check_cookie_auth); Link Here
27
use C4::Biblio qw(GetMarcBiblio GetFrameworkCode GetRecordValue );
27
use C4::Biblio qw(GetMarcBiblio GetFrameworkCode GetRecordValue );
28
use C4::Circulation qw(GetIssuingCharges CanBookBeRenewed GetRenewCount GetSoonestRenewDate);
28
use C4::Circulation qw(GetIssuingCharges CanBookBeRenewed GetRenewCount GetSoonestRenewDate);
29
use C4::Koha qw(GetAuthorisedValueByCode);
29
use C4::Koha qw(GetAuthorisedValueByCode);
30
use C4::Overdues qw(GetFine);
30
use C4::Context;
31
use C4::Context;
31
32
32
use Koha::DateUtils;
33
use Koha::DateUtils;
Lines 126-131 my @checkouts_today; Link Here
126
my @checkouts_previous;
127
my @checkouts_previous;
127
while ( my $c = $sth->fetchrow_hashref() ) {
128
while ( my $c = $sth->fetchrow_hashref() ) {
128
    my ($charge) = GetIssuingCharges( $c->{itemnumber}, $c->{borrowernumber} );
129
    my ($charge) = GetIssuingCharges( $c->{itemnumber}, $c->{borrowernumber} );
130
    my $fine = GetFine( $c->{itemnumber}, $c->{borrowernumber} );
129
131
130
    my ( $can_renew, $can_renew_error ) =
132
    my ( $can_renew, $can_renew_error ) =
131
      CanBookBeRenewed( $c->{borrowernumber}, $c->{itemnumber} );
133
      CanBookBeRenewed( $c->{borrowernumber}, $c->{itemnumber} );
Lines 154-159 while ( my $c = $sth->fetchrow_hashref() ) { Link Here
154
        branchname => $c->{branchname},
156
        branchname => $c->{branchname},
155
        itemcallnumber => $c->{itemcallnumber}   || q{},
157
        itemcallnumber => $c->{itemcallnumber}   || q{},
156
        charge         => $charge,
158
        charge         => $charge,
159
        fine           => $fine,
157
        price          => $c->{replacementprice} || q{},
160
        price          => $c->{replacementprice} || q{},
158
        can_renew      => $can_renew,
161
        can_renew      => $can_renew,
159
        can_renew_error     => $can_renew_error,
162
        can_renew_error     => $can_renew_error,
160
- 

Return to bug 9481