Lines 578-584
C<$issuingimpossible> and C<$needsconfirmation> are some hashref.
Link Here
|
578 |
|
578 |
|
579 |
=over 4 |
579 |
=over 4 |
580 |
|
580 |
|
581 |
=item C<$borrower> hash with borrower informations (from GetMemberDetails) |
581 |
=item C<$borrower> hash with borrower informations (from GetMember or GetMemberDetails) |
582 |
|
582 |
|
583 |
=item C<$barcode> is the bar code of the book being issued. |
583 |
=item C<$barcode> is the bar code of the book being issued. |
584 |
|
584 |
|
Lines 858-864
sub CanBookBeIssued {
Link Here
|
858 |
elsif ($issue->{borrowernumber}) { |
858 |
elsif ($issue->{borrowernumber}) { |
859 |
|
859 |
|
860 |
# issued to someone else |
860 |
# issued to someone else |
861 |
my $currborinfo = C4::Members::GetMemberDetails( $issue->{borrowernumber} ); |
861 |
my $currborinfo = C4::Members::GetMember( borrowernumber => $issue->{borrowernumber} ); |
862 |
|
862 |
|
863 |
# warn "=>.$currborinfo->{'firstname'} $currborinfo->{'surname'} ($currborinfo->{'cardnumber'})"; |
863 |
# warn "=>.$currborinfo->{'firstname'} $currborinfo->{'surname'} ($currborinfo->{'cardnumber'})"; |
864 |
$needsconfirmation{ISSUED_TO_ANOTHER} = 1; |
864 |
$needsconfirmation{ISSUED_TO_ANOTHER} = 1; |
Lines 872-878
sub CanBookBeIssued {
Link Here
|
872 |
my ( $restype, $res ) = C4::Reserves::CheckReserves( $item->{'itemnumber'} ); |
872 |
my ( $restype, $res ) = C4::Reserves::CheckReserves( $item->{'itemnumber'} ); |
873 |
if ($restype) { |
873 |
if ($restype) { |
874 |
my $resbor = $res->{'borrowernumber'}; |
874 |
my $resbor = $res->{'borrowernumber'}; |
875 |
my ( $resborrower ) = C4::Members::GetMemberDetails( $resbor, 0 ); |
875 |
my ( $resborrower ) = C4::Members::GetMember( borrowernumber => $resbor ); |
876 |
my $branches = GetBranches(); |
876 |
my $branches = GetBranches(); |
877 |
my $branchname = $branches->{ $res->{'branchcode'} }->{'branchname'}; |
877 |
my $branchname = $branches->{ $res->{'branchcode'} }->{'branchname'}; |
878 |
if ( $resbor ne $borrower->{'borrowernumber'} && $restype eq "Waiting" ) |
878 |
if ( $resbor ne $borrower->{'borrowernumber'} && $restype eq "Waiting" ) |
Lines 909-915
Issue a book. Does no check, they are done in CanBookBeIssued. If we reach this
Link Here
|
909 |
|
909 |
|
910 |
=over 4 |
910 |
=over 4 |
911 |
|
911 |
|
912 |
=item C<$borrower> is a hash with borrower informations (from GetMemberDetails). |
912 |
=item C<$borrower> is a hash with borrower informations (from GetMember or GetMemberDetails). |
913 |
|
913 |
|
914 |
=item C<$barcode> is the barcode of the item being issued. |
914 |
=item C<$barcode> is the barcode of the item being issued. |
915 |
|
915 |
|
Lines 1525-1531
sub AddReturn {
Link Here
|
1525 |
my $issue = GetItemIssue($itemnumber); |
1525 |
my $issue = GetItemIssue($itemnumber); |
1526 |
# warn Dumper($iteminformation); |
1526 |
# warn Dumper($iteminformation); |
1527 |
if ($issue and $issue->{borrowernumber}) { |
1527 |
if ($issue and $issue->{borrowernumber}) { |
1528 |
$borrower = C4::Members::GetMemberDetails($issue->{borrowernumber}) |
1528 |
$borrower = C4::Members::GetMember( borrowernumber => $issue->{borrowernumber}) |
1529 |
or die "Data inconsistency: barcode $barcode (itemnumber:$itemnumber) claims to be issued to non-existant borrowernumber '$issue->{borrowernumber}'\n" |
1529 |
or die "Data inconsistency: barcode $barcode (itemnumber:$itemnumber) claims to be issued to non-existant borrowernumber '$issue->{borrowernumber}'\n" |
1530 |
. Dumper($issue) . "\n"; |
1530 |
. Dumper($issue) . "\n"; |
1531 |
} else { |
1531 |
} else { |
Lines 2261-2267
sub AddRenewal {
Link Here
|
2261 |
# based on the value of the RenewalPeriodBase syspref. |
2261 |
# based on the value of the RenewalPeriodBase syspref. |
2262 |
unless ($datedue) { |
2262 |
unless ($datedue) { |
2263 |
|
2263 |
|
2264 |
my $borrower = C4::Members::GetMemberDetails( $borrowernumber, 0 ) or return undef; |
2264 |
my $borrower = C4::Members::GetMember( borrowernumber => $borrowernumber ) or return undef; |
2265 |
my $itemtype = (C4::Context->preference('item-level_itypes')) ? $biblio->{'itype'} : $biblio->{'itemtype'}; |
2265 |
my $itemtype = (C4::Context->preference('item-level_itypes')) ? $biblio->{'itype'} : $biblio->{'itemtype'}; |
2266 |
|
2266 |
|
2267 |
$datedue = (C4::Context->preference('RenewalPeriodBase') eq 'date_due') ? |
2267 |
$datedue = (C4::Context->preference('RenewalPeriodBase') eq 'date_due') ? |
Lines 2315-2321
sub GetRenewCount {
Link Here
|
2315 |
my $renewsallowed = 0; |
2315 |
my $renewsallowed = 0; |
2316 |
my $renewsleft = 0; |
2316 |
my $renewsleft = 0; |
2317 |
|
2317 |
|
2318 |
my $borrower = C4::Members::GetMemberDetails($bornum); |
2318 |
my $borrower = C4::Members::GetMember( borrowernumber => $bornum); |
2319 |
my $item = GetItem($itemno); |
2319 |
my $item = GetItem($itemno); |
2320 |
|
2320 |
|
2321 |
# Look in the issues table for this item, lent to this borrower, |
2321 |
# Look in the issues table for this item, lent to this borrower, |
2322 |
- |
|
|