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