Lines 54-62
sub do_checkout {
Link Here
|
54 |
my $patron_barcode = $self->{patron}->id; |
54 |
my $patron_barcode = $self->{patron}->id; |
55 |
my $overridden_duedate; # usually passed as undef to AddIssue |
55 |
my $overridden_duedate; # usually passed as undef to AddIssue |
56 |
$debug and warn "do_checkout: patron (" . $patron_barcode . ")"; |
56 |
$debug and warn "do_checkout: patron (" . $patron_barcode . ")"; |
57 |
my $borrower = $self->{patron}->getmemberdetails_object(); |
57 |
my $patron = Koha::Patrons->find( { cardnumber => $patron_barcode } ); |
|
|
58 |
my $borrower = $patron->unblessed; |
58 |
$debug and warn "do_checkout borrower: . " . Dumper $borrower; |
59 |
$debug and warn "do_checkout borrower: . " . Dumper $borrower; |
59 |
my ($issuingimpossible, $needsconfirmation) = _can_we_issue($borrower, $barcode, |
60 |
my ($issuingimpossible, $needsconfirmation) = _can_we_issue($patron, $barcode, |
60 |
C4::Context->preference("AllowItemsOnHoldCheckout") |
61 |
C4::Context->preference("AllowItemsOnHoldCheckout") |
61 |
); |
62 |
); |
62 |
|
63 |
|
Lines 149-158
sub do_checkout {
Link Here
|
149 |
} |
150 |
} |
150 |
|
151 |
|
151 |
sub _can_we_issue { |
152 |
sub _can_we_issue { |
152 |
my ( $borrower, $barcode, $pref ) = @_; |
153 |
my ( $patron, $barcode, $pref ) = @_; |
153 |
|
154 |
|
154 |
my ( $issuingimpossible, $needsconfirmation, $alerts ) = |
155 |
my ( $issuingimpossible, $needsconfirmation, $alerts ) = |
155 |
CanBookBeIssued( $borrower, $barcode, undef, 0, $pref ); |
156 |
CanBookBeIssued( $patron, $barcode, undef, 0, $pref ); |
156 |
for my $href ( $issuingimpossible, $needsconfirmation ) { |
157 |
for my $href ( $issuingimpossible, $needsconfirmation ) { |
157 |
|
158 |
|
158 |
# some data is returned using lc keys we only |
159 |
# some data is returned using lc keys we only |
159 |
- |
|
|