|
Lines 668-673
sub CanBookBeIssued {
Link Here
|
| 668 |
my ( $borrower, $barcode, $duedate, $inprocess, $ignore_reserves ) = @_; |
668 |
my ( $borrower, $barcode, $duedate, $inprocess, $ignore_reserves ) = @_; |
| 669 |
my %needsconfirmation; # filled with problems that needs confirmations |
669 |
my %needsconfirmation; # filled with problems that needs confirmations |
| 670 |
my %issuingimpossible; # filled with problems that causes the issue to be IMPOSSIBLE |
670 |
my %issuingimpossible; # filled with problems that causes the issue to be IMPOSSIBLE |
|
|
671 |
my %alerts; # filled with messages that shouldn't stop issuing, but the librarian should be aware of. |
| 672 |
|
| 671 |
my $item = GetItem(GetItemnumberFromBarcode( $barcode )); |
673 |
my $item = GetItem(GetItemnumberFromBarcode( $barcode )); |
| 672 |
my $issue = GetItemIssue($item->{itemnumber}); |
674 |
my $issue = GetItemIssue($item->{itemnumber}); |
| 673 |
my $biblioitem = GetBiblioItemData($item->{biblioitemnumber}); |
675 |
my $biblioitem = GetBiblioItemData($item->{biblioitemnumber}); |
|
Lines 849-856
sub CanBookBeIssued {
Link Here
|
| 849 |
{ |
851 |
{ |
| 850 |
$issuingimpossible{RESTRICTED} = 1; |
852 |
$issuingimpossible{RESTRICTED} = 1; |
| 851 |
} |
853 |
} |
| 852 |
if ( $item->{'itemlost'} ) { |
854 |
if ( $item->{'itemlost'} && C4::Context->preference("IssueLostItem") ne 'nothing' ) { |
| 853 |
$needsconfirmation{ITEM_LOST} = GetAuthorisedValueByCode( 'LOST', $item->{'itemlost'} ); |
855 |
my $code = GetAuthorisedValueByCode( 'LOST', $item->{'itemlost'} ); |
|
|
856 |
$needsconfirmation{ITEM_LOST} = $code if ( C4::Context->preference("IssueLostItem") eq 'confirm' ); |
| 857 |
$alerts{ITEM_LOST} = $code if ( C4::Context->preference("IssueLostItem") eq 'alert' ); |
| 854 |
} |
858 |
} |
| 855 |
if ( C4::Context->preference("IndependantBranches") ) { |
859 |
if ( C4::Context->preference("IndependantBranches") ) { |
| 856 |
my $userenv = C4::Context->userenv; |
860 |
my $userenv = C4::Context->userenv; |
|
Lines 927-933
sub CanBookBeIssued {
Link Here
|
| 927 |
} |
931 |
} |
| 928 |
} |
932 |
} |
| 929 |
} |
933 |
} |
| 930 |
return ( \%issuingimpossible, \%needsconfirmation ); |
934 |
return ( \%issuingimpossible, \%needsconfirmation, \%alerts ); |
| 931 |
} |
935 |
} |
| 932 |
|
936 |
|
| 933 |
=head2 AddIssue |
937 |
=head2 AddIssue |