|
Lines 70-76
BEGIN {
Link Here
|
| 70 |
GetBiblioItemData |
70 |
GetBiblioItemData |
| 71 |
GetBiblioItemInfosOf |
71 |
GetBiblioItemInfosOf |
| 72 |
GetBiblioItemByBiblioNumber |
72 |
GetBiblioItemByBiblioNumber |
| 73 |
GetBiblioFromItemNumber |
|
|
| 74 |
GetBiblionumberFromItemnumber |
73 |
GetBiblionumberFromItemnumber |
| 75 |
|
74 |
|
| 76 |
&GetRecordValue |
75 |
&GetRecordValue |
|
Lines 788-832
sub GetBiblionumberFromItemnumber {
Link Here
|
| 788 |
return ($result); |
787 |
return ($result); |
| 789 |
} |
788 |
} |
| 790 |
|
789 |
|
| 791 |
=head2 GetBiblioFromItemNumber |
|
|
| 792 |
|
| 793 |
$item = &GetBiblioFromItemNumber($itemnumber,$barcode); |
| 794 |
|
| 795 |
Looks up the item with the given itemnumber. if undef, try the barcode. |
| 796 |
|
| 797 |
C<&itemnodata> returns a reference-to-hash whose keys are the fields |
| 798 |
from the C<biblio>, C<biblioitems>, and C<items> tables in the Koha |
| 799 |
database. |
| 800 |
|
| 801 |
=cut |
| 802 |
|
| 803 |
#' |
| 804 |
sub GetBiblioFromItemNumber { |
| 805 |
my ( $itemnumber, $barcode ) = @_; |
| 806 |
my $dbh = C4::Context->dbh; |
| 807 |
my $sth; |
| 808 |
if ($itemnumber) { |
| 809 |
$sth = $dbh->prepare( |
| 810 |
"SELECT * FROM items |
| 811 |
LEFT JOIN biblio ON biblio.biblionumber = items.biblionumber |
| 812 |
LEFT JOIN biblioitems ON biblioitems.biblioitemnumber = items.biblioitemnumber |
| 813 |
WHERE items.itemnumber = ?" |
| 814 |
); |
| 815 |
$sth->execute($itemnumber); |
| 816 |
} else { |
| 817 |
$sth = $dbh->prepare( |
| 818 |
"SELECT * FROM items |
| 819 |
LEFT JOIN biblio ON biblio.biblionumber = items.biblionumber |
| 820 |
LEFT JOIN biblioitems ON biblioitems.biblioitemnumber = items.biblioitemnumber |
| 821 |
WHERE items.barcode = ?" |
| 822 |
); |
| 823 |
$sth->execute($barcode); |
| 824 |
} |
| 825 |
my $data = $sth->fetchrow_hashref; |
| 826 |
$sth->finish; |
| 827 |
return ($data); |
| 828 |
} |
| 829 |
|
| 830 |
=head2 GetISBDView |
790 |
=head2 GetISBDView |
| 831 |
|
791 |
|
| 832 |
$isbd = &GetISBDView({ |
792 |
$isbd = &GetISBDView({ |
| 833 |
- |
|
|