Lines 849-855
sub parse_input_into_order_line_fields {
Link Here
|
849 |
my $fields = $args->{fields}; |
849 |
my $fields = $args->{fields}; |
850 |
my $marcrecord = $args->{marcrecord}; |
850 |
my $marcrecord = $args->{marcrecord}; |
851 |
|
851 |
|
852 |
my $quantity = $fields->{quantity} || 1; |
852 |
my $quantity = $fields->{quantity} || $fields->{c_quantity} || 1; |
853 |
my @homebranches = $fields->{homebranches} ? @{ $fields->{homebranches} } : (); |
853 |
my @homebranches = $fields->{homebranches} ? @{ $fields->{homebranches} } : (); |
854 |
my @holdingbranches = $fields->{holdingbranches} ? @{ $fields->{holdingbranches} } : (); |
854 |
my @holdingbranches = $fields->{holdingbranches} ? @{ $fields->{holdingbranches} } : (); |
855 |
my @itypes = $fields->{itypes} ? @{ $fields->{itypes} } : (); |
855 |
my @itypes = $fields->{itypes} ? @{ $fields->{itypes} } : (); |
Lines 996-1004
sub create_items_and_generate_order_hash {
Link Here
|
996 |
for ( my $i = 0 ; $i < $loop_limit ; $i++ ) { |
996 |
for ( my $i = 0 ; $i < $loop_limit ; $i++ ) { |
997 |
$budget_ids[$i] = $budget_id if !$budget_ids[$i]; # Use default budget if no budget provided |
997 |
$budget_ids[$i] = $budget_id if !$budget_ids[$i]; # Use default budget if no budget provided |
998 |
$budget_hash->{ $budget_ids[$i] }->{quantity} += 1; |
998 |
$budget_hash->{ $budget_ids[$i] }->{quantity} += 1; |
999 |
$budget_hash->{ $budget_ids[$i] }->{price} = @{ $fields->{price} }[$i]; |
999 |
$budget_hash->{ $budget_ids[$i] }->{price} = @{ $fields->{price} }[$i] || $fields->{c_price}; |
1000 |
$budget_hash->{ $budget_ids[$i] }->{replacementprice} = |
1000 |
$budget_hash->{ $budget_ids[$i] }->{replacementprice} = |
1001 |
@{ $fields->{replacementprice} }[$i]; |
1001 |
@{ $fields->{replacementprice} }[$i] || $fields->{c_replacement_price}; |
1002 |
$budget_hash->{ $budget_ids[$i] }->{itemnumbers} //= []; |
1002 |
$budget_hash->{ $budget_ids[$i] }->{itemnumbers} //= []; |
1003 |
push @{ $budget_hash->{ $budget_ids[$i] }->{itemnumbers} }, |
1003 |
push @{ $budget_hash->{ $budget_ids[$i] }->{itemnumbers} }, |
1004 |
$itemnumbers[$i]; |
1004 |
$itemnumbers[$i]; |
Lines 1242-1247
sub _create_item_fields_from_syspref {
Link Here
|
1242 |
c_discount => $marc_fields_to_order->{discount}, |
1242 |
c_discount => $marc_fields_to_order->{discount}, |
1243 |
c_sort1 => $marc_fields_to_order->{sort1}, |
1243 |
c_sort1 => $marc_fields_to_order->{sort1}, |
1244 |
c_sort2 => $marc_fields_to_order->{sort2}, |
1244 |
c_sort2 => $marc_fields_to_order->{sort2}, |
|
|
1245 |
c_replacement_price => $marc_fields_to_order->{replacementprice}, |
1245 |
}; |
1246 |
}; |
1246 |
|
1247 |
|
1247 |
return $item_fields; |
1248 |
return $item_fields; |
1248 |
- |
|
|