Lines 1750-1766
sub AddReturn {
Link Here
|
1750 |
my $stat_type = 'return'; |
1750 |
my $stat_type = 'return'; |
1751 |
|
1751 |
|
1752 |
# get information on item |
1752 |
# get information on item |
1753 |
my $item = GetItem( undef, $barcode ) |
1753 |
my $item = GetItem( undef, $barcode ); |
1754 |
or die "GetItem( undef, $barcode ) failed"; |
1754 |
unless ($item) { |
|
|
1755 |
return ( 0, { BadBarcode => $barcode } ); # no barcode means no item or borrower. bail out. |
1756 |
} |
1757 |
|
1755 |
my $itemnumber = $item->{ itemnumber }; |
1758 |
my $itemnumber = $item->{ itemnumber }; |
1756 |
my $biblio = GetBiblioData( $item->{ biblionumber } ); |
1759 |
my $biblio = GetBiblioData( $item->{ biblionumber } ); |
1757 |
my $itemtype = ( C4::Context->preference("item-level_itypes") ) |
1760 |
my $itemtype = ( C4::Context->preference("item-level_itypes") ) |
1758 |
? $item->{ itype } |
1761 |
? $item->{ itype } |
1759 |
: $biblio->{ itemtype }; |
1762 |
: $biblio->{ itemtype }; |
1760 |
|
1763 |
|
1761 |
unless ($itemnumber) { |
|
|
1762 |
return (0, { BadBarcode => $barcode }); # no barcode means no item or borrower. bail out. |
1763 |
} |
1764 |
my $issue = GetItemIssue($itemnumber); |
1764 |
my $issue = GetItemIssue($itemnumber); |
1765 |
if ($issue and $issue->{borrowernumber}) { |
1765 |
if ($issue and $issue->{borrowernumber}) { |
1766 |
$borrower = C4::Members::GetMemberDetails($issue->{borrowernumber}) |
1766 |
$borrower = C4::Members::GetMemberDetails($issue->{borrowernumber}) |
1767 |
- |
|
|