View | Details | Raw Unified | Return to bug 14061
Collapse All | Expand All

(-)a/C4/Items.pm (-1 / +1 lines)
Lines 1127-1133 sub GetItemsForInventory { Link Here
1127
        foreach (keys %$row) {
1127
        foreach (keys %$row) {
1128
            # If the koha field is mapped to a marc field
1128
            # If the koha field is mapped to a marc field
1129
            my ($f, $sf) = GetMarcFromKohaField("items.$_", $row->{'frameworkcode'});
1129
            my ($f, $sf) = GetMarcFromKohaField("items.$_", $row->{'frameworkcode'});
1130
            if ($f and $sf) {
1130
            if (defined $f and defined $sf) {
1131
                # We replace the code with it's description
1131
                # We replace the code with it's description
1132
                my $authvals = C4::Koha::GetKohaAuthorisedValuesFromField($f, $sf, $row->{'frameworkcode'});
1132
                my $authvals = C4::Koha::GetKohaAuthorisedValuesFromField($f, $sf, $row->{'frameworkcode'});
1133
                $row->{$_} = $authvals->{$row->{$_}} if defined $authvals->{$row->{$_}};
1133
                $row->{$_} = $authvals->{$row->{$_}} if defined $authvals->{$row->{$_}};
(-)a/tools/inventory.pl (-2 / +1 lines)
Lines 272-278 foreach my $item ( @scanned_items ) { Link Here
272
        # If the koha field is mapped to a marc field
272
        # If the koha field is mapped to a marc field
273
        my $fc = $item->{'frameworkcode'} || '';
273
        my $fc = $item->{'frameworkcode'} || '';
274
        my ($f, $sf) = GetMarcFromKohaField("items.$field", $fc);
274
        my ($f, $sf) = GetMarcFromKohaField("items.$field", $fc);
275
        if ($f and $sf) {
275
        if (defined $f and defined $sf) {
276
            # We replace the code with it's description
276
            # We replace the code with it's description
277
            my $authvals = C4::Koha::GetKohaAuthorisedValuesFromField($f, $sf, $fc);
277
            my $authvals = C4::Koha::GetKohaAuthorisedValuesFromField($f, $sf, $fc);
278
            if ($authvals and defined $item->{$field} and defined $authvals->{$item->{$field}}) {
278
            if ($authvals and defined $item->{$field} and defined $authvals->{$item->{$field}}) {
279
- 

Return to bug 14061