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

(-)a/opac/sco/sco-main.pl (-6 / +8 lines)
Lines 114-120 if (C4::Context->preference('SelfCheckoutByLogin') && !$patronid) { Link Here
114
    my $resval;
114
    my $resval;
115
    ($resval, $patronid) = checkpw($dbh, $patronlogin, $patronpw);
115
    ($resval, $patronid) = checkpw($dbh, $patronlogin, $patronpw);
116
}
116
}
117
my $borrower = Koha::Patrons->find( { cardnumber => $patronid } )->unblessed;
117
118
my $borrower;
119
if ( $patronid ) {
120
    $borrower = Koha::Patrons->find( { cardnumber => $patronid } );
121
    $borrower = $borrower->unblessed if $borrower;
122
}
118
123
119
my $currencySymbol = "";
124
my $currencySymbol = "";
120
if ( my $active_currency = Koha::Acquisition::Currencies->get_active ) {
125
if ( my $active_currency = Koha::Acquisition::Currencies->get_active ) {
Lines 131-140 if ($op eq "logout") { Link Here
131
}
136
}
132
elsif ( $op eq "returnbook" && $allowselfcheckreturns ) {
137
elsif ( $op eq "returnbook" && $allowselfcheckreturns ) {
133
    my ($doreturn) = AddReturn( $barcode, $branch );
138
    my ($doreturn) = AddReturn( $barcode, $branch );
134
    #warn "returnbook: " . $doreturn;
135
    $borrower = Koha::Patrons->find( { cardnumber => $patronid } )->unblessed;
136
}
139
}
137
elsif ( $op eq "checkout" ) {
140
elsif ( $borrower and $op eq "checkout" ) {
138
    my $impossible  = {};
141
    my $impossible  = {};
139
    my $needconfirm = {};
142
    my $needconfirm = {};
140
    ( $impossible, $needconfirm ) = CanBookBeIssued(
143
    ( $impossible, $needconfirm ) = CanBookBeIssued(
Lines 250-256 elsif ( $op eq "checkout" ) { Link Here
250
    }
253
    }
251
} # $op
254
} # $op
252
255
253
if ($borrower->{cardnumber}) {
256
if ($borrower) {
254
#   warn "issuer's  branchcode: " .   $issuer->{branchcode};
257
#   warn "issuer's  branchcode: " .   $issuer->{branchcode};
255
#   warn   "user's  branchcode: " . $borrower->{branchcode};
258
#   warn   "user's  branchcode: " . $borrower->{branchcode};
256
    my $borrowername = sprintf "%s %s", ($borrower->{firstname} || ''), ($borrower->{surname} || '');
259
    my $borrowername = sprintf "%s %s", ($borrower->{firstname} || ''), ($borrower->{surname} || '');
257
- 

Return to bug 19048