- #if it doesnt create it
- my $record = TransformKohaToMarc(
- {
- "biblio.title" => "$$orderinfo{title}",
- "biblio.author" => $$orderinfo{author} ? $$orderinfo{author} : "",
- "biblio.seriestitle" => $$orderinfo{series} ? $$orderinfo{series} : "",
- "biblioitems.isbn" => $$orderinfo{isbn} ? $$orderinfo{isbn} : "",
- "biblioitems.ean" => $$orderinfo{ean} ? $$orderinfo{ean} : "",
- "biblioitems.publishercode" => $$orderinfo{publishercode} ? $$orderinfo{publishercode} : "",
- "biblioitems.publicationyear" => $$orderinfo{publicationyear} ? $$orderinfo{publicationyear}: "",
- "biblio.copyrightdate" => $$orderinfo{publicationyear} ? $$orderinfo{publicationyear}: "",
- "biblioitems.itemtype" => $$orderinfo{itemtype} ? $$orderinfo{itemtype} : "",
- "biblioitems.editionstatement"=> $$orderinfo{editionstatement} ? $$orderinfo{editionstatement} : "",
- "aqorders.branchcode" => $$orderinfo{branchcode} ? $$orderinfo{branchcode} : "",
- "aqorders.quantity" => $$orderinfo{quantity} ? $$orderinfo{quantity} : "",
- "aqorders.listprice" => $$orderinfo{listprice} ? $$orderinfo{listprice} : "",
- "aqorders.uncertainprice" => $$orderinfo{uncertainprice} ? $$orderinfo{uncertainprice} : "",
- "aqorders.rrp" => $$orderinfo{rrp} ? $$orderinfo{rrp} : "",
- "aqorders.ecost" => $$orderinfo{ecost} ? $$orderinfo{ecost} : "",
- "aqorders.discount" => $$orderinfo{discount} ? $$orderinfo{discount} : "",
- });
+
+ my $record;
+ if ( $use_ACQ_framework ) {
+ my @tags = $input->multi_param('bib_tag');
+ my @subfields = $input->multi_param('bib_subfield');
+ my @field_values = $input->multi_param('bib_field_value');
+ my $xml = TransformHtmlToXml( \@tags, \@subfields, \@field_values );
+ $record=MARC::Record::new_from_xml($xml, 'UTF-8');
+ } else {
+ #if it doesn't create it
+ $record = TransformKohaToMarc(
+ {
+ "biblio.title" => "$$orderinfo{title}",
+ "biblio.author" => $$orderinfo{author} ? $$orderinfo{author} : "",
+ "biblio.seriestitle" => $$orderinfo{series} ? $$orderinfo{series} : "",
+ "biblioitems.isbn" => $$orderinfo{isbn} ? $$orderinfo{isbn} : "",
+ "biblioitems.ean" => $$orderinfo{ean} ? $$orderinfo{ean} : "",
+ "biblioitems.publishercode" => $$orderinfo{publishercode} ? $$orderinfo{publishercode} : "",
+ "biblioitems.publicationyear" => $$orderinfo{publicationyear} ? $$orderinfo{publicationyear}: "",
+ "biblio.copyrightdate" => $$orderinfo{publicationyear} ? $$orderinfo{publicationyear}: "",
+ "biblioitems.itemtype" => $$orderinfo{itemtype} ? $$orderinfo{itemtype} : "",
+ "biblioitems.editionstatement"=> $$orderinfo{editionstatement} ? $$orderinfo{editionstatement} : "",
+ });
+
+ }
+ C4::Acquisition::FillWithDefaultValues( $record );