Revision 445ac52b
Von G. Richardson vor mehr als 4 Jahren hinzugefügt
t/bank/bank_transactions.t | ||
---|---|---|
34 | 34 |
my ($currency); |
35 | 35 |
my ($ar_chart,$bank,$ar_amount_chart, $ap_chart, $ap_amount_chart); |
36 | 36 |
my ($ar_transaction, $ap_transaction); |
37 |
|
|
38 |
my $dt = DateTime->new(year => 2019, month => 1, day => 12); |
|
39 |
my $dt_5 = DateTime->new(year => 2019, month => 1, day => 17); |
|
40 |
my $dt_10 = DateTime->new(year => 2019, month => 1, day => 22); |
|
37 |
my ($dt, $dt_5, $dt_10, $year); |
|
41 | 38 |
|
42 | 39 |
sub clear_up { |
43 | 40 |
|
... | ... | |
120 | 117 |
|
121 | 118 |
clear_up(); |
122 | 119 |
|
120 |
$year = DateTime->today_local->year; |
|
121 |
$year = 2019 if $year == 2020; # use year 2019 in 2020, because of tax rate change in Germany |
|
122 |
$dt = DateTime->new(year => $year, month => 1, day => 12); |
|
123 |
$dt_5 = $dt->clone->add(days => 5); |
|
124 |
$dt_10 = $dt->clone->add(days => 10); |
|
123 | 125 |
|
124 | 126 |
$tax = SL::DB::Manager::Tax->find_by(taxkey => 3, rate => 0.19, %{ $params{tax} }) || croak "No tax"; |
125 | 127 |
$tax7 = SL::DB::Manager::Tax->find_by(taxkey => 2, rate => 0.07) || croak "No tax for 7\%"; |
Auch abrufbar als: Unified diff
bank_transactions.t - Test Jahr 2019 in 2020 benutzen