Lines 1133-1141
sub GetItemsForInventory {
Link Here
|
1133 |
|
1133 |
|
1134 |
# Auth values |
1134 |
# Auth values |
1135 |
foreach (keys %$row) { |
1135 |
foreach (keys %$row) { |
|
|
1136 |
my $new = ''; |
1136 |
if (defined($avmapping->{"items.$_,".$row->{'frameworkcode'}.",".$row->{$_}})) { |
1137 |
if (defined($avmapping->{"items.$_,".$row->{'frameworkcode'}.",".$row->{$_}})) { |
1137 |
$row->{$_} = $avmapping->{"items.$_,".$row->{'frameworkcode'}.",".$row->{$_}}; |
1138 |
### WILL BE SET BELOW $row->{$_} = $avmapping->{"items.$_,".$row->{'frameworkcode'}.",".$row->{$_}}; |
|
|
1139 |
$new = $avmapping->{"items.$_,".$row->{'frameworkcode'}.",".$row->{$_}}; |
1138 |
} |
1140 |
} |
|
|
1141 |
|
1142 |
#######TESTING WITH OLD CODE |
1143 |
#If the koha field is mapped to a marc fielda |
1144 |
my $old = ''; |
1145 |
my ($f, $sf) = GetMarcFromKohaField("items.$_", $row->{'frameworkcode'}); |
1146 |
if ($f and $sf) { |
1147 |
# We replace the code with it's description |
1148 |
my $authvals = C4::Koha::GetKohaAuthorisedValuesFromField($f, $sf, $row->{'frameworkcode'}); |
1149 |
if ( defined ($authvals->{$row->{$_}}) ) { |
1150 |
### WILL BE SET BELOW $row->{$_} = $authvals->{$row->{$_}} ; |
1151 |
$old = $authvals->{$row->{$_}} ; |
1152 |
} |
1153 |
} |
1154 |
#######TEST HERE OUTPUT |
1155 |
#warn "$new -- $old" if ( $new || $old ); |
1156 |
$row->{$_} = $new if ($new); |
1157 |
#$row->{$_} = $old if ($old); |
1139 |
} |
1158 |
} |
1140 |
push @results, $row; |
1159 |
push @results, $row; |
1141 |
} |
1160 |
} |
1142 |
- |
|
|