View | Details | Raw Unified | Return to bug 12482
Collapse All | Expand All

(-)a/admin/aqbudgetperiods.pl (-2 / +2 lines)
Lines 72-78 my $op = $input->param('op')||"else"; Link Here
72
72
73
# get only the columns of aqbudgetperiods in budget_period_hashref
73
# get only the columns of aqbudgetperiods in budget_period_hashref
74
my @columns = Koha::Database->new()->schema->source('Aqbudgetperiod')->columns;
74
my @columns = Koha::Database->new()->schema->source('Aqbudgetperiod')->columns;
75
my $budget_period_hashref = { map { join(' ',@columns) =~ /$_/ ? ( $_ => $input->param($_) )  : () } keys($input->Vars) } ;
75
my $budget_period_hashref = { map { join(' ',@columns) =~ /$_/ ? ( $_ => $input->param($_) )  : () } keys( %{$input->Vars()} ) } ;
76
$budget_period_hashref->{budget_period_startdate} = dt_from_string( $input->param('budget_period_startdate') );
76
$budget_period_hashref->{budget_period_startdate} = dt_from_string( $input->param('budget_period_startdate') );
77
$budget_period_hashref->{budget_period_enddate}   = dt_from_string( $input->param('budget_period_enddate') );
77
$budget_period_hashref->{budget_period_enddate}   = dt_from_string( $input->param('budget_period_enddate') );
78
78
Lines 222-228 elsif ( $op eq 'duplicate_budget' ){ Link Here
222
222
223
        # get only the columns of aqbudgets
223
        # get only the columns of aqbudgets
224
        my @columns = Koha::Database->new()->schema->source('Aqbudget')->columns;
224
        my @columns = Koha::Database->new()->schema->source('Aqbudget')->columns;
225
        my $new_entry = { map { join(' ',@columns) =~ /$_/ ? ( $_ => $$entry{$_} )  : () } keys($entry) };
225
        my $new_entry = { map { join(' ',@columns) =~ /$_/ ? ( $_ => $$entry{$_} )  : () } keys(%$entry) };
226
        # write it to db
226
        # write it to db
227
        my $new_id = AddBudget($new_entry);
227
        my $new_id = AddBudget($new_entry);
228
        $old_new{$old_id} = $new_id;
228
        $old_new{$old_id} = $new_id;
(-)a/admin/aqbudgets.pl (-2 / +1 lines)
Lines 71-77 my $num=FormatNumber; Link Here
71
71
72
# get only the columns of aqbudgets in budget_hash
72
# get only the columns of aqbudgets in budget_hash
73
my @columns = Koha::Database->new()->schema->source('Aqbudget')->columns;
73
my @columns = Koha::Database->new()->schema->source('Aqbudget')->columns;
74
my $budget_hash = { map { join(' ',@columns) =~ /$_/ ? ( $_ => $input->param($_) )  : () } keys($input->Vars) } ;
74
my $budget_hash = { map { join(' ',@columns) =~ /$_/ ? ( $_ => $input->param($_) )  : () } keys( %{$input->Vars()}) } ;
75
75
76
my $budget_id                 = $input->param('budget_id');
76
my $budget_id                 = $input->param('budget_id');
77
my $budget_period_id          = $input->param('budget_period_id');
77
my $budget_period_id          = $input->param('budget_period_id');
78
- 

Return to bug 12482