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 => $biblio->biblionumber,
177
            itembiblionumber => $biblio->biblionumber,
178
            iteminfo       => $biblio->author,
178
            iteminfo       => $biblio->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 293-299 if ($barcode) { Link Here
293
            ccode            => $item->ccode,
289
            ccode            => $item->ccode,
294
            itembiblionumber => $biblio->biblionumber,
290
            itembiblionumber => $biblio->biblionumber,
295
            biblionumber     => $biblio->biblionumber,
291
            biblionumber     => $biblio->biblionumber,
296
            borrower         => $borrower,
297
            additional_materials => $materials,
292
            additional_materials => $materials,
298
            issue            => $checkout,
293
            issue            => $checkout,
299
        );
294
        );
Lines 404-426 if ( $messages->{'WrongTransfer'} and not $messages->{'WasTransfered'}) { Link Here
404
        my $patron = Koha::Patrons->find( $reserve->{'borrowernumber'} );
399
        my $patron = Koha::Patrons->find( $reserve->{'borrowernumber'} );
405
        my $name = $patron->surname . ", " . $patron->title . " " . $patron->firstname;
400
        my $name = $patron->surname . ", " . $patron->title . " " . $patron->firstname;
406
        $template->param(
401
        $template->param(
407
            # FIXME The full patron object should be passed to the template
402
            wname  => $name,
408
                wname           => $name,
403
            patron => $patron,
409
                wborfirstname   => $patron->firstname,
410
                wborsurname     => $patron->surname,
411
                wborcategory    => $patron->category->description,
412
                wbortitle       => $patron->title,
413
                wborphone       => $patron->phone,
414
                wboremail       => $patron->email,
415
                streetnumber    => $patron->streetnumber,
416
                address         => $patron->address,
417
                address2        => $patron->address2,
418
                city            => $patron->city,
419
                zipcode         => $patron->zipcode,
420
                state           => $patron->state,
421
                country         => $patron->country,
422
                wborrowernumber => $reserve->{'borrowernumber'},
423
                wborcnum        => $patron->cardnumber,
424
        );
404
        );
425
    }
405
    }
426
    $template->param(
406
    $template->param(
Lines 454-475 if ( $messages->{'ResFound'}) { Link Here
454
            # FIXME The full patron object should be passed to the template
434
            # FIXME The full patron object should be passed to the template
455
            found          => 1,
435
            found          => 1,
456
            name           => $patron->surname . ", " . $patron->title . " " . $patron->firstname,
436
            name           => $patron->surname . ", " . $patron->title . " " . $patron->firstname,
457
            borfirstname   => $patron->firstname,
458
            borsurname     => $patron->surname,
459
            borcategory    => $patron->category->description,
460
            bortitle       => $patron->title,
461
            borphone       => $patron->phone,
462
            boremail       => $patron->email,
463
            boraddress     => $patron->address,
464
            boraddress2    => $patron->address2,
465
            streetnumber   => $patron->streetnumber,
466
            city           => $patron->city,
467
            zipcode        => $patron->zipcode,
468
            state          => $patron->state,
469
            country        => $patron->country,
470
            borcnum        => $patron->cardnumber,
471
            debarred       => $patron->debarred,
472
            gonenoaddress  => $patron->gonenoaddress,
473
            barcode        => $barcode,
437
            barcode        => $barcode,
474
            destbranch     => $reserve->{'branchcode'},
438
            destbranch     => $reserve->{'branchcode'},
475
            borrowernumber => $reserve->{'borrowernumber'},
439
            borrowernumber => $reserve->{'borrowernumber'},
Lines 580-592 foreach ( sort { $a <=> $b } keys %returneditems ) { Link Here
580
            } else {
544
            } else {
581
                $ri{return_overdue} = 1 if (DateTime->compare($duedate, $dropboxdate) == -1);
545
                $ri{return_overdue} = 1 if (DateTime->compare($duedate, $dropboxdate) == -1);
582
            }
546
            }
583
            $ri{borrowernumber} = $patron->borrowernumber;
547
            $ri{patron} = $patron,
584
            $ri{borcnum}        = $patron->cardnumber;
585
            $ri{borfirstname}   = $patron->firstname;
586
            $ri{borsurname}     = $patron->surname;
587
            $ri{bortitle}       = $patron->title;
588
            $ri{bornote}        = $patron->borrowernotes;
589
            $ri{borcategorycode}= $patron->categorycode;
590
            $ri{borissuescount} = $patron->checkouts->count;
548
            $ri{borissuescount} = $patron->checkouts->count;
591
        }
549
        }
592
        else {
550
        else {
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/circ/returns.tt (-37 / +36 lines)
Lines 101-108 Link Here
101
[% IF return_date_was_overriden && Borrowers.IsDebarred( borrower ) %]
101
[% IF return_date_was_overriden && Borrowers.IsDebarred( borrower ) %]
102
    <div id="restricted_backdated" class="dialog message">
102
    <div id="restricted_backdated" class="dialog message">
103
        <h3>
103
        <h3>
104
            <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrower.borrowernumber %]">
104
            <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% patron.borrowernumber %]">
105
                [% borrower.firstname %] [% borrower.surname %]
105
                [% patron.firstname %] [% patron.surname %]
106
            </a>
106
            </a>
107
            is restricted. Please verify this patron should still be restricted.
107
            is restricted. Please verify this patron should still be restricted.
108
        </h3>
108
        </h3>
Lines 125-137 Link Here
125
            <p><a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&amp;biblionumber=[% itembiblionumber %]">[% itembarcode |html %]: [% title |html %]</a></p>
125
            <p><a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&amp;biblionumber=[% itembiblionumber %]">[% itembarcode |html %]: [% title |html %]</a></p>
126
        <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>
126
        <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>
127
        <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>
127
        <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>
128
[% IF ( wborcnum ) %]<h5>Hold for:</h5>
128
[% IF ( patron.cardnumber ) %]<h5>Hold for:</h5>
129
        <ul>
129
        <ul>
130
            <li><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]">
130
            <li><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% patron.borrowernumber %]">
131
            [% borsurname %], [% borfirstname %]</a> ([% borcnum %]) <span class="patron-category"> - [% wborcategory %]</span> </li>
131
            [% patron.surname %], [% patron.firstname %]</a> ([% patron.cardnumber %]) <span class="patron-category"> - [% patron.category.description %]</span> </li>
132
            [% INCLUDE display_holdpatron_address %]
132
            [% INCLUDE display_holdpatron_address %]
133
            [% IF ( wborphone ) %]<li>[% wborphone %]</li>[% END %]
133
            [% IF ( patron.phone ) %]<li>[% patron.phone %]</li>[% END %]
134
            [% IF ( wboremail ) %]<li><a id="boremail" href="mailto:[% wboremail %]">[% wboremail %]</a></li>[% END %]
134
            [% IF ( patron.email ) %]<li><a id="boremail" href="mailto:[% patron.email %]">[% patron.email %]</a></li>[% END %]
135
        </ul>
135
        </ul>
136
136
137
    <form method="post" action="returns.pl" class="confirm">
137
    <form method="post" action="returns.pl" class="confirm">
Lines 140-146 Link Here
140
            <input type="hidden" name="WT-From" value="[% wtransfertFrom %]" />
140
            <input type="hidden" name="WT-From" value="[% wtransfertFrom %]" />
141
            <button type="submit" class="approve"><i class="fa fa-check"></i> Confirm</button>
141
            <button type="submit" class="approve"><i class="fa fa-check"></i> Confirm</button>
142
            <input type="hidden" name="print_slip" value="0" />
142
            <input type="hidden" name="print_slip" value="0" />
143
            <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
143
            <input type="hidden" name="borrowernumber" value="[% patron.borrowernumber %]" />
144
            <input type="hidden" name="biblionumber" value="[% biblionumber %]" />
144
            <input type="hidden" name="biblionumber" value="[% biblionumber %]" />
145
            <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>
145
            <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>
146
        <input type="hidden" name="return_date_override" value="[% return_date_override %]" />
146
        <input type="hidden" name="return_date_override" value="[% return_date_override %]" />
Lines 173-195 Link Here
173
                    <h4>Hold for:</h4>
173
                    <h4>Hold for:</h4>
174
                    <ul>
174
                    <ul>
175
                    <li>
175
                    <li>
176
                        <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]">[% borsurname %], [% borfirstname %]</a> ([% borcnum %])
176
                        <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% patron.borrowernumber %]">[% patron.surname %], [% patron.firstname %]</a> ([% patron.cardnumber %])
177
                        <span class="patron-category"> - [% borcategory %]</span>
177
                        <span class="patron-category"> - [% patron.category.description %]</span>
178
                    </li>
178
                    </li>
179
                    [% INCLUDE display_holdpatron_address %]
179
                    [% INCLUDE display_holdpatron_address %]
180
                    [% IF ( borphone ) %]
180
                    [% IF ( patron.phone ) %]
181
                        <li> [% borphone %]</li>
181
                        <li> [% patron.phone %]</li>
182
                    [% END %]
182
                    [% END %]
183
183
184
                    [% IF ( boremail ) %]
184
                    [% IF ( patron.email ) %]
185
                        <li><a id="boremail" href="mailto:[% boremail %]">[% boremail %]</a></li>
185
                        <li><a id="boremail" href="mailto:[% patron.email %]">[% patron.email %]</a></li>
186
                    [% END %]
186
                    [% END %]
187
187
188
                    [% IF ( debarred ) %]
188
                    [% IF ( patron.debarred ) %]
189
                        <li class="error">Patron is RESTRICTED</li>
189
                        <li class="error">Patron is RESTRICTED</li>
190
                    [% END %]
190
                    [% END %]
191
191
192
                    [% IF ( gonenoaddress ) %]
192
                    [% IF ( patron.gonenoaddress ) %]
193
                        <li class="error">Patron's address is in doubt</li>
193
                        <li class="error">Patron's address is in doubt</li>
194
                    [% END %]
194
                    [% END %]
195
                    </ul>
195
                    </ul>
Lines 207-213 Link Here
207
                    [% END %]
207
                    [% END %]
208
208
209
                    <input type="hidden" name="itemnumber" value="[% itemnumber %]" />
209
                    <input type="hidden" name="itemnumber" value="[% itemnumber %]" />
210
                    <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
210
                    <input type="hidden" name="borrowernumber" value="[% patron.borrowernumber %]" />
211
                    <input type="hidden" name="biblionumber" value="[% itembiblionumber %]" />
211
                    <input type="hidden" name="biblionumber" value="[% itembiblionumber %]" />
212
                    <input type="hidden" name="reserve_id" value="[% reserve_id %]" />
212
                    <input type="hidden" name="reserve_id" value="[% reserve_id %]" />
213
                    <input type="hidden" name="diffBranch" value="[% destbranch %]" />
213
                    <input type="hidden" name="diffBranch" value="[% destbranch %]" />
Lines 248-259 Link Here
248
                <p><a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&amp;biblionumber=[% itembiblionumber %]">[% itembarcode |html %]: [% title |html %]</a></p>
248
                <p><a href="/cgi-bin/koha/catalogue/detail.pl?type=intra&amp;biblionumber=[% itembiblionumber %]">[% itembarcode |html %]: [% title |html %]</a></p>
249
                <h4>Hold for: </h4>
249
                <h4>Hold for: </h4>
250
                    <ul>
250
                    <ul>
251
                        <li><a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]">[% borsurname %], [% borfirstname %]</a> ([% borcnum %]) <span class="patron-category"> - [% wborcategory %]</span> </li>
251
                        <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>
252
                        [% INCLUDE display_holdpatron_address %]
252
                        [% INCLUDE display_holdpatron_address %]
253
                        [% IF ( borphone ) %]<li>[% borphone %]</li>[% END %]
253
                        [% IF ( patron.phone ) %]<li>[% patron.phone %]</li>[% END %]
254
                        [% IF ( boremail ) %]<li>[% IF ( transfertodo ) %][% boremail %][% ELSE %]<a id="boremail" href="mailto:[% boremail %]">[% boremail %]</a>[% END %]</li>[% END %]
254
                        [% IF ( patron.email ) %]<li>[% IF ( transfertodo ) %][% patron.email %][% ELSE %]<a id="boremail" href="mailto:[% patron.email %]">[% patron.email %]</a>[% END %]</li>[% END %]
255
[% IF ( debarred ) %]<li class="error">Patron is RESTRICTED</li>[% END %]
255
[% IF ( patron.debarred ) %]<li class="error">Patron is RESTRICTED</li>[% END %]
256
[% IF ( gonenoaddress ) %]<li class="error">Patron's address is in doubt</li>[% END %]
256
[% IF ( patron.gonenoaddress ) %]<li class="error">Patron's address is in doubt</li>[% END %]
257
                    </ul>
257
                    </ul>
258
        [% IF ( transfertodo ) %]
258
        [% IF ( transfertodo ) %]
259
            <h4><strong>Transfer to:</strong> [% Branches.GetName( destbranch ) %]</h4>
259
            <h4><strong>Transfer to:</strong> [% Branches.GetName( destbranch ) %]</h4>
Lines 264-270 Link Here
264
        <form method="post" action="returns.pl" class="confirm">
264
        <form method="post" action="returns.pl" class="confirm">
265
            <button type="submit" class="approve"><i class="fa fa-check"></i> Confirm</button>
265
            <button type="submit" class="approve"><i class="fa fa-check"></i> Confirm</button>
266
            <input type="hidden" name="print_slip" value="0" />
266
            <input type="hidden" name="print_slip" value="0" />
267
            <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
267
            <input type="hidden" name="borrowernumber" value="[% patron.borrowernumber %]" />
268
            <input type="hidden" name="biblionumber" value="[% itembiblionumber %]" />
268
            <input type="hidden" name="biblionumber" value="[% itembiblionumber %]" />
269
            <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>
269
            <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>
270
            [% FOREACH inputloo IN inputloop %]
270
            [% FOREACH inputloo IN inputloop %]
Lines 368-392 Link Here
368
                    [% END %]
368
                    [% END %]
369
                    <h5>Hold for:</h5>
369
                    <h5>Hold for:</h5>
370
                        <li>
370
                        <li>
371
                            <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% borrowernumber %]">
371
                            <a href="/cgi-bin/koha/members/moremember.pl?borrowernumber=[% patron.borrowernumber %]">
372
                                [% borsurname %], [% borfirstname %]
372
                                [% patron.surname %], [% patron.firstname %]
373
                            </a>
373
                            </a>
374
                            ([% borcnum %])
374
                            ([% patron.cardnumber %])
375
                            <span class="patron-category"> - [% borcategory %]</span>
375
                            <span class="patron-category"> - [% patron.category.description %]</span>
376
                        </li>
376
                        </li>
377
377
378
                        [% INCLUDE display_holdpatron_address %]
378
                        [% INCLUDE display_holdpatron_address %]
379
379
380
                        [% IF ( borphone ) %]
380
                        [% IF ( patron.phone ) %]
381
                            <li>[% borphone %]</li>
381
                            <li>[% patron.phone  %]</li>
382
                        [% END %]
382
                        [% END %]
383
383
384
                        [% IF ( boremail ) %]
384
                        [% IF ( patron.email ) %]
385
                            <li>
385
                            <li>
386
                                [% IF ( transfertodo ) %]
386
                                [% IF ( transfertodo ) %]
387
                                    [% boremail %]
387
                                    [% patron.email %]
388
                                [% ELSE %]
388
                                [% ELSE %]
389
                                    <a id="boremail" href="mailto:[% boremail %]">[% boremail %]</a>
389
                                    <a id="boremail" href="mailto:[% patron.email %]">[% patron.email %]</a>
390
                                [% END %]
390
                                [% END %]
391
                            </li>
391
                            </li>
392
                        [% END %]
392
                        [% END %]
Lines 395-405 Link Here
395
                            [% INCLUDE display_bormessagepref %]
395
                            [% INCLUDE display_bormessagepref %]
396
                        [% END %]
396
                        [% END %]
397
397
398
                        [% IF ( debarred ) %]
398
                        [% IF ( patron.debarred ) %]
399
                            <li class="error">Patron is RESTRICTED</li>
399
                            <li class="error">Patron is RESTRICTED</li>
400
                        [% END %]
400
                        [% END %]
401
401
402
                        [% IF ( gonenoaddress ) %]
402
                        [% IF ( patron.gonenoaddress ) %]
403
                            <li class="error">Patron's address is in doubt</li>
403
                            <li class="error">Patron's address is in doubt</li>
404
                        [% END %]
404
                        [% END %]
405
405
Lines 419-425 Link Here
419
                    [% END %]
419
                    [% END %]
420
420
421
                    <input type="hidden" name="itemnumber" value="[% itemnumber %]" />
421
                    <input type="hidden" name="itemnumber" value="[% itemnumber %]" />
422
                    <input type="hidden" name="borrowernumber" value="[% borrowernumber %]" />
422
                    <input type="hidden" name="borrowernumber" value="[% patron.borrowernumber %]" />
423
                    <input type="hidden" name="biblionumber" value="[% itembiblionumber %]" />
423
                    <input type="hidden" name="biblionumber" value="[% itembiblionumber %]" />
424
                    <input type="hidden" name="reserve_id" value="[% reserve_id %]" />
424
                    <input type="hidden" name="reserve_id" value="[% reserve_id %]" />
425
                    <input type="hidden" name="diffBranch" value="[% destbranch %]" />
425
                    <input type="hidden" name="diffBranch" value="[% destbranch %]" />
Lines 711-717 Link Here
711
            $(".modal").on('hidden.bs.modal', function (e) { $("#barcode").focus(); });
711
            $(".modal").on('hidden.bs.modal', function (e) { $("#barcode").focus(); });
712
712
713
            [% IF print_slip %]
713
            [% IF print_slip %]
714
                Dopop('hold-transfer-slip.pl?borrowernumber=[% borrowernumber %]&amp;biblionumber=[% biblionumber %]');
714
                Dopop('hold-transfer-slip.pl?borrowernumber=[% patron.borrowernumber %]&amp;biblionumber=[% biblionumber %]');
715
            [% END %]
715
            [% END %]
716
716
717
            var columns_settings = [% ColumnsSettings.GetColumns( 'circ', 'returns', 'checkedintable', 'json' ) %]
717
            var columns_settings = [% ColumnsSettings.GetColumns( 'circ', 'returns', 'checkedintable', 'json' ) %]
718
- 

Return to bug 18789