Lines 868-874
sub parse_input_into_order_line_fields {
Link Here
|
868 |
my @budget_codes = $fields->{budget_codes} ? @{ $fields->{budget_codes} } : (); |
868 |
my @budget_codes = $fields->{budget_codes} ? @{ $fields->{budget_codes} } : (); |
869 |
my $c_quantity = $fields->{c_quantity}; |
869 |
my $c_quantity = $fields->{c_quantity}; |
870 |
my $c_budget = GetBudgetByCode( $fields->{c_budget_code} ); |
870 |
my $c_budget = GetBudgetByCode( $fields->{c_budget_code} ); |
871 |
my $c_budget_code = $c_budget->{budget_id}; |
871 |
my $c_budget_id = $c_budget->{budget_id} || $fields->{c_budget_id}; |
872 |
my $c_discount = $fields->{c_discount}; |
872 |
my $c_discount = $fields->{c_discount}; |
873 |
my $c_sort1 = $fields->{c_sort1}; |
873 |
my $c_sort1 = $fields->{c_sort1}; |
874 |
my $c_sort2 = $fields->{c_sort2}; |
874 |
my $c_sort2 = $fields->{c_sort2}; |
Lines 878-886
sub parse_input_into_order_line_fields {
Link Here
|
878 |
# If using the cronjob, we want to default to the account budget if not mapped on the record |
878 |
# If using the cronjob, we want to default to the account budget if not mapped on the record |
879 |
if ( !$client && ( !@budget_codes || scalar(@budget_codes) == 0 ) ) { |
879 |
if ( !$client && ( !@budget_codes || scalar(@budget_codes) == 0 ) ) { |
880 |
for ( 1 .. $quantity ) { |
880 |
for ( 1 .. $quantity ) { |
881 |
my $item_budget = GetBudgetByCode($c_budget_code); |
881 |
if ($c_budget_id) { |
882 |
if ($item_budget) { |
882 |
push( @budget_codes, $c_budget_id ); |
883 |
push( @budget_codes, $item_budget->{budget_id} ); |
|
|
884 |
} else { |
883 |
} else { |
885 |
push( @budget_codes, $budget_id ); |
884 |
push( @budget_codes, $budget_id ); |
886 |
} |
885 |
} |
Lines 911-917
sub parse_input_into_order_line_fields {
Link Here
|
911 |
basket_id => $basket_id, |
910 |
basket_id => $basket_id, |
912 |
budget_id => $budget_id, |
911 |
budget_id => $budget_id, |
913 |
c_quantity => $c_quantity, |
912 |
c_quantity => $c_quantity, |
914 |
c_budget_code => $c_budget_code, |
913 |
c_budget_id => $c_budget_id, |
915 |
c_discount => $c_discount, |
914 |
c_discount => $c_discount, |
916 |
c_sort1 => $c_sort1, |
915 |
c_sort1 => $c_sort1, |
917 |
c_sort2 => $c_sort2, |
916 |
c_sort2 => $c_sort2, |
Lines 1062-1068
sub create_items_and_generate_order_hash {
Link Here
|
1062 |
basketno => $basket_id, |
1061 |
basketno => $basket_id, |
1063 |
quantity => $fields->{c_quantity}, |
1062 |
quantity => $fields->{c_quantity}, |
1064 |
branchcode => C4::Context->userenv()->{'branch'}, |
1063 |
branchcode => C4::Context->userenv()->{'branch'}, |
1065 |
budget_id => $fields->{c_budget_code}, |
1064 |
budget_id => $fields->{c_budget_id}, |
1066 |
uncertainprice => 1, |
1065 |
uncertainprice => 1, |
1067 |
sort1 => $fields->{c_sort1}, |
1066 |
sort1 => $fields->{c_sort1}, |
1068 |
sort2 => $fields->{c_sort2}, |
1067 |
sort2 => $fields->{c_sort2}, |
1069 |
- |
|
|