Lines 55-60
sub do_checkout {
Link Here
|
55 |
my $shelf = $self->{item}->hold_shelf; |
55 |
my $shelf = $self->{item}->hold_shelf; |
56 |
my $barcode = $self->{item}->id; |
56 |
my $barcode = $self->{item}->id; |
57 |
my $patron_barcode = $self->{patron}->id; |
57 |
my $patron_barcode = $self->{patron}->id; |
|
|
58 |
my $overridden_duedate; # usually passed as undef to AddIssue |
58 |
$debug and warn "do_checkout: patron (" . $patron_barcode . ")"; |
59 |
$debug and warn "do_checkout: patron (" . $patron_barcode . ")"; |
59 |
my $borrower = $self->{patron}->getmemberdetails_object(); |
60 |
my $borrower = $self->{patron}->getmemberdetails_object(); |
60 |
$debug and warn "do_checkout borrower: . " . Dumper $borrower; |
61 |
$debug and warn "do_checkout borrower: . " . Dumper $borrower; |
Lines 73-79
sub do_checkout {
Link Here
|
73 |
$noerror = 0; |
74 |
$noerror = 0; |
74 |
} |
75 |
} |
75 |
} else { |
76 |
} else { |
76 |
foreach my $confirmation (keys %$needsconfirmation) { |
77 |
foreach my $confirmation (keys %{$needsconfirmation}) { |
77 |
if ($confirmation eq 'RENEW_ISSUE'){ |
78 |
if ($confirmation eq 'RENEW_ISSUE'){ |
78 |
$self->screen_msg("Item already checked out to you: renewing item."); |
79 |
$self->screen_msg("Item already checked out to you: renewing item."); |
79 |
} elsif ($confirmation eq 'RESERVED' or $confirmation eq 'RESERVE_WAITING') { |
80 |
} elsif ($confirmation eq 'RESERVED' or $confirmation eq 'RESERVE_WAITING') { |
Lines 88-93
sub do_checkout {
Link Here
|
88 |
$self->screen_msg("Item already checked out to another patron. Please return item for check-in."); |
89 |
$self->screen_msg("Item already checked out to another patron. Please return item for check-in."); |
89 |
$noerror = 0; |
90 |
$noerror = 0; |
90 |
} elsif ($confirmation eq 'DEBT') { # don't do anything, it's the minor debt, and alarms fire elsewhere |
91 |
} elsif ($confirmation eq 'DEBT') { # don't do anything, it's the minor debt, and alarms fire elsewhere |
|
|
92 |
} elsif ($confirmation eq 'HIGHHOLDS') { |
93 |
$overridden_duedate = $needsconfirmation->{$confirmation}->{returndate}; |
94 |
$self->screen_msg('Loan period reduced for high-demand item'); |
91 |
} else { |
95 |
} else { |
92 |
$self->screen_msg($needsconfirmation->{$confirmation}); |
96 |
$self->screen_msg($needsconfirmation->{$confirmation}); |
93 |
$noerror = 0; |
97 |
$noerror = 0; |
Lines 119-128
sub do_checkout {
Link Here
|
119 |
# TODO: adjust representation in $self->item |
123 |
# TODO: adjust representation in $self->item |
120 |
} |
124 |
} |
121 |
# can issue |
125 |
# can issue |
122 |
$debug and warn "do_checkout: calling AddIssue(\$borrower,$barcode, undef, 0)\n" |
126 |
$debug and warn "do_checkout: calling AddIssue(\$borrower,$barcode, $overridden_duedate, 0)\n" |
123 |
# . "w/ \$borrower: " . Dumper($borrower) |
127 |
# . "w/ \$borrower: " . Dumper($borrower) |
124 |
. "w/ C4::Context->userenv: " . Dumper(C4::Context->userenv); |
128 |
. "w/ C4::Context->userenv: " . Dumper(C4::Context->userenv); |
125 |
my $due_dt = AddIssue($borrower, $barcode, undef, 0); |
129 |
my $due_dt = AddIssue($borrower, $barcode, $overridden_duedate, 0); |
126 |
if ($due_dt) { |
130 |
if ($due_dt) { |
127 |
$self->{due} = $due_dt->clone(); |
131 |
$self->{due} = $due_dt->clone(); |
128 |
} else { |
132 |
} else { |
129 |
- |
|
|