line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Business::RO::TaxDeduction::Amount; |
2
|
|
|
|
|
|
|
$Business::RO::TaxDeduction::Amount::VERSION = '0.010'; |
3
|
|
|
|
|
|
|
# ABSTRACT: Personal deduction amount by year and number of persons |
4
|
|
|
|
|
|
|
|
5
|
3
|
|
|
3
|
|
93738
|
use 5.010001; |
|
3
|
|
|
|
|
12
|
|
6
|
3
|
|
|
3
|
|
499
|
use utf8; |
|
3
|
|
|
|
|
19
|
|
|
3
|
|
|
|
|
17
|
|
7
|
3
|
|
|
3
|
|
438
|
use Moo; |
|
3
|
|
|
|
|
9873
|
|
|
3
|
|
|
|
|
15
|
|
8
|
3
|
|
|
3
|
|
1844
|
use MooX::HandlesVia; |
|
3
|
|
|
|
|
6742
|
|
|
3
|
|
|
|
|
18
|
|
9
|
3
|
|
|
|
|
19
|
use Business::RO::TaxDeduction::Types qw( |
10
|
|
|
|
|
|
|
Int |
11
|
|
|
|
|
|
|
HashRef |
12
|
|
|
|
|
|
|
TaxPersons |
13
|
3
|
|
|
3
|
|
582
|
); |
|
3
|
|
|
|
|
7
|
|
14
|
|
|
|
|
|
|
with qw(Business::RO::TaxDeduction::Role::Utils); |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
has 'persons' => ( |
17
|
|
|
|
|
|
|
is => 'ro', |
18
|
|
|
|
|
|
|
isa => TaxPersons, |
19
|
|
|
|
|
|
|
required => 1, |
20
|
|
|
|
|
|
|
coerce => 1, |
21
|
|
|
|
|
|
|
default => sub { 0 }, |
22
|
|
|
|
|
|
|
); |
23
|
|
|
|
|
|
|
|
24
|
|
|
|
|
|
|
has '_deduction_map_2005' => ( |
25
|
|
|
|
|
|
|
is => 'ro', |
26
|
|
|
|
|
|
|
isa => HashRef, |
27
|
|
|
|
|
|
|
lazy => 1, |
28
|
|
|
|
|
|
|
default => sub { |
29
|
|
|
|
|
|
|
return { |
30
|
|
|
|
|
|
|
0 => 250, |
31
|
|
|
|
|
|
|
1 => 350, |
32
|
|
|
|
|
|
|
2 => 450, |
33
|
|
|
|
|
|
|
3 => 550, |
34
|
|
|
|
|
|
|
4 => 650, |
35
|
|
|
|
|
|
|
}; |
36
|
|
|
|
|
|
|
}, |
37
|
|
|
|
|
|
|
); |
38
|
|
|
|
|
|
|
|
39
|
|
|
|
|
|
|
has '_deduction_map_2016' => ( |
40
|
|
|
|
|
|
|
is => 'ro', |
41
|
|
|
|
|
|
|
isa => HashRef, |
42
|
|
|
|
|
|
|
lazy => 1, |
43
|
|
|
|
|
|
|
default => sub { |
44
|
|
|
|
|
|
|
return { |
45
|
|
|
|
|
|
|
0 => 300, |
46
|
|
|
|
|
|
|
1 => 400, |
47
|
|
|
|
|
|
|
2 => 500, |
48
|
|
|
|
|
|
|
3 => 600, |
49
|
|
|
|
|
|
|
4 => 800, |
50
|
|
|
|
|
|
|
}; |
51
|
|
|
|
|
|
|
}, |
52
|
|
|
|
|
|
|
); |
53
|
|
|
|
|
|
|
|
54
|
|
|
|
|
|
|
has '_deduction_map' => ( |
55
|
|
|
|
|
|
|
is => 'ro', |
56
|
|
|
|
|
|
|
handles_via => 'Hash', |
57
|
|
|
|
|
|
|
lazy => 1, |
58
|
|
|
|
|
|
|
default => sub { |
59
|
|
|
|
|
|
|
my $self = shift; |
60
|
|
|
|
|
|
|
my $year = $self->base_year; |
61
|
|
|
|
|
|
|
my $meth = "_deduction_map_$year"; |
62
|
|
|
|
|
|
|
return $self->$meth; |
63
|
|
|
|
|
|
|
}, |
64
|
|
|
|
|
|
|
handles => { |
65
|
|
|
|
|
|
|
_get_deduction_for => 'get', |
66
|
|
|
|
|
|
|
} |
67
|
|
|
|
|
|
|
); |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
has amount => ( |
70
|
|
|
|
|
|
|
is => 'ro', |
71
|
|
|
|
|
|
|
isa => Int, |
72
|
|
|
|
|
|
|
lazy => 1, |
73
|
|
|
|
|
|
|
default => sub { |
74
|
|
|
|
|
|
|
my $self = shift; |
75
|
|
|
|
|
|
|
return $self->_get_deduction_for( $self->persons ); |
76
|
|
|
|
|
|
|
}, |
77
|
|
|
|
|
|
|
); |
78
|
|
|
|
|
|
|
|
79
|
|
|
|
|
|
|
1; |
80
|
|
|
|
|
|
|
|
81
|
|
|
|
|
|
|
__END__ |