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

(-)a/C4/Budgets.pm (-1 / +1 lines)
Lines 1221-1227 sub CloneBudgetHierarchy { Link Here
1221
        my $tidy_budget =
1221
        my $tidy_budget =
1222
          { map { join( ' ', @columns ) =~ /$_/ ? ( $_ => $budget->{$_} ) : () }
1222
          { map { join( ' ', @columns ) =~ /$_/ ? ( $_ => $budget->{$_} ) : () }
1223
              keys %$budget };
1223
              keys %$budget };
1224
	delete $tidy_budget->{timestamp};
1224
        delete $tidy_budget->{timestamp};
1225
        my $new_budget_id = AddBudget(
1225
        my $new_budget_id = AddBudget(
1226
            {
1226
            {
1227
                %$tidy_budget,
1227
                %$tidy_budget,
(-)a/t/db_dependent/Budgets.t (-5 / +1 lines)
Lines 491-504 is($budget_period_cloned->{budget_period_description}, 'Budget Period Cloned', ' Link Here
491
491
492
my $budget_cloned = C4::Budgets::GetBudgets({ budget_period_id => $budget_period_id_cloned });
492
my $budget_cloned = C4::Budgets::GetBudgets({ budget_period_id => $budget_period_id_cloned });
493
my $test =  $budget_cloned->[0]->{timestamp};
493
my $test =  $budget_cloned->[0]->{timestamp};
494
warn $test;
495
my $budget_time = Koha::DateUtils::dt_from_string($test);
494
my $budget_time = Koha::DateUtils::dt_from_string($test);
496
my $local_time = Koha::DateUtils::dt_from_string();
495
my $local_time = Koha::DateUtils::dt_from_string();
497
warn $budget_time;
498
warn $local_time;
499
496
500
497
501
is(DateTime::compare($budget_time, $local_time), 0);
498
is(DateTime::compare($budget_time, $local_time), 0, "New budget got the right timestamp");
502
499
503
500
504
501
505
- 

Return to bug 15408