Bug 30291: Update DBIC schema
[koha.git] / Koha / Schema / Result / Item.pm
1 use utf8;
2 package Koha::Schema::Result::Item;
3
4 # Created by DBIx::Class::Schema::Loader
5 # DO NOT MODIFY THE FIRST PART OF THIS FILE
6
7 =head1 NAME
8
9 Koha::Schema::Result::Item
10
11 =cut
12
13 use strict;
14 use warnings;
15
16 use base 'DBIx::Class::Core';
17
18 =head1 TABLE: C<items>
19
20 =cut
21
22 __PACKAGE__->table("items");
23
24 =head1 ACCESSORS
25
26 =head2 itemnumber
27
28   data_type: 'integer'
29   is_auto_increment: 1
30   is_nullable: 0
31
32 primary key and unique identifier added by Koha
33
34 =head2 biblionumber
35
36   data_type: 'integer'
37   default_value: 0
38   is_foreign_key: 1
39   is_nullable: 0
40
41 foreign key from biblio table used to link this item to the right bib record
42
43 =head2 biblioitemnumber
44
45   data_type: 'integer'
46   default_value: 0
47   is_foreign_key: 1
48   is_nullable: 0
49
50 foreign key from the biblioitems table to link to item to additional information
51
52 =head2 barcode
53
54   data_type: 'varchar'
55   is_nullable: 1
56   size: 20
57
58 item barcode (MARC21 952$p)
59
60 =head2 dateaccessioned
61
62   data_type: 'date'
63   datetime_undef_if_invalid: 1
64   is_nullable: 1
65
66 date the item was acquired or added to Koha (MARC21 952$d)
67
68 =head2 booksellerid
69
70   data_type: 'longtext'
71   is_nullable: 1
72
73 where the item was purchased (MARC21 952$e)
74
75 =head2 homebranch
76
77   data_type: 'varchar'
78   is_foreign_key: 1
79   is_nullable: 1
80   size: 10
81
82 foreign key from the branches table for the library that owns this item (MARC21 952$a)
83
84 =head2 price
85
86   data_type: 'decimal'
87   is_nullable: 1
88   size: [8,2]
89
90 purchase price (MARC21 952$g)
91
92 =head2 replacementprice
93
94   data_type: 'decimal'
95   is_nullable: 1
96   size: [8,2]
97
98 cost the library charges to replace the item if it has been marked lost (MARC21 952$v)
99
100 =head2 replacementpricedate
101
102   data_type: 'date'
103   datetime_undef_if_invalid: 1
104   is_nullable: 1
105
106 the date the price is effective from (MARC21 952$w)
107
108 =head2 datelastborrowed
109
110   data_type: 'date'
111   datetime_undef_if_invalid: 1
112   is_nullable: 1
113
114 the date the item was last checked out/issued
115
116 =head2 datelastseen
117
118   data_type: 'date'
119   datetime_undef_if_invalid: 1
120   is_nullable: 1
121
122 the date the item was last see (usually the last time the barcode was scanned or inventory was done)
123
124 =head2 stack
125
126   data_type: 'tinyint'
127   is_nullable: 1
128
129 =head2 notforloan
130
131   data_type: 'tinyint'
132   default_value: 0
133   is_nullable: 0
134
135 authorized value defining why this item is not for loan (MARC21 952$7)
136
137 =head2 damaged
138
139   data_type: 'tinyint'
140   default_value: 0
141   is_nullable: 0
142
143 authorized value defining this item as damaged (MARC21 952$4)
144
145 =head2 damaged_on
146
147   data_type: 'datetime'
148   datetime_undef_if_invalid: 1
149   is_nullable: 1
150
151 the date and time an item was last marked as damaged, NULL if not damaged
152
153 =head2 itemlost
154
155   data_type: 'tinyint'
156   default_value: 0
157   is_nullable: 0
158
159 authorized value defining this item as lost (MARC21 952$1)
160
161 =head2 itemlost_on
162
163   data_type: 'datetime'
164   datetime_undef_if_invalid: 1
165   is_nullable: 1
166
167 the date and time an item was last marked as lost, NULL if not lost
168
169 =head2 withdrawn
170
171   data_type: 'tinyint'
172   default_value: 0
173   is_nullable: 0
174
175 authorized value defining this item as withdrawn (MARC21 952$0)
176
177 =head2 withdrawn_on
178
179   data_type: 'datetime'
180   datetime_undef_if_invalid: 1
181   is_nullable: 1
182
183 the date and time an item was last marked as withdrawn, NULL if not withdrawn
184
185 =head2 itemcallnumber
186
187   data_type: 'varchar'
188   is_nullable: 1
189   size: 255
190
191 call number for this item (MARC21 952$o)
192
193 =head2 coded_location_qualifier
194
195   data_type: 'varchar'
196   is_nullable: 1
197   size: 10
198
199 coded location qualifier(MARC21 952$f)
200
201 =head2 issues
202
203   data_type: 'smallint'
204   default_value: 0
205   is_nullable: 1
206
207 number of times this item has been checked out/issued
208
209 =head2 renewals
210
211   data_type: 'smallint'
212   is_nullable: 1
213
214 number of times this item has been renewed
215
216 =head2 reserves
217
218   data_type: 'smallint'
219   is_nullable: 1
220
221 number of times this item has been placed on hold/reserved
222
223 =head2 restricted
224
225   data_type: 'tinyint'
226   is_nullable: 1
227
228 authorized value defining use restrictions for this item (MARC21 952$5)
229
230 =head2 itemnotes
231
232   data_type: 'longtext'
233   is_nullable: 1
234
235 public notes on this item (MARC21 952$z)
236
237 =head2 itemnotes_nonpublic
238
239   data_type: 'longtext'
240   is_nullable: 1
241
242 non-public notes on this item (MARC21 952$x)
243
244 =head2 holdingbranch
245
246   data_type: 'varchar'
247   is_foreign_key: 1
248   is_nullable: 1
249   size: 10
250
251 foreign key from the branches table for the library that is currently in possession item (MARC21 952$b)
252
253 =head2 timestamp
254
255   data_type: 'timestamp'
256   datetime_undef_if_invalid: 1
257   default_value: current_timestamp
258   is_nullable: 0
259
260 date and time this item was last altered
261
262 =head2 location
263
264   data_type: 'varchar'
265   is_nullable: 1
266   size: 80
267
268 authorized value for the shelving location for this item (MARC21 952$c)
269
270 =head2 permanent_location
271
272   data_type: 'varchar'
273   is_nullable: 1
274   size: 80
275
276 linked to the CART and PROC temporary locations feature, stores the permanent shelving location
277
278 =head2 onloan
279
280   data_type: 'date'
281   datetime_undef_if_invalid: 1
282   is_nullable: 1
283
284 defines if item is checked out (NULL for not checked out, and due date for checked out)
285
286 =head2 cn_source
287
288   data_type: 'varchar'
289   is_nullable: 1
290   size: 10
291
292 classification source used on this item (MARC21 952$2)
293
294 =head2 cn_sort
295
296   data_type: 'varchar'
297   is_nullable: 1
298   size: 255
299
300 normalized form of the call number (MARC21 952$o) used for sorting
301
302 =head2 ccode
303
304   data_type: 'varchar'
305   is_nullable: 1
306   size: 80
307
308 authorized value for the collection code associated with this item (MARC21 952$8)
309
310 =head2 materials
311
312   data_type: 'mediumtext'
313   is_nullable: 1
314
315 materials specified (MARC21 952$3)
316
317 =head2 uri
318
319   data_type: 'mediumtext'
320   is_nullable: 1
321
322 URL for the item (MARC21 952$u)
323
324 =head2 itype
325
326   data_type: 'varchar'
327   is_nullable: 1
328   size: 10
329
330 foreign key from the itemtypes table defining the type for this item (MARC21 952$y)
331
332 =head2 more_subfields_xml
333
334   data_type: 'longtext'
335   is_nullable: 1
336
337 additional 952 subfields in XML format
338
339 =head2 enumchron
340
341   data_type: 'mediumtext'
342   is_nullable: 1
343
344 serial enumeration/chronology for the item (MARC21 952$h)
345
346 =head2 copynumber
347
348   data_type: 'varchar'
349   is_nullable: 1
350   size: 32
351
352 copy number (MARC21 952$t)
353
354 =head2 stocknumber
355
356   data_type: 'varchar'
357   is_nullable: 1
358   size: 32
359
360 inventory number (MARC21 952$i)
361
362 =head2 new_status
363
364   data_type: 'varchar'
365   is_nullable: 1
366   size: 32
367
368 'new' value, you can put whatever free-text information. This field is intented to be managed by the automatic_item_modification_by_age cronjob.
369
370 =head2 exclude_from_local_holds_priority
371
372   data_type: 'tinyint'
373   is_nullable: 1
374
375 Exclude this item from local holds priority
376
377 =cut
378
379 __PACKAGE__->add_columns(
380   "itemnumber",
381   { data_type => "integer", is_auto_increment => 1, is_nullable => 0 },
382   "biblionumber",
383   {
384     data_type      => "integer",
385     default_value  => 0,
386     is_foreign_key => 1,
387     is_nullable    => 0,
388   },
389   "biblioitemnumber",
390   {
391     data_type      => "integer",
392     default_value  => 0,
393     is_foreign_key => 1,
394     is_nullable    => 0,
395   },
396   "barcode",
397   { data_type => "varchar", is_nullable => 1, size => 20 },
398   "dateaccessioned",
399   { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
400   "booksellerid",
401   { data_type => "longtext", is_nullable => 1 },
402   "homebranch",
403   { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 },
404   "price",
405   { data_type => "decimal", is_nullable => 1, size => [8, 2] },
406   "replacementprice",
407   { data_type => "decimal", is_nullable => 1, size => [8, 2] },
408   "replacementpricedate",
409   { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
410   "datelastborrowed",
411   { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
412   "datelastseen",
413   { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
414   "stack",
415   { data_type => "tinyint", is_nullable => 1 },
416   "notforloan",
417   { data_type => "tinyint", default_value => 0, is_nullable => 0 },
418   "damaged",
419   { data_type => "tinyint", default_value => 0, is_nullable => 0 },
420   "damaged_on",
421   {
422     data_type => "datetime",
423     datetime_undef_if_invalid => 1,
424     is_nullable => 1,
425   },
426   "itemlost",
427   { data_type => "tinyint", default_value => 0, is_nullable => 0 },
428   "itemlost_on",
429   {
430     data_type => "datetime",
431     datetime_undef_if_invalid => 1,
432     is_nullable => 1,
433   },
434   "withdrawn",
435   { data_type => "tinyint", default_value => 0, is_nullable => 0 },
436   "withdrawn_on",
437   {
438     data_type => "datetime",
439     datetime_undef_if_invalid => 1,
440     is_nullable => 1,
441   },
442   "itemcallnumber",
443   { data_type => "varchar", is_nullable => 1, size => 255 },
444   "coded_location_qualifier",
445   { data_type => "varchar", is_nullable => 1, size => 10 },
446   "issues",
447   { data_type => "smallint", default_value => 0, is_nullable => 1 },
448   "renewals",
449   { data_type => "smallint", is_nullable => 1 },
450   "reserves",
451   { data_type => "smallint", is_nullable => 1 },
452   "restricted",
453   { data_type => "tinyint", is_nullable => 1 },
454   "itemnotes",
455   { data_type => "longtext", is_nullable => 1 },
456   "itemnotes_nonpublic",
457   { data_type => "longtext", is_nullable => 1 },
458   "holdingbranch",
459   { data_type => "varchar", is_foreign_key => 1, is_nullable => 1, size => 10 },
460   "timestamp",
461   {
462     data_type => "timestamp",
463     datetime_undef_if_invalid => 1,
464     default_value => \"current_timestamp",
465     is_nullable => 0,
466   },
467   "location",
468   { data_type => "varchar", is_nullable => 1, size => 80 },
469   "permanent_location",
470   { data_type => "varchar", is_nullable => 1, size => 80 },
471   "onloan",
472   { data_type => "date", datetime_undef_if_invalid => 1, is_nullable => 1 },
473   "cn_source",
474   { data_type => "varchar", is_nullable => 1, size => 10 },
475   "cn_sort",
476   { data_type => "varchar", is_nullable => 1, size => 255 },
477   "ccode",
478   { data_type => "varchar", is_nullable => 1, size => 80 },
479   "materials",
480   { data_type => "mediumtext", is_nullable => 1 },
481   "uri",
482   { data_type => "mediumtext", is_nullable => 1 },
483   "itype",
484   { data_type => "varchar", is_nullable => 1, size => 10 },
485   "more_subfields_xml",
486   { data_type => "longtext", is_nullable => 1 },
487   "enumchron",
488   { data_type => "mediumtext", is_nullable => 1 },
489   "copynumber",
490   { data_type => "varchar", is_nullable => 1, size => 32 },
491   "stocknumber",
492   { data_type => "varchar", is_nullable => 1, size => 32 },
493   "new_status",
494   { data_type => "varchar", is_nullable => 1, size => 32 },
495   "exclude_from_local_holds_priority",
496   { data_type => "tinyint", is_nullable => 1 },
497 );
498
499 =head1 PRIMARY KEY
500
501 =over 4
502
503 =item * L</itemnumber>
504
505 =back
506
507 =cut
508
509 __PACKAGE__->set_primary_key("itemnumber");
510
511 =head1 UNIQUE CONSTRAINTS
512
513 =head2 C<itembarcodeidx>
514
515 =over 4
516
517 =item * L</barcode>
518
519 =back
520
521 =cut
522
523 __PACKAGE__->add_unique_constraint("itembarcodeidx", ["barcode"]);
524
525 =head1 RELATIONS
526
527 =head2 accountlines
528
529 Type: has_many
530
531 Related object: L<Koha::Schema::Result::Accountline>
532
533 =cut
534
535 __PACKAGE__->has_many(
536   "accountlines",
537   "Koha::Schema::Result::Accountline",
538   { "foreign.itemnumber" => "self.itemnumber" },
539   { cascade_copy => 0, cascade_delete => 0 },
540 );
541
542 =head2 article_requests
543
544 Type: has_many
545
546 Related object: L<Koha::Schema::Result::ArticleRequest>
547
548 =cut
549
550 __PACKAGE__->has_many(
551   "article_requests",
552   "Koha::Schema::Result::ArticleRequest",
553   { "foreign.itemnumber" => "self.itemnumber" },
554   { cascade_copy => 0, cascade_delete => 0 },
555 );
556
557 =head2 biblioitemnumber
558
559 Type: belongs_to
560
561 Related object: L<Koha::Schema::Result::Biblioitem>
562
563 =cut
564
565 __PACKAGE__->belongs_to(
566   "biblioitemnumber",
567   "Koha::Schema::Result::Biblioitem",
568   { biblioitemnumber => "biblioitemnumber" },
569   { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
570 );
571
572 =head2 biblionumber
573
574 Type: belongs_to
575
576 Related object: L<Koha::Schema::Result::Biblio>
577
578 =cut
579
580 __PACKAGE__->belongs_to(
581   "biblionumber",
582   "Koha::Schema::Result::Biblio",
583   { biblionumber => "biblionumber" },
584   { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
585 );
586
587 =head2 branchtransfers
588
589 Type: has_many
590
591 Related object: L<Koha::Schema::Result::Branchtransfer>
592
593 =cut
594
595 __PACKAGE__->has_many(
596   "branchtransfers",
597   "Koha::Schema::Result::Branchtransfer",
598   { "foreign.itemnumber" => "self.itemnumber" },
599   { cascade_copy => 0, cascade_delete => 0 },
600 );
601
602 =head2 club_holds
603
604 Type: has_many
605
606 Related object: L<Koha::Schema::Result::ClubHold>
607
608 =cut
609
610 __PACKAGE__->has_many(
611   "club_holds",
612   "Koha::Schema::Result::ClubHold",
613   { "foreign.item_id" => "self.itemnumber" },
614   { cascade_copy => 0, cascade_delete => 0 },
615 );
616
617 =head2 course_item
618
619 Type: might_have
620
621 Related object: L<Koha::Schema::Result::CourseItem>
622
623 =cut
624
625 __PACKAGE__->might_have(
626   "course_item",
627   "Koha::Schema::Result::CourseItem",
628   { "foreign.itemnumber" => "self.itemnumber" },
629   { cascade_copy => 0, cascade_delete => 0 },
630 );
631
632 =head2 cover_images
633
634 Type: has_many
635
636 Related object: L<Koha::Schema::Result::CoverImage>
637
638 =cut
639
640 __PACKAGE__->has_many(
641   "cover_images",
642   "Koha::Schema::Result::CoverImage",
643   { "foreign.itemnumber" => "self.itemnumber" },
644   { cascade_copy => 0, cascade_delete => 0 },
645 );
646
647 =head2 creator_batches
648
649 Type: has_many
650
651 Related object: L<Koha::Schema::Result::CreatorBatch>
652
653 =cut
654
655 __PACKAGE__->has_many(
656   "creator_batches",
657   "Koha::Schema::Result::CreatorBatch",
658   { "foreign.item_number" => "self.itemnumber" },
659   { cascade_copy => 0, cascade_delete => 0 },
660 );
661
662 =head2 hold_fill_target
663
664 Type: might_have
665
666 Related object: L<Koha::Schema::Result::HoldFillTarget>
667
668 =cut
669
670 __PACKAGE__->might_have(
671   "hold_fill_target",
672   "Koha::Schema::Result::HoldFillTarget",
673   { "foreign.itemnumber" => "self.itemnumber" },
674   { cascade_copy => 0, cascade_delete => 0 },
675 );
676
677 =head2 holdingbranch
678
679 Type: belongs_to
680
681 Related object: L<Koha::Schema::Result::Branch>
682
683 =cut
684
685 __PACKAGE__->belongs_to(
686   "holdingbranch",
687   "Koha::Schema::Result::Branch",
688   { branchcode => "holdingbranch" },
689   {
690     is_deferrable => 1,
691     join_type     => "LEFT",
692     on_delete     => "RESTRICT",
693     on_update     => "CASCADE",
694   },
695 );
696
697 =head2 homebranch
698
699 Type: belongs_to
700
701 Related object: L<Koha::Schema::Result::Branch>
702
703 =cut
704
705 __PACKAGE__->belongs_to(
706   "homebranch",
707   "Koha::Schema::Result::Branch",
708   { branchcode => "homebranch" },
709   {
710     is_deferrable => 1,
711     join_type     => "LEFT",
712     on_delete     => "RESTRICT",
713     on_update     => "CASCADE",
714   },
715 );
716
717 =head2 issue
718
719 Type: might_have
720
721 Related object: L<Koha::Schema::Result::Issue>
722
723 =cut
724
725 __PACKAGE__->might_have(
726   "issue",
727   "Koha::Schema::Result::Issue",
728   { "foreign.itemnumber" => "self.itemnumber" },
729   { cascade_copy => 0, cascade_delete => 0 },
730 );
731
732 =head2 items_last_borrower
733
734 Type: might_have
735
736 Related object: L<Koha::Schema::Result::ItemsLastBorrower>
737
738 =cut
739
740 __PACKAGE__->might_have(
741   "items_last_borrower",
742   "Koha::Schema::Result::ItemsLastBorrower",
743   { "foreign.itemnumber" => "self.itemnumber" },
744   { cascade_copy => 0, cascade_delete => 0 },
745 );
746
747 =head2 linktrackers
748
749 Type: has_many
750
751 Related object: L<Koha::Schema::Result::Linktracker>
752
753 =cut
754
755 __PACKAGE__->has_many(
756   "linktrackers",
757   "Koha::Schema::Result::Linktracker",
758   { "foreign.itemnumber" => "self.itemnumber" },
759   { cascade_copy => 0, cascade_delete => 0 },
760 );
761
762 =head2 old_issues
763
764 Type: has_many
765
766 Related object: L<Koha::Schema::Result::OldIssue>
767
768 =cut
769
770 __PACKAGE__->has_many(
771   "old_issues",
772   "Koha::Schema::Result::OldIssue",
773   { "foreign.itemnumber" => "self.itemnumber" },
774   { cascade_copy => 0, cascade_delete => 0 },
775 );
776
777 =head2 old_reserves
778
779 Type: has_many
780
781 Related object: L<Koha::Schema::Result::OldReserve>
782
783 =cut
784
785 __PACKAGE__->has_many(
786   "old_reserves",
787   "Koha::Schema::Result::OldReserve",
788   { "foreign.itemnumber" => "self.itemnumber" },
789   { cascade_copy => 0, cascade_delete => 0 },
790 );
791
792 =head2 recalls
793
794 Type: has_many
795
796 Related object: L<Koha::Schema::Result::Recall>
797
798 =cut
799
800 __PACKAGE__->has_many(
801   "recalls",
802   "Koha::Schema::Result::Recall",
803   { "foreign.item_id" => "self.itemnumber" },
804   { cascade_copy => 0, cascade_delete => 0 },
805 );
806
807 =head2 reserves
808
809 Type: has_many
810
811 Related object: L<Koha::Schema::Result::Reserve>
812
813 =cut
814
815 __PACKAGE__->has_many(
816   "reserves",
817   "Koha::Schema::Result::Reserve",
818   { "foreign.itemnumber" => "self.itemnumber" },
819   { cascade_copy => 0, cascade_delete => 0 },
820 );
821
822 =head2 return_claims
823
824 Type: has_many
825
826 Related object: L<Koha::Schema::Result::ReturnClaim>
827
828 =cut
829
830 __PACKAGE__->has_many(
831   "return_claims",
832   "Koha::Schema::Result::ReturnClaim",
833   { "foreign.itemnumber" => "self.itemnumber" },
834   { cascade_copy => 0, cascade_delete => 0 },
835 );
836
837 =head2 serialitem
838
839 Type: might_have
840
841 Related object: L<Koha::Schema::Result::Serialitem>
842
843 =cut
844
845 __PACKAGE__->might_have(
846   "serialitem",
847   "Koha::Schema::Result::Serialitem",
848   { "foreign.itemnumber" => "self.itemnumber" },
849   { cascade_copy => 0, cascade_delete => 0 },
850 );
851
852 =head2 stockrotationitem
853
854 Type: might_have
855
856 Related object: L<Koha::Schema::Result::Stockrotationitem>
857
858 =cut
859
860 __PACKAGE__->might_have(
861   "stockrotationitem",
862   "Koha::Schema::Result::Stockrotationitem",
863   { "foreign.itemnumber_id" => "self.itemnumber" },
864   { cascade_copy => 0, cascade_delete => 0 },
865 );
866
867 =head2 tmp_holdsqueues
868
869 Type: has_many
870
871 Related object: L<Koha::Schema::Result::TmpHoldsqueue>
872
873 =cut
874
875 __PACKAGE__->has_many(
876   "tmp_holdsqueues",
877   "Koha::Schema::Result::TmpHoldsqueue",
878   { "foreign.itemnumber" => "self.itemnumber" },
879   { cascade_copy => 0, cascade_delete => 0 },
880 );
881
882
883 # Created by DBIx::Class::Schema::Loader v0.07046 @ 2022-03-28 22:07:59
884 # DO NOT MODIFY THIS OR ANYTHING ABOVE! md5sum:28f9/7z3Nq5C4qzBMyceiQ
885
886 __PACKAGE__->belongs_to( biblioitem => "Koha::Schema::Result::Biblioitem", "biblioitemnumber" );
887
888 __PACKAGE__->belongs_to(
889   "biblio",
890   "Koha::Schema::Result::Biblio",
891   { biblionumber => "biblionumber" },
892   { is_deferrable => 1, on_delete => "CASCADE", on_update => "CASCADE" },
893 );
894
895 __PACKAGE__->add_columns(
896     '+exclude_from_local_holds_priority' => { is_boolean => 1 },
897 );
898
899 # Relationship with orders via the aqorders_item table that not have foreign keys
900 __PACKAGE__->has_many(
901   "aqorders_item",
902   "Koha::Schema::Result::AqordersItem",
903   { "foreign.itemnumber" => "self.itemnumber" },
904   { cascade_copy => 0, cascade_delete => 0 },
905 );
906 __PACKAGE__->many_to_many(
907   "item_orders",
908   "aqorders_item",
909   "ordernumber",
910 );
911
912 use C4::Context;
913 sub effective_itemtype {
914     my ( $self ) = @_;
915
916     my $pref = C4::Context->preference('item-level_itypes');
917     if ( $pref && $self->itype() ) {
918         return $self->itype();
919     } else {
920         warn "item-level_itypes set but no itemtype set for item (".$self->itemnumber.")"
921           if $pref;
922         return $self->biblioitemnumber()->itemtype();
923     }
924 }
925
926 1;