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

(-)a/circ/returns.pl (-46 / +4 lines)
Lines 178-188 if ( $query->param('reserve_id') ) { Link Here
178
            itembiblionumber => $biblio->biblionumber,
178
            itembiblionumber => $biblio->biblionumber,
179
            iteminfo       => $biblio->author,
179
            iteminfo       => $biblio->author,
180
            name           => $name,
180
            name           => $name,
181
            borrowernumber => $borrowernumber,
181
            patron         => $patron,
182
            borcnum        => $patron->cardnumber,
183
            borfirstname   => $patron->firstname,
184
            borsurname     => $patron->surname,
185
            borcategory    => $patron->category->description,
186
            diffbranch     => 1,
182
            diffbranch     => 1,
187
        );
183
        );
188
    }
184
    }
Lines 294-300 if ($barcode) { Link Here
294
            ccode            => $item->ccode,
290
            ccode            => $item->ccode,
295
            itembiblionumber => $biblio->biblionumber,
291
            itembiblionumber => $biblio->biblionumber,
296
            biblionumber     => $biblio->biblionumber,
292
            biblionumber     => $biblio->biblionumber,
297
            borrower         => $borrower,
298
            additional_materials => $materials,
293
            additional_materials => $materials,
299
            issue            => $checkout,
294
            issue            => $checkout,
300
        );
295
        );
Lines 405-427 if ( $messages->{'WrongTransfer'} and not $messages->{'WasTransfered'}) { Link Here
405
        my $patron = Koha::Patrons->find( $reserve->{'borrowernumber'} );
400
        my $patron = Koha::Patrons->find( $reserve->{'borrowernumber'} );
406
        my $name = $patron->surname . ", " . $patron->title . " " . $patron->firstname;
401
        my $name = $patron->surname . ", " . $patron->title . " " . $patron->firstname;
407
        $template->param(
402
        $template->param(
408
            # FIXME The full patron object should be passed to the template
403
            wname  => $name,
409
                wname           => $name,
404
            patron => $patron,
410
                wborfirstname   => $patron->firstname,
411
                wborsurname     => $patron->surname,
412
                wborcategory    => $patron->category->description,
413
                wbortitle       => $patron->title,
414
                wborphone       => $patron->phone,
415
                wboremail       => $patron->email,
416
                streetnumber    => $patron->streetnumber,
417
                address         => $patron->address,
418
                address2        => $patron->address2,
419
                city            => $patron->city,
420
                zipcode         => $patron->zipcode,
421
                state           => $patron->state,
422
                country         => $patron->country,
423
                wborrowernumber => $reserve->{'borrowernumber'},
424
                wborcnum        => $patron->cardnumber,
425
        );
405
        );
426
    }
406
    }
427
    $template->param(
407
    $template->param(
Lines 455-476 if ( $messages->{'ResFound'}) { Link Here
455
            # FIXME The full patron object should be passed to the template
435
            # FIXME The full patron object should be passed to the template
456
            found          => 1,
436
            found          => 1,
457
            name           => $patron->surname . ", " . $patron->title . " " . $patron->firstname,
437
            name           => $patron->surname . ", " . $patron->title . " " . $patron->firstname,
458
            borfirstname   => $patron->firstname,
459
            borsurname     => $patron->surname,
460
            borcategory    => $patron->category->description,
461
            bortitle       => $patron->title,
462
            borphone       => $patron->phone,
463
            boremail       => $patron->email,
464
            boraddress     => $patron->address,
465
            boraddress2    => $patron->address2,
466
            streetnumber   => $patron->streetnumber,
467
            city           => $patron->city,
468
            zipcode        => $patron->zipcode,
469
            state          => $patron->state,
470
            country        => $patron->country,
471
            borcnum        => $patron->cardnumber,
472
            debarred       => $patron->debarred,
473
            gonenoaddress  => $patron->gonenoaddress,
474
            barcode        => $barcode,
438
            barcode        => $barcode,
475
            destbranch     => $reserve->{'branchcode'},
439
            destbranch     => $reserve->{'branchcode'},
476
            borrowernumber => $reserve->{'borrowernumber'},
440
            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} = $patron->checkouts->count;
549
            $ri{borissuescount} = $patron->checkouts->count;
592
        }
550
        }
593
        else {
551
        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