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

(-)a/circ/returns.pl (-46 / +4 lines)
Lines 177-187 if ( $query->param('reserve_id') ) { Link Here
177
            itembiblionumber => $iteminfo->{'biblionumber'},
177
            itembiblionumber => $iteminfo->{'biblionumber'},
178
            iteminfo       => $iteminfo->{'author'},
178
            iteminfo       => $iteminfo->{'author'},
179
            name           => $name,
179
            name           => $name,
180
            borrowernumber => $borrowernumber,
180
            patron         => $patron,
181
            borcnum        => $patron->cardnumber,
182
            borfirstname   => $patron->firstname,
183
            borsurname     => $patron->surname,
184
            borcategory    => $patron->category->description,
185
            diffbranch     => 1,
181
            diffbranch     => 1,
186
        );
182
        );
187
    }
183
    }
Lines 300-306 if ($barcode) { Link Here
300
        ccode            => $biblio->{'ccode'},
296
        ccode            => $biblio->{'ccode'},
301
        itembiblionumber => $biblio->{'biblionumber'},
297
        itembiblionumber => $biblio->{'biblionumber'},
302
        biblionumber     => $biblio->{'biblionumber'},
298
        biblionumber     => $biblio->{'biblionumber'},
303
        borrower         => $borrower,
304
        additional_materials => $materials,
299
        additional_materials => $materials,
305
        issue            => $issue,
300
        issue            => $issue,
306
    );
301
    );
Lines 409-431 if ( $messages->{'WrongTransfer'} and not $messages->{'WasTransfered'}) { Link Here
409
        my $patron = Koha::Patrons->find( $reserve->{'borrowernumber'} );
404
        my $patron = Koha::Patrons->find( $reserve->{'borrowernumber'} );
410
        my $name = $patron->surname . ", " . $patron->title . " " . $patron->firstname;
405
        my $name = $patron->surname . ", " . $patron->title . " " . $patron->firstname;
411
        $template->param(
406
        $template->param(
412
            # FIXME The full patron object should be passed to the template
407
            wname  => $name,
413
                wname           => $name,
408
            patron => $patron,
414
                wborfirstname   => $patron->firstname,
415
                wborsurname     => $patron->surname,
416
                wborcategory    => $patron->category->description,
417
                wbortitle       => $patron->title,
418
                wborphone       => $patron->phone,
419
                wboremail       => $patron->email,
420
                streetnumber    => $patron->streetnumber,
421
                address         => $patron->address,
422
                address2        => $patron->address2,
423
                city            => $patron->city,
424
                zipcode         => $patron->zipcode,
425
                state           => $patron->state,
426
                country         => $patron->country,
427
                wborrowernumber => $reserve->{'borrowernumber'},
428
                wborcnum        => $patron->cardnumber,
429
        );
409
        );
430
    }
410
    }
431
    $template->param(
411
    $template->param(
Lines 459-480 if ( $messages->{'ResFound'}) { Link Here
459
            # FIXME The full patron object should be passed to the template
439
            # FIXME The full patron object should be passed to the template
460
            found          => 1,
440
            found          => 1,
461
            name           => $patron->surname . ", " . $patron->title . " " . $patron->firstname,
441
            name           => $patron->surname . ", " . $patron->title . " " . $patron->firstname,
462
            borfirstname   => $patron->firstname,
463
            borsurname     => $patron->surname,
464
            borcategory    => $patron->category->description,
465
            bortitle       => $patron->title,
466
            borphone       => $patron->phone,
467
            boremail       => $patron->email,
468
            boraddress     => $patron->address,
469
            boraddress2    => $patron->address2,
470
            streetnumber   => $patron->streetnumber,
471
            city           => $patron->city,
472
            zipcode        => $patron->zipcode,
473
            state          => $patron->state,
474
            country        => $patron->country,
475
            borcnum        => $patron->cardnumber,
476
            debarred       => $patron->debarred,
477
            gonenoaddress  => $patron->gonenoaddress,
478
            barcode        => $barcode,
442
            barcode        => $barcode,
479
            destbranch     => $reserve->{'branchcode'},
443
            destbranch     => $reserve->{'branchcode'},
480
            borrowernumber => $reserve->{'borrowernumber'},
444
            borrowernumber => $reserve->{'borrowernumber'},
Lines 581-593 foreach ( sort { $a <=> $b } keys %returneditems ) { Link Here
581
            } else {
545
            } else {
582
                $ri{return_overdue} = 1 if (DateTime->compare($duedate, $dropboxdate) == -1);
546
                $ri{return_overdue} = 1 if (DateTime->compare($duedate, $dropboxdate) == -1);
583
            }
547
            }
584
            $ri{borrowernumber} = $patron->borrowernumber;
548
            $ri{patron} = $patron,
585
            $ri{borcnum}        = $patron->cardnumber;
586
            $ri{borfirstname}   = $patron->firstname;
587
            $ri{borsurname}     = $patron->surname;
588
            $ri{bortitle}       = $patron->title;
589
            $ri{bornote}        = $patron->borrowernotes;
590
            $ri{borcategorycode}= $patron->categorycode;
591
            $ri{borissuescount} = Koha::Checkouts->count( { borrowernumber => $b->{'borrowernumber'} } );
549
            $ri{borissuescount} = Koha::Checkouts->count( { borrowernumber => $b->{'borrowernumber'} } );
592
        }
550
        }
593
        else {
551
        else {
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt (-37 / +36 lines)
Lines 55-61 $(document).ready(function () { Link Here
55
    $(".modal").on('hidden.bs.modal', function (e) { $("#barcode").focus(); });
55
    $(".modal").on('hidden.bs.modal', function (e) { $("#barcode").focus(); });
56
56
57
    [% IF print_slip %]
57
    [% IF print_slip %]
58
        Dopop('hold-transfer-slip.pl?borrowernumber=[% borrowernumber %]&amp;biblionumber=[% biblionumber %]');
58
        Dopop('hold-transfer-slip.pl?borrowernumber=[% patron.borrowernumber %]&amp;biblionumber=[% biblionumber %]');
59
    [% END %]
59
    [% END %]
60
60
61
    var columns_settings = [% ColumnsSettings.GetColumns( 'circ', 'returns', 'checkedintable', 'json' ) %]
61
    var columns_settings = [% ColumnsSettings.GetColumns( 'circ', 'returns', 'checkedintable', 'json' ) %]
Lines 222-229 $(document).ready(function () { Link Here
222
[% IF return_date_was_overriden && Borrowers.IsDebarred( borrower ) %]
222
[% IF return_date_was_overriden && Borrowers.IsDebarred( borrower ) %]
223
    <div id="restricted_backdated" class="dialog message">
223
    <div id="restricted_backdated" class="dialog message">
224
        <h3>
224
        <h3>
225
            <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrower.borrowernumber %]">
225
            <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% patron.borrowernumber %]">
226
                [% borrower.firstname %] [% borrower.surname %]
226
                [% patron.firstname %] [% patron.surname %]
227
            </a>
227
            </a>
228
            is restricted. Please verify this patron should still be restricted.
228
            is restricted. Please verify this patron should still be restricted.
229
        </h3>
229
        </h3>
Lines 245-257 $(document).ready(function () { Link Here
245
            <p><a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&amp;biblionumber=[% itembiblionumber %]">[% itembarcode |html %]: [% title |html %]</a></p>
245
            <p><a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&amp;biblionumber=[% itembiblionumber %]">[% itembarcode |html %]: [% title |html %]</a></p>
246
        <button type="submit" class="openWin" data-url="transfer-slip.pl?transferitem=[% itemnumber %]&amp;&amp;branchcode=[% TransferWaitingAt %]&amp;op=slip"><i class="fa fa-print"></i> Print transfer slip</button>
246
        <button type="submit" class="openWin" data-url="transfer-slip.pl?transferitem=[% itemnumber %]&amp;&amp;branchcode=[% TransferWaitingAt %]&amp;op=slip"><i class="fa fa-print"></i> Print transfer slip</button>
247
        <button class="deny" type="submit" onclick="window.location.href='/cgi-bin/koha/circ/returns.pl?itemnumber=[% itemnumber %]&amp;canceltransfer=1'"><i class="fa fa-times"></i> Cancel transfer</button>
247
        <button class="deny" type="submit" onclick="window.location.href='/cgi-bin/koha/circ/returns.pl?itemnumber=[% itemnumber %]&amp;canceltransfer=1'"><i class="fa fa-times"></i> Cancel transfer</button>
248
[% IF ( wborcnum ) %]<h5>Hold for:</h5>
248
[% IF ( patron.cardnumber ) %]<h5>Hold for:</h5>
249
        <ul>
249
        <ul>
250
            <li><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]">
250
            <li><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% patron.borrowernumber %]">
251
            [% borsurname %], [% borfirstname %]</a> ([% borcnum %]) <span class="patron-category"> - [% wborcategory %]</span> </li>
251
            [% patron.surname %], [% patron.firstname %]</a> ([% patron.cardnumber %]) <span class="patron-category"> - [% patron.category.description %]</span> </li>
252
            [% INCLUDE display_holdpatron_address %]
252
            [% INCLUDE display_holdpatron_address %]
253
            [% IF ( wborphone ) %]<li>[% wborphone %]</li>[% END %]
253
            [% IF ( patron.phone ) %]<li>[% patron.phone %]</li>[% END %]
254
            [% IF ( wboremail ) %]<li><a id="boremail" href="mailto:[% wboremail %]">[% wboremail %]</a></li>[% END %]
254
            [% IF ( patron.email ) %]<li><a id="boremail" href="mailto:[% patron.email %]">[% patron.email %]</a></li>[% END %]
255
        </ul>
255
        </ul>
256
256
257
    <form method="post" action="returns.pl" class="confirm">
257
    <form method="post" action="returns.pl" class="confirm">
Lines 260-266 $(document).ready(function () { Link Here
260
            <input type="hidden" name="WT-From" value="[% wtransfertFrom %]" />
260
            <input type="hidden" name="WT-From" value="[% wtransfertFrom %]" />
261
            <button type="submit" class="approve"><i class="fa fa-check"></i> Confirm</button>
261
            <button type="submit" class="approve"><i class="fa fa-check"></i> Confirm</button>
262
            <input type="hidden" name="print_slip" value="0" />
262
            <input type="hidden" name="print_slip" value="0" />
263
            <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
263
            <input type="hidden" name="borrowernumber" value="[% patron.borrowernumber %]" />
264
            <input type="hidden" name="biblionumber" value="[% biblionumber %]" />
264
            <input type="hidden" name="biblionumber" value="[% biblionumber %]" />
265
            <button type="submit" class="print" onclick="this.form.print_slip.value = 1; this.form.submit();"><i class="fa fa-print"></i> Print slip and confirm</button>
265
            <button type="submit" class="print" onclick="this.form.print_slip.value = 1; this.form.submit();"><i class="fa fa-print"></i> Print slip and confirm</button>
266
        <input type="hidden" name="return_date_override" value="[% return_date_override %]" />
266
        <input type="hidden" name="return_date_override" value="[% return_date_override %]" />
Lines 293-315 $(document).ready(function () { Link Here
293
                    <h4>Hold for:</h4>
293
                    <h4>Hold for:</h4>
294
                    <ul>
294
                    <ul>
295
                    <li>
295
                    <li>
296
                        <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]">[% borsurname %], [% borfirstname %]</a> ([% borcnum %])
296
                        <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% patron.borrowernumber %]">[% patron.surname %], [% patron.firstname %]</a> ([% patron.cardnumber %])
297
                        <span class="patron-category"> - [% borcategory %]</span>
297
                        <span class="patron-category"> - [% patron.category.description %]</span>
298
                    </li>
298
                    </li>
299
                    [% INCLUDE display_holdpatron_address %]
299
                    [% INCLUDE display_holdpatron_address %]
300
                    [% IF ( borphone ) %]
300
                    [% IF ( patron.phone ) %]
301
                        <li> [% borphone %]</li>
301
                        <li> [% patron.phone %]</li>
302
                    [% END %]
302
                    [% END %]
303
303
304
                    [% IF ( boremail ) %]
304
                    [% IF ( patron.email ) %]
305
                        <li><a id="boremail" href="mailto:[% boremail %]">[% boremail %]</a></li>
305
                        <li><a id="boremail" href="mailto:[% patron.email %]">[% patron.email %]</a></li>
306
                    [% END %]
306
                    [% END %]
307
307
308
                    [% IF ( debarred ) %]
308
                    [% IF ( patron.debarred ) %]
309
                        <li class="error">Patron is RESTRICTED</li>
309
                        <li class="error">Patron is RESTRICTED</li>
310
                    [% END %]
310
                    [% END %]
311
311
312
                    [% IF ( gonenoaddress ) %]
312
                    [% IF ( patron.gonenoaddress ) %]
313
                        <li class="error">Patron's address is in doubt</li>
313
                        <li class="error">Patron's address is in doubt</li>
314
                    [% END %]
314
                    [% END %]
315
                    </ul>
315
                    </ul>
Lines 327-333 $(document).ready(function () { Link Here
327
                    [% END %]
327
                    [% END %]
328
328
329
                    <input type="hidden" name="itemnumber" value="[% itemnumber %]" />
329
                    <input type="hidden" name="itemnumber" value="[% itemnumber %]" />
330
                    <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
330
                    <input type="hidden" name="borrowernumber" value="[% patron.borrowernumber %]" />
331
                    <input type="hidden" name="biblionumber" value="[% itembiblionumber %]" />
331
                    <input type="hidden" name="biblionumber" value="[% itembiblionumber %]" />
332
                    <input type="hidden" name="reserve_id" value="[% reserve_id %]" />
332
                    <input type="hidden" name="reserve_id" value="[% reserve_id %]" />
333
                    <input type="hidden" name="diffBranch" value="[% destbranch %]" />
333
                    <input type="hidden" name="diffBranch" value="[% destbranch %]" />
Lines 368-379 $(document).ready(function () { Link Here
368
                <p><a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&amp;biblionumber=[% itembiblionumber %]">[% itembarcode |html %]: [% title |html %]</a></p>
368
                <p><a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&amp;biblionumber=[% itembiblionumber %]">[% itembarcode |html %]: [% title |html %]</a></p>
369
                <h4>Hold for: </h4>
369
                <h4>Hold for: </h4>
370
                    <ul>
370
                    <ul>
371
                        <li><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]">[% borsurname %], [% borfirstname %]</a> ([% borcnum %]) <span class="patron-category"> - [% wborcategory %]</span> </li>
371
                        <li><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% patron.borrowernumber %]">[% patron.surname %], [% patron.firstname %]</a> ([% patron.cardnumber %]) <span class="patron-category"> - [% patron.category.description %]</span> </li>
372
                        [% INCLUDE display_holdpatron_address %]
372
                        [% INCLUDE display_holdpatron_address %]
373
                        [% IF ( borphone ) %]<li>[% borphone %]</li>[% END %]
373
                        [% IF ( patron.phone ) %]<li>[% patron.phone %]</li>[% END %]
374
                        [% IF ( boremail ) %]<li>[% IF ( transfertodo ) %][% boremail %][% ELSE %]<a id="boremail" href="mailto:[% boremail %]">[% boremail %]</a>[% END %]</li>[% END %]
374
                        [% IF ( patron.email ) %]<li>[% IF ( transfertodo ) %][% patron.email %][% ELSE %]<a id="boremail" href="mailto:[% patron.email %]">[% patron.email %]</a>[% END %]</li>[% END %]
375
[% IF ( debarred ) %]<li class="error">Patron is RESTRICTED</li>[% END %]
375
[% IF ( patron.debarred ) %]<li class="error">Patron is RESTRICTED</li>[% END %]
376
[% IF ( gonenoaddress ) %]<li class="error">Patron's address is in doubt</li>[% END %]
376
[% IF ( patron.gonenoaddress ) %]<li class="error">Patron's address is in doubt</li>[% END %]
377
                    </ul>
377
                    </ul>
378
        [% IF ( transfertodo ) %]
378
        [% IF ( transfertodo ) %]
379
            <h4><strong>Transfer to:</strong> [% Branches.GetName( destbranch ) %]</h4>
379
            <h4><strong>Transfer to:</strong> [% Branches.GetName( destbranch ) %]</h4>
Lines 384-390 $(document).ready(function () { Link Here
384
        <form method="post" action="returns.pl" class="confirm">
384
        <form method="post" action="returns.pl" class="confirm">
385
            <button type="submit" class="approve"><i class="fa fa-check"></i> Confirm</button>
385
            <button type="submit" class="approve"><i class="fa fa-check"></i> Confirm</button>
386
            <input type="hidden" name="print_slip" value="0" />
386
            <input type="hidden" name="print_slip" value="0" />
387
            <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
387
            <input type="hidden" name="borrowernumber" value="[% patron.borrowernumber %]" />
388
            <input type="hidden" name="biblionumber" value="[% itembiblionumber %]" />
388
            <input type="hidden" name="biblionumber" value="[% itembiblionumber %]" />
389
            <button type="submit" class="print" onclick="this.form.print_slip.value = 1; this.form.submit();"><i class="fa fa-print"></i> Print slip and continue</button>
389
            <button type="submit" class="print" onclick="this.form.print_slip.value = 1; this.form.submit();"><i class="fa fa-print"></i> Print slip and continue</button>
390
            [% FOREACH inputloo IN inputloop %]
390
            [% FOREACH inputloo IN inputloop %]
Lines 488-512 $(document).ready(function () { Link Here
488
                    [% END %]
488
                    [% END %]
489
                    <h5>Hold for:</h5>
489
                    <h5>Hold for:</h5>
490
                        <li>
490
                        <li>
491
                            <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]">
491
                            <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% patron.borrowernumber %]">
492
                                [% borsurname %], [% borfirstname %]
492
                                [% patron.surname %], [% patron.firstname %]
493
                            </a>
493
                            </a>
494
                            ([% borcnum %])
494
                            ([% patron.cardnumber %])
495
                            <span class="patron-category"> - [% borcategory %]</span>
495
                            <span class="patron-category"> - [% patron.category.description %]</span>
496
                        </li>
496
                        </li>
497
497
498
                        [% INCLUDE display_holdpatron_address %]
498
                        [% INCLUDE display_holdpatron_address %]
499
499
500
                        [% IF ( borphone ) %]
500
                        [% IF ( patron.phone ) %]
501
                            <li>[% borphone %]</li>
501
                            <li>[% patron.phone  %]</li>
502
                        [% END %]
502
                        [% END %]
503
503
504
                        [% IF ( boremail ) %]
504
                        [% IF ( patron.email ) %]
505
                            <li>
505
                            <li>
506
                                [% IF ( transfertodo ) %]
506
                                [% IF ( transfertodo ) %]
507
                                    [% boremail %]
507
                                    [% patron.email %]
508
                                [% ELSE %]
508
                                [% ELSE %]
509
                                    <a id="boremail" href="mailto:[% boremail %]">[% boremail %]</a>
509
                                    <a id="boremail" href="mailto:[% patron.email %]">[% patron.email %]</a>
510
                                [% END %]
510
                                [% END %]
511
                            </li>
511
                            </li>
512
                        [% END %]
512
                        [% END %]
Lines 515-525 $(document).ready(function () { Link Here
515
                            [% INCLUDE display_bormessagepref %]
515
                            [% INCLUDE display_bormessagepref %]
516
                        [% END %]
516
                        [% END %]
517
517
518
                        [% IF ( debarred ) %]
518
                        [% IF ( patron.debarred ) %]
519
                            <li class="error">Patron is RESTRICTED</li>
519
                            <li class="error">Patron is RESTRICTED</li>
520
                        [% END %]
520
                        [% END %]
521
521
522
                        [% IF ( gonenoaddress ) %]
522
                        [% IF ( patron.gonenoaddress ) %]
523
                            <li class="error">Patron's address is in doubt</li>
523
                            <li class="error">Patron's address is in doubt</li>
524
                        [% END %]
524
                        [% END %]
525
525
Lines 539-545 $(document).ready(function () { Link Here
539
                    [% END %]
539
                    [% END %]
540
540
541
                    <input type="hidden" name="itemnumber" value="[% itemnumber %]" />
541
                    <input type="hidden" name="itemnumber" value="[% itemnumber %]" />
542
                    <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
542
                    <input type="hidden" name="borrowernumber" value="[% patron.borrowernumber %]" />
543
                    <input type="hidden" name="biblionumber" value="[% itembiblionumber %]" />
543
                    <input type="hidden" name="biblionumber" value="[% itembiblionumber %]" />
544
                    <input type="hidden" name="reserve_id" value="[% reserve_id %]" />
544
                    <input type="hidden" name="reserve_id" value="[% reserve_id %]" />
545
                    <input type="hidden" name="diffBranch" value="[% destbranch %]" />
545
                    <input type="hidden" name="diffBranch" value="[% destbranch %]" />
546
- 

Return to bug 18789