Lines 1857-1873
sub AddReturn {
Link Here
|
1857 |
my $stat_type = 'return'; |
1857 |
my $stat_type = 'return'; |
1858 |
|
1858 |
|
1859 |
# get information on item |
1859 |
# get information on item |
1860 |
my $item = GetItem( undef, $barcode ) |
1860 |
my $item = GetItem( undef, $barcode ); |
1861 |
or die "GetItem( undef, $barcode ) failed"; |
1861 |
unless ($item) { |
|
|
1862 |
return ( 0, { BadBarcode => $barcode } ); # no barcode means no item or borrower. bail out. |
1863 |
} |
1864 |
|
1862 |
my $itemnumber = $item->{ itemnumber }; |
1865 |
my $itemnumber = $item->{ itemnumber }; |
1863 |
my $biblio = GetBiblioData( $item->{ biblionumber } ); |
1866 |
my $biblio = GetBiblioData( $item->{ biblionumber } ); |
1864 |
my $itemtype = ( C4::Context->preference("item-level_itypes") ) |
1867 |
my $itemtype = ( C4::Context->preference("item-level_itypes") ) |
1865 |
? $item->{ itype } |
1868 |
? $item->{ itype } |
1866 |
: $biblio->{ itemtype }; |
1869 |
: $biblio->{ itemtype }; |
1867 |
|
1870 |
|
1868 |
unless ($itemnumber) { |
|
|
1869 |
return (0, { BadBarcode => $barcode }); # no barcode means no item or borrower. bail out. |
1870 |
} |
1871 |
my $issue = GetItemIssue($itemnumber); |
1871 |
my $issue = GetItemIssue($itemnumber); |
1872 |
if ($issue and $issue->{borrowernumber}) { |
1872 |
if ($issue and $issue->{borrowernumber}) { |
1873 |
$borrower = C4::Members::GetMemberDetails($issue->{borrowernumber}) |
1873 |
$borrower = C4::Members::GetMemberDetails($issue->{borrowernumber}) |
1874 |
- |
|
|