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