line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
package Finance::Bank::Wachovia::DataObtainer::WWW::Parser; |
2
|
8
|
|
|
8
|
|
2062
|
use strict; |
|
8
|
|
|
|
|
18
|
|
|
8
|
|
|
|
|
292
|
|
3
|
8
|
|
|
8
|
|
49
|
use warnings; |
|
8
|
|
|
|
|
16
|
|
|
8
|
|
|
|
|
10368
|
|
4
|
|
|
|
|
|
|
|
5
|
|
|
|
|
|
|
sub get_credit_account_current_balance { |
6
|
1
|
|
|
1
|
0
|
4
|
get_account_available_balance( @_ ); |
7
|
|
|
|
|
|
|
} |
8
|
|
|
|
|
|
|
|
9
|
|
|
|
|
|
|
sub get_credit_account_available_credit { |
10
|
3
|
|
|
3
|
0
|
26
|
$_[-1] =~ /Available Credit/g; |
11
|
3
|
|
|
|
|
24
|
my($avail) = $_[-1] =~ /\G.*?\$([\d,.-]+)/s; |
12
|
3
|
|
|
|
|
14
|
$avail =~ s/,//g; |
13
|
3
|
|
|
|
|
39
|
return $avail; |
14
|
|
|
|
|
|
|
} |
15
|
|
|
|
|
|
|
|
16
|
|
|
|
|
|
|
sub get_credit_account_limit { |
17
|
3
|
|
|
3
|
0
|
29
|
$_[-1] =~ /Credit Limit/g; |
18
|
3
|
|
|
|
|
25
|
my($limit) = $_[-1] =~ /\G.*?\$([\d,.-]+)/s; |
19
|
3
|
|
|
|
|
15
|
$limit =~ s/,//g; |
20
|
3
|
|
|
|
|
684
|
return $limit; |
21
|
|
|
|
|
|
|
} |
22
|
|
|
|
|
|
|
|
23
|
|
|
|
|
|
|
sub get_account_numbers { |
24
|
12
|
|
|
12
|
0
|
2093
|
my $content = $_[-1]; |
25
|
12
|
|
|
|
|
20
|
my @nums; |
26
|
12
|
|
|
|
|
144
|
while( $content =~ m//g ){ |
27
|
26
|
|
|
|
|
180
|
my($num) = $content =~ /\G.*?HREF="javascript\:sendForm\('(\d+)','Account(?:Detail|Summary)'\)">.*?<\/A>/s; |
28
|
26
|
|
|
|
|
150
|
push @nums, $num; |
29
|
|
|
|
|
|
|
} |
30
|
12
|
|
|
|
|
78
|
return @nums; |
31
|
|
|
|
|
|
|
} |
32
|
|
|
|
|
|
|
|
33
|
|
|
|
|
|
|
sub get_account_available_balance { |
34
|
13
|
|
|
13
|
0
|
43
|
my $account_num = $_[-1]; |
35
|
13
|
|
|
|
|
34
|
my $content = $_[-2]; |
36
|
13
|
|
|
|
|
215
|
while($content =~ m//g){ |
37
|
25
|
|
|
|
|
170
|
my($num) = $content =~ /\G.*?HREF="javascript\:sendForm\('(\d+)','Account(?:Detail|Summary)'\)">.*?<\/A>/s; |
38
|
25
|
|
|
|
|
34
|
my $bal; |
39
|
25
|
|
|
|
|
516
|
($bal) = $content =~ /\G.*?\$(\-?[\d,.-]+)/s; |
40
|
25
|
|
|
|
|
71
|
$bal =~ s/,//g; |
41
|
25
|
100
|
|
|
|
136
|
if( $num eq $account_num ){ |
42
|
13
|
|
|
|
|
131
|
return $bal; |
43
|
|
|
|
|
|
|
} |
44
|
|
|
|
|
|
|
} |
45
|
|
|
|
|
|
|
} |
46
|
|
|
|
|
|
|
|
47
|
|
|
|
|
|
|
sub get_account_posted_balance { |
48
|
2
|
|
|
2
|
0
|
5
|
my $content = $_[-1]; |
49
|
2
|
|
|
|
|
3
|
my $bal; |
50
|
2
|
|
|
|
|
27
|
($bal) = $content =~ m|Posted Balance: \$([\d,.-]+)|g; |
51
|
2
|
|
|
|
|
7
|
$bal =~ s/,//g; |
52
|
2
|
|
|
|
|
6
|
return $bal; |
53
|
|
|
|
|
|
|
} |
54
|
|
|
|
|
|
|
|
55
|
|
|
|
|
|
|
sub get_account_name { |
56
|
13
|
|
|
13
|
0
|
30
|
my $account_num = $_[-1]; |
57
|
13
|
|
|
|
|
28
|
my $content = $_[-2]; |
58
|
13
|
|
|
|
|
228
|
while($content =~ m//g){ |
59
|
23
|
|
|
|
|
174
|
my($num,$name) = $content =~ /\G.*?HREF="javascript\:sendForm\('(\d+)','Account(?:Detail|Summary)'\)">(.*?)<\/A>/s; |
60
|
23
|
|
|
|
|
40
|
my $bal; |
61
|
23
|
|
|
|
|
217
|
($bal) = $content =~ /\G.*?\$(\-?[\d,.-]+)/s; |
62
|
23
|
|
|
|
|
66
|
$bal =~ s/,//g; |
63
|
23
|
100
|
|
|
|
110
|
if( $num eq $account_num ){ |
64
|
13
|
|
|
|
|
170
|
return lc $name; |
65
|
|
|
|
|
|
|
} |
66
|
|
|
|
|
|
|
} |
67
|
|
|
|
|
|
|
} |
68
|
|
|
|
|
|
|
|
69
|
|
|
|
|
|
|
sub get_account_type { |
70
|
5
|
|
|
5
|
0
|
15
|
my $content = $_[-1]; |
71
|
5
|
|
|
|
|
10
|
my $type; |
72
|
5
|
|
|
|
|
141
|
($type) = $content =~ m/(.+?)/g; |
73
|
5
|
|
|
|
|
71
|
return lc $type; |
74
|
|
|
|
|
|
|
} |
75
|
|
|
|
|
|
|
|
76
|
|
|
|
|
|
|
sub get_account_transactions { |
77
|
4
|
|
|
4
|
0
|
12
|
my $content = $_[-1]; |
78
|
4
|
|
|
|
|
579
|
my @all_trans; |
79
|
4
|
|
|
|
|
66
|
while( $content =~ m/^var tblRow\d+ = new Array (.+?);$/mg ){ |
80
|
292
|
|
|
|
|
329
|
my %trans; |
81
|
|
|
|
|
|
|
@trans{ |
82
|
292
|
|
|
|
|
36965
|
qw( |
83
|
|
|
|
|
|
|
date |
84
|
|
|
|
|
|
|
action |
85
|
|
|
|
|
|
|
description |
86
|
|
|
|
|
|
|
withdrawal_amount |
87
|
|
|
|
|
|
|
deposit_amount |
88
|
|
|
|
|
|
|
balance |
89
|
|
|
|
|
|
|
seq_no |
90
|
|
|
|
|
|
|
trans_code |
91
|
|
|
|
|
|
|
check_num |
92
|
|
|
|
|
|
|
) |
93
|
|
|
|
|
|
|
} = eval $1; |
94
|
|
|
|
|
|
|
# this loop just gets rid of some dollar signs and commas that we don't need |
95
|
292
|
|
|
|
|
1070
|
for(qw/withdrawal_amount deposit_amount balance/){ |
96
|
876
|
50
|
|
|
|
2010
|
next unless $trans{$_}; |
97
|
876
|
|
|
|
|
3511
|
$trans{$_} =~ s/\$|,//g; |
98
|
876
|
|
|
|
|
2198
|
$trans{$_} =~ s/ //g; |
99
|
|
|
|
|
|
|
} |
100
|
292
|
|
|
|
|
1980
|
push @all_trans, \%trans; |
101
|
|
|
|
|
|
|
} |
102
|
4
|
|
|
|
|
30
|
return \@all_trans; |
103
|
|
|
|
|
|
|
} |
104
|
|
|
|
|
|
|
|
105
|
|
|
|
|
|
|
1; |