# NOTE: 'incremental' is the ONLY autoBarcode option available to those not using javascript
sub _increment_barcode {
my ($record, $frameworkcode) = @_;
- my ($tagfield,$tagsubfield) = &GetMarcFromKohaField("items.barcode",$frameworkcode);
+ my ($tagfield,$tagsubfield) = &GetMarcFromKohaField( "items.barcode" );
unless ($record->field($tagfield)->subfield($tagsubfield)) {
my $sth_barcode = $dbh->prepare("select max(abs(barcode)) from items");
$sth_barcode->execute;
my $item = shift;
# Getting item tag
- my ($tag, $subtag) = GetMarcFromKohaField("items.barcode", '');
+ my ($tag, $subtag) = GetMarcFromKohaField( "items.barcode" );
# Getting list of subfields to keep
my $subfieldsToUseWhenPrefill = C4::Context->preference('SubfieldsToUseWhenPrefill');
}
else {
# we have to clear the barcode field in the duplicate item record to make way for the new one generated by the javascript plugin
- my ($tagfield,$tagsubfield) = &GetMarcFromKohaField("items.barcode",$frameworkcode);
+ my ($tagfield,$tagsubfield) = &GetMarcFromKohaField( "items.barcode" );
my $fieldItem = $itemrecord->field($tagfield);
$itemrecord->delete_field($fieldItem);
$fieldItem->delete_subfields($tagsubfield);
my $barcodeobj = C4::Barcodes->new;
my $copynumber = $addedolditem->{'copynumber'};
my $oldbarcode = $addedolditem->{'barcode'};
- my ($tagfield,$tagsubfield) = &GetMarcFromKohaField("items.barcode",$frameworkcode);
- my ($copytagfield,$copytagsubfield) = &GetMarcFromKohaField("items.copynumber",$frameworkcode);
+ my ($tagfield,$tagsubfield) = &GetMarcFromKohaField( "items.barcode" );
+ my ($copytagfield,$copytagsubfield) = &GetMarcFromKohaField( "items.copynumber" );
# If there is a barcode and we can't find their new values, we can't add multiple copies
my $testbarcode;
}
else {
# we have to clear the barcode field in the duplicate item record to make way for the new one generated by the javascript plugin
- my ($tagfield,$tagsubfield) = &GetMarcFromKohaField("items.barcode",$frameworkcode);
+ my ($tagfield,$tagsubfield) = &GetMarcFromKohaField( "items.barcode" );
my $fieldItem = $itemrecord->field($tagfield);
$itemrecord->delete_field($fieldItem);
$fieldItem->delete_subfields($tagsubfield);
my %witness; #---- stores the list of subfields used at least once, with the "meaning" of the code
my @big_array;
#---- finds where items.itemnumber is stored
-my ( $itemtagfield, $itemtagsubfield) = &GetMarcFromKohaField("items.itemnumber", $frameworkcode);
-my ($branchtagfield, $branchtagsubfield) = &GetMarcFromKohaField("items.homebranch", $frameworkcode);
+my ( $itemtagfield, $itemtagsubfield) = &GetMarcFromKohaField( "items.itemnumber" );
+my ($branchtagfield, $branchtagsubfield) = &GetMarcFromKohaField( "items.homebranch" );
C4::Biblio::EmbedItemsInMarcBiblio({
marc_record => $temp,
biblionumber => $biblionumber });
biblionumber => $hostbiblionumber,
embed_items => 1 });
if ($hostrecord) {
- my ($itemfield, undef) = GetMarcFromKohaField( 'items.itemnumber', GetFrameworkCode($hostbiblionumber) );
+ my ($itemfield, undef) = GetMarcFromKohaField( 'items.itemnumber' );
foreach my $hostitem ($hostrecord->field($itemfield)){
if ($hostitem->subfield('9') eq $hostfield->subfield('9')){
push (@fields, $hostitem);
}
}
-my ($holdingbrtagf,$holdingbrtagsubf) = &GetMarcFromKohaField("items.holdingbranch",$frameworkcode);
+my ($holdingbrtagf,$holdingbrtagsubf) = &GetMarcFromKohaField( "items.holdingbranch" );
@big_array = sort {$a->{$holdingbrtagsubf} cmp $b->{$holdingbrtagsubf}} @big_array;
# now, construct template !