Bug 11550: Add UT for C4::Acquisition::GetOrder
[koha_fer] / C4 / Record.pm
index e727eb4..adb0c81 100644 (file)
@@ -310,9 +310,9 @@ sub _transformWithStylesheet {
     my $xslt = XML::LibXSLT->new();
     my $source = $parser->parse_string($xmlrecord);
     my $style_doc = $parser->parse_file($xslfile);
-    my $stylesheet = $xslt->parse_stylesheet($style_doc);
-    my $results = $stylesheet->transform($source);
-    my $newxmlrecord = $stylesheet->output_string($results);
+    my $style_sheet = $xslt->parse_stylesheet($style_doc);
+    my $results = $style_sheet->transform($source);
+    my $newxmlrecord = $style_sheet->output_string($results);
     return ($newxmlrecord);
 }
 
@@ -461,7 +461,7 @@ sub marcrecord2csv {
     $csv->sep_char($csvseparator);
 
     # Getting the marcfields
-    my $marcfieldslist = $profile->{marcfields};
+    my $marcfieldslist = $profile->{content};
 
     # Getting the marcfields as an array
     my @marcfieldsarray = split('\|', $marcfieldslist);
@@ -702,13 +702,13 @@ sub marc2bibtex {
            author    => $author,
            title     => $record->subfield("245", "a") || "",
            editor    => $record->subfield("260", "f") || "",
-           publisher => $record->subfield("260", "b") || "",
-           year      => $record->subfield("260", "c") || $record->subfield("260", "g") || "",
+        publisher => $record->subfield("264", "b") || $record->subfield("260", "b") || "",
+        year      => $record->subfield("264", "c") || $record->subfield("260", "c") || $record->subfield("260", "g") || "",
 
            # Optional
            # unimarc to marc21 specification says not to convert 200$v to marc21
            series  =>  $record->subfield("490", "a") || "",
-           address =>  $record->subfield("260", "a") || "",
+        address =>  $record->subfield("264", "a") || $record->subfield("260", "a") || "",
            edition =>  $record->subfield("250", "a") || "",
            note    =>  $record->subfield("500", "a") || "",
            url     =>  $record->subfield("856", "u") || ""