Lines 241-247
sub _create_basket_for_file {
Link Here
|
241 |
|
241 |
|
242 |
my $basketno = NewBasket( |
242 |
my $basketno = NewBasket( |
243 |
$vendor_id, 0, $basketname, q{}, |
243 |
$vendor_id, 0, $basketname, q{}, |
244 |
q{} . q{} |
244 |
q{}, q{}, q{}, q{}, 0, 'ordering' |
245 |
); |
245 |
); |
246 |
|
246 |
|
247 |
return $basketno; |
247 |
return $basketno; |
Lines 608-613
sub add_items_from_import_record {
Link Here
|
608 |
}); |
608 |
}); |
609 |
|
609 |
|
610 |
Used by the cronjob to detect whether a file matches the account and should be processed |
610 |
Used by the cronjob to detect whether a file matches the account and should be processed |
|
|
611 |
This method only checks the first record in the file. |
611 |
|
612 |
|
612 |
=cut |
613 |
=cut |
613 |
|
614 |
|
Lines 1229-1248
sub _create_item_fields_from_syspref {
Link Here
|
1229 |
my $marc_fields_to_order = $args->{marc_fields_to_order}; |
1230 |
my $marc_fields_to_order = $args->{marc_fields_to_order}; |
1230 |
my $budget_id = $args->{budget_id}; |
1231 |
my $budget_id = $args->{budget_id}; |
1231 |
|
1232 |
|
1232 |
my @homebranches = (); |
1233 |
my @homebranches = (); |
1233 |
my @holdingbranches = (); |
1234 |
my @holdingbranches = (); |
1234 |
my @itypes = (); |
1235 |
my @itypes = (); |
1235 |
my @nonpublic_notes = (); |
1236 |
my @nonpublic_notes = (); |
1236 |
my @public_notes = (); |
1237 |
my @public_notes = (); |
1237 |
my @locs = (); |
1238 |
my @locs = (); |
1238 |
my @ccodes = (); |
1239 |
my @ccodes = (); |
1239 |
my @notforloans = (); |
1240 |
my @notforloans = (); |
1240 |
my @uris = (); |
1241 |
my @uris = (); |
1241 |
my @copynos = (); |
1242 |
my @copynos = (); |
1242 |
my @budget_codes = (); |
1243 |
my @budget_codes = (); |
1243 |
my @itemprices = (); |
1244 |
my @itemprices = (); |
1244 |
my @replacementprices = (); |
1245 |
my @replacementprices = (); |
1245 |
my @itemcallnumbers = (); |
1246 |
my @itemcallnumbers = (); |
|
|
1247 |
my @coded_location_qualifiers = (); |
1248 |
my @barcodes = (); |
1249 |
my @enumchrons = (); |
1246 |
|
1250 |
|
1247 |
foreach my $infoset (@$marc_item_fields_to_order) { |
1251 |
foreach my $infoset (@$marc_item_fields_to_order) { |
1248 |
my $quantity = $infoset->{quantity} || 1; |
1252 |
my $quantity = $infoset->{quantity} || 1; |
Lines 1264-1311
sub _create_item_fields_from_syspref {
Link Here
|
1264 |
$item_budget_id = $budget_id; |
1268 |
$item_budget_id = $budget_id; |
1265 |
} |
1269 |
} |
1266 |
|
1270 |
|
1267 |
push @homebranches, $infoset->{homebranch}; |
1271 |
push @homebranches, $infoset->{homebranch}; |
1268 |
push @holdingbranches, $infoset->{holdingbranch}; |
1272 |
push @holdingbranches, $infoset->{holdingbranch}; |
1269 |
push @itypes, $infoset->{itype}; |
1273 |
push @itypes, $infoset->{itype}; |
1270 |
push @nonpublic_notes, $infoset->{nonpublic_note}; |
1274 |
push @nonpublic_notes, $infoset->{nonpublic_note}; |
1271 |
push @public_notes, $infoset->{public_note}; |
1275 |
push @public_notes, $infoset->{public_note}; |
1272 |
push @locs, $infoset->{loc}; |
1276 |
push @locs, $infoset->{loc}; |
1273 |
push @ccodes, $infoset->{ccode}; |
1277 |
push @ccodes, $infoset->{ccode}; |
1274 |
push @notforloans, $infoset->{notforloan}; |
1278 |
push @notforloans, $infoset->{notforloan}; |
1275 |
push @uris, $infoset->{uri}; |
1279 |
push @uris, $infoset->{uri}; |
1276 |
push @copynos, $infoset->{copyno}; |
1280 |
push @copynos, $infoset->{copyno}; |
1277 |
push @budget_codes, $item_budget_id; |
1281 |
push @budget_codes, $item_budget_id; |
1278 |
push @itemprices, $infoset->{price}; |
1282 |
push @itemprices, $infoset->{price}; |
1279 |
push @replacementprices, $infoset->{replacementprice}; |
1283 |
push @replacementprices, $infoset->{replacementprice}; |
1280 |
push @itemcallnumbers, $infoset->{itemcallnumber}; |
1284 |
push @itemcallnumbers, $infoset->{itemcallnumber}; |
|
|
1285 |
push @coded_location_qualifiers, $infoset->{coded_location_qualifier}; |
1286 |
push @barcodes, $infoset->{barcode}; |
1287 |
push @enumchrons, $infoset->{enumchron}; |
1281 |
} |
1288 |
} |
1282 |
} |
1289 |
} |
1283 |
|
1290 |
|
1284 |
my $item_fields = { |
1291 |
my $item_fields = { |
1285 |
quantity => scalar(@homebranches), |
1292 |
quantity => scalar(@homebranches), |
1286 |
homebranches => \@homebranches, |
1293 |
homebranches => \@homebranches, |
1287 |
holdingbranches => \@holdingbranches, |
1294 |
holdingbranches => \@holdingbranches, |
1288 |
itypes => \@itypes, |
1295 |
itypes => \@itypes, |
1289 |
nonpublic_notes => \@nonpublic_notes, |
1296 |
nonpublic_notes => \@nonpublic_notes, |
1290 |
public_notes => \@public_notes, |
1297 |
public_notes => \@public_notes, |
1291 |
locs => \@locs, |
1298 |
locs => \@locs, |
1292 |
ccodes => \@ccodes, |
1299 |
ccodes => \@ccodes, |
1293 |
notforloans => \@notforloans, |
1300 |
notforloans => \@notforloans, |
1294 |
uris => \@uris, |
1301 |
uris => \@uris, |
1295 |
copynos => \@copynos, |
1302 |
copynos => \@copynos, |
1296 |
budget_codes => \@budget_codes, |
1303 |
budget_codes => \@budget_codes, |
1297 |
itemprices => \@itemprices, |
1304 |
itemprices => \@itemprices, |
1298 |
replacementprices => \@replacementprices, |
1305 |
replacementprices => \@replacementprices, |
1299 |
itemcallnumbers => \@itemcallnumbers, |
1306 |
itemcallnumbers => \@itemcallnumbers, |
1300 |
c_quantity => $marc_fields_to_order->{quantity}, |
1307 |
coded_location_qualifiers => \@coded_location_qualifiers, |
1301 |
c_budget_code => $marc_fields_to_order->{budget_code}, |
1308 |
barcodes => \@barcodes, |
1302 |
c_price => $marc_fields_to_order->{price}, |
1309 |
enumchrons => \@enumchrons, |
1303 |
c_discount => $marc_fields_to_order->{discount}, |
1310 |
c_quantity => $marc_fields_to_order->{quantity}, |
1304 |
c_sort1 => $marc_fields_to_order->{sort1}, |
1311 |
c_budget_code => $marc_fields_to_order->{budget_code}, |
1305 |
c_sort2 => $marc_fields_to_order->{sort2}, |
1312 |
c_price => $marc_fields_to_order->{price}, |
|
|
1313 |
c_discount => $marc_fields_to_order->{discount}, |
1314 |
c_sort1 => $marc_fields_to_order->{sort1}, |
1315 |
c_sort2 => $marc_fields_to_order->{sort2}, |
1306 |
}; |
1316 |
}; |
1307 |
|
1317 |
|
1308 |
return $item_fields; |
1318 |
return $item_fields; |
1309 |
} |
1319 |
} |
1310 |
|
1320 |
|
|
|
1321 |
|
1311 |
1; |
1322 |
1; |