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

(-)a/C4/Circulation.pm (+11 lines)
Lines 1418-1423 sub AddIssue { Link Here
1418
                auto_renew      => $auto_renew ? 1 : 0,
1418
                auto_renew      => $auto_renew ? 1 : 0,
1419
            };
1419
            };
1420
1420
1421
            # Get ID of logged in user.  if called from a batch job,
1422
            # no user session exists and C4::Context->userenv() returns
1423
            # the scalar '0'. Only do this is the syspref says so
1424
            if ( C4::Context->preference('RecordIssuer') ) {
1425
                my $userenv = C4::Context->userenv();
1426
                my $usernumber = (ref($userenv) eq 'HASH') ? $userenv->{'number'} : undef;
1427
                if ($usernumber) {
1428
                    $issue_attributes->{issuer} = $usernumber;
1429
                }
1430
            }
1431
1421
            $issue = Koha::Checkouts->find( { itemnumber => $item_object->itemnumber } );
1432
            $issue = Koha::Checkouts->find( { itemnumber => $item_object->itemnumber } );
1422
            if ($issue) {
1433
            if ($issue) {
1423
                $issue->set($issue_attributes)->store;
1434
                $issue->set($issue_attributes)->store;
(-)a/C4/Members.pm (-2 / +4 lines)
Lines 277-292 sub GetAllIssues { Link Here
277
'SELECT *, issues.timestamp as issuestimestamp, issues.renewals AS renewals,items.renewals AS totalrenewals,items.timestamp AS itemstimestamp
277
'SELECT *, issues.timestamp as issuestimestamp, issues.renewals AS renewals,items.renewals AS totalrenewals,items.timestamp AS itemstimestamp
278
  FROM issues
278
  FROM issues
279
  LEFT JOIN items on items.itemnumber=issues.itemnumber
279
  LEFT JOIN items on items.itemnumber=issues.itemnumber
280
  LEFT JOIN borrowers on borrowers.borrowernumber=issues.issuer
280
  LEFT JOIN biblio ON items.biblionumber=biblio.biblionumber
281
  LEFT JOIN biblio ON items.biblionumber=biblio.biblionumber
281
  LEFT JOIN biblioitems ON items.biblioitemnumber=biblioitems.biblioitemnumber
282
  LEFT JOIN biblioitems ON items.biblioitemnumber=biblioitems.biblioitemnumber
282
  WHERE borrowernumber=?
283
  WHERE issues.borrowernumber=?
283
  UNION ALL
284
  UNION ALL
284
  SELECT *, old_issues.timestamp as issuestimestamp, old_issues.renewals AS renewals,items.renewals AS totalrenewals,items.timestamp AS itemstimestamp
285
  SELECT *, old_issues.timestamp as issuestimestamp, old_issues.renewals AS renewals,items.renewals AS totalrenewals,items.timestamp AS itemstimestamp
285
  FROM old_issues
286
  FROM old_issues
286
  LEFT JOIN items on items.itemnumber=old_issues.itemnumber
287
  LEFT JOIN items on items.itemnumber=old_issues.itemnumber
288
  LEFT JOIN borrowers on borrowers.borrowernumber=old_issues.issuer
287
  LEFT JOIN biblio ON items.biblionumber=biblio.biblionumber
289
  LEFT JOIN biblio ON items.biblionumber=biblio.biblionumber
288
  LEFT JOIN biblioitems ON items.biblioitemnumber=biblioitems.biblioitemnumber
290
  LEFT JOIN biblioitems ON items.biblioitemnumber=biblioitems.biblioitemnumber
289
  WHERE borrowernumber=? AND old_issues.itemnumber IS NOT NULL
291
  WHERE old_issues.borrowernumber=? AND old_issues.itemnumber IS NOT NULL
290
  order by ' . $order;
292
  order by ' . $order;
291
    if ($limit) {
293
    if ($limit) {
292
        $query .= " limit $limit";
294
        $query .= " limit $limit";
(-)a/Koha/Checkout.pm (+15 lines)
Lines 90-95 sub patron { Link Here
90
    return Koha::Patron->_new_from_dbic( $patron_rs );
90
    return Koha::Patron->_new_from_dbic( $patron_rs );
91
}
91
}
92
92
93
=head3 issued_by
94
95
my $issued_by = $checkout->issued_by
96
97
Return the patron by whom the checkout was done
98
99
=cut
100
101
sub issued_by {
102
    my ( $self ) = @_;
103
    my $issued_by_rs = $self->_result->issuer;
104
    return Koha::Patron->_new_from_dbic( $issued_by_rs );
105
}
106
93
=head3 to_api_mapping
107
=head3 to_api_mapping
94
108
95
This method returns the mapping for representing a Koha::Checkout object
109
This method returns the mapping for representing a Koha::Checkout object
Lines 101-106 sub to_api_mapping { Link Here
101
    return {
115
    return {
102
        issue_id        => 'checkout_id',
116
        issue_id        => 'checkout_id',
103
        borrowernumber  => 'patron_id',
117
        borrowernumber  => 'patron_id',
118
        issuer          => 'issuer_id',
104
        itemnumber      => 'item_id',
119
        itemnumber      => 'item_id',
105
        date_due        => 'due_date',
120
        date_due        => 'due_date',
106
        branchcode      => 'library_id',
121
        branchcode      => 'library_id',
(-)a/Koha/Illbackends/BLDSS (+1 lines)
Line 0 Link Here
1
/home/koha-koha/illbackends/BLDSS
(-)a/Koha/Illbackends/FreeForm (+1 lines)
Line 0 Link Here
1
/home/koha-koha/illbackends/FreeForm
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/catalogue/issuehistory.tt (+10 lines)
Lines 37-42 Link Here
37
            [% END %]
37
            [% END %]
38
            <th>Barcode</th>
38
            <th>Barcode</th>
39
            <th>Checked out from</th>
39
            <th>Checked out from</th>
40
            [% IF Koha.Preference('RecordIssuer') %]
41
            <th>Checked out by</th>
42
            [% END %]
40
            <th>Renewed</th>
43
            <th>Renewed</th>
41
            <th class='title-string'>Checkout on</th>
44
            <th class='title-string'>Checkout on</th>
42
            <th class='title-string'>Due date</th>
45
            <th class='title-string'>Due date</th>
Lines 63-68 Link Here
63
                    [% ELSE %]
66
                    [% ELSE %]
64
                        &nbsp;
67
                        &nbsp;
65
                    [% END %]</td>
68
                    [% END %]</td>
69
                [% IF Koha.Preference('RecordIssuer') %]
70
                <td>[% IF checkout.issuer %]
71
                    <a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% checkout.issuer | uri %]">
72
                    [% checkout.issued_by.firstname | html %] [% checkout.issued_by.surname | html %]
73
                    </a>
74
                    [% END %]</td>
75
                [% END %]
66
                <td>[% IF checkout.renewals %]
76
                <td>[% IF checkout.renewals %]
67
                        Yes[% IF checkout.lastreneweddate %], <small>last on: [% checkout.lastreneweddate |$KohaDates  with_hours => 1 %]</small>
77
                        Yes[% IF checkout.lastreneweddate %], <small>last on: [% checkout.lastreneweddate |$KohaDates  with_hours => 1 %]</small>
68
                            [% END %]
78
                            [% END %]
(-)a/koha-tmpl/intranet-tmpl/prog/en/modules/members/readingrec.tt (-1 / +6 lines)
Lines 58-63 Link Here
58
        <th>Number of renewals</th>
58
        <th>Number of renewals</th>
59
        <th class="title-string">Checked out on</th>
59
        <th class="title-string">Checked out on</th>
60
        <th>Checked out from</th>
60
        <th>Checked out from</th>
61
        [% IF Koha.Preference('RecordIssuer') %]
62
        <th>Checked out by</th>
63
        [% END %]
61
        <th class="title-string">Date due</th>
64
        <th class="title-string">Date due</th>
62
        <th class="title-string">Return date</th>
65
        <th class="title-string">Return date</th>
63
        </tr>
66
        </tr>
Lines 92-97 Link Here
92
            <span title="[% issue.issuedate | html %]">[% issue.issuedate |$KohaDates  with_hours => 1 %]</span>
95
            <span title="[% issue.issuedate | html %]">[% issue.issuedate |$KohaDates  with_hours => 1 %]</span>
93
          </td>
96
          </td>
94
          <td>[% Branches.GetName( issue.branchcode ) | html %]</td>
97
          <td>[% Branches.GetName( issue.branchcode ) | html %]</td>
98
          [% IF Koha.Preference('RecordIssuer') %]
99
          <td><a href="/cgi-bin/koha/circ/circulation.pl?borrowernumber=[% issue.issuer | uri %]">[% issue.firstname | html %] [% issue.surname | html %]</a></td>
100
          [% END %]
95
          <td>
101
          <td>
96
            [% IF issue.date_due %]
102
            [% IF issue.date_due %]
97
                <span title="[% issue.date_due | html %]">[% issue.date_due |$KohaDates  with_hours => 1 %]</span>
103
                <span title="[% issue.date_due | html %]">[% issue.date_due |$KohaDates  with_hours => 1 %]</span>
98
- 

Return to bug 23916