line |
stmt |
bran |
cond |
sub |
pod |
time |
code |
1
|
|
|
|
|
|
|
#! perl |
2
|
|
|
|
|
|
|
|
3
|
|
|
|
|
|
|
# Author : Johan Vromans |
4
|
|
|
|
|
|
|
# Created On : Sat Jun 11 13:44:43 2005 |
5
|
|
|
|
|
|
|
# Last Modified By: Johan Vromans |
6
|
|
|
|
|
|
|
# Last Modified On: Thu Oct 8 22:21:28 2015 |
7
|
|
|
|
|
|
|
# Update Count : 344 |
8
|
|
|
|
|
|
|
# Status : Unknown, Use with caution! |
9
|
|
|
|
|
|
|
|
10
|
|
|
|
|
|
|
################ Common stuff ################ |
11
|
|
|
|
|
|
|
|
12
|
|
|
|
|
|
|
package main; |
13
|
|
|
|
|
|
|
|
14
|
|
|
|
|
|
|
our $cfg; |
15
|
|
|
|
|
|
|
our $dbh; |
16
|
|
|
|
|
|
|
|
17
|
|
|
|
|
|
|
package EB::Report::Journal; |
18
|
|
|
|
|
|
|
|
19
|
1
|
|
|
1
|
|
7
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
29
|
|
20
|
1
|
|
|
1
|
|
5
|
use warnings; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
22
|
|
21
|
|
|
|
|
|
|
|
22
|
1
|
|
|
1
|
|
4
|
use EB; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
229
|
|
23
|
1
|
|
|
1
|
|
7
|
use EB::Format; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
124
|
|
24
|
1
|
|
|
1
|
|
471
|
use EB::Booking; # for dcfromtd() |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
46
|
|
25
|
1
|
|
|
1
|
|
470
|
use EB::Report::GenBase; |
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
1948
|
|
26
|
|
|
|
|
|
|
|
27
|
|
|
|
|
|
|
sub new { |
28
|
0
|
|
|
0
|
0
|
|
bless {}, shift; |
29
|
|
|
|
|
|
|
} |
30
|
|
|
|
|
|
|
|
31
|
|
|
|
|
|
|
sub journal { |
32
|
0
|
|
|
0
|
0
|
|
my ($self, $opts) = @_; |
33
|
|
|
|
|
|
|
|
34
|
0
|
|
|
|
|
|
my $nr = $opts->{select}; |
35
|
0
|
|
0
|
|
|
|
my $pfx = $opts->{postfix} || ""; |
36
|
0
|
|
|
|
|
|
my $detail = $opts->{detail}; |
37
|
|
|
|
|
|
|
|
38
|
0
|
0
|
|
|
|
|
my $extra_btw_info = $cfg->val(qw(journal btwxinfo), $dbh->does_btw ? 1 : 0); |
39
|
|
|
|
|
|
|
|
40
|
0
|
|
|
|
|
|
$opts->{STYLE} = "journaal"; |
41
|
|
|
|
|
|
|
$opts->{LAYOUT} = |
42
|
0
|
0
|
|
|
|
|
[ { name => "date", title => _T("Datum"), width => $date_width, }, |
43
|
|
|
|
|
|
|
{ name => "desc", title => _T("Boekstuk/Grootboek"), width => 30, }, |
44
|
|
|
|
|
|
|
{ name => "acct", title => _T("Rek"), width => 5, align => ">", }, |
45
|
|
|
|
|
|
|
{ name => "deb", title => _T("Debet"), width => $amount_width, align => ">", }, |
46
|
|
|
|
|
|
|
{ name => "crd", title => _T("Credit"), width => $amount_width, align => ">", }, |
47
|
|
|
|
|
|
|
$extra_btw_info ? |
48
|
|
|
|
|
|
|
({ name => "btw", title => _T("BTW \%"), width => $amount_width, align => ">", }, |
49
|
|
|
|
|
|
|
{ name => "btg", title => _T("Tarief"), width => 10, }) : (), |
50
|
|
|
|
|
|
|
{ name => "bsk", title => _T("Boekstuk/regel"), width => 30, }, |
51
|
|
|
|
|
|
|
{ name => "rel", title => _T("Relatie"), width => 10, }, |
52
|
|
|
|
|
|
|
]; |
53
|
|
|
|
|
|
|
|
54
|
0
|
|
|
|
|
|
my $rep = EB::Report::GenBase->backend($self, $opts); |
55
|
0
|
|
|
|
|
|
my $per = $rep->{periode}; |
56
|
0
|
0
|
|
|
|
|
if ( my $t = $cfg->val(qw(internal now), 0) ) { |
57
|
0
|
0
|
|
|
|
|
$per->[1] = $t if $t lt $per->[1]; |
58
|
|
|
|
|
|
|
} |
59
|
|
|
|
|
|
|
|
60
|
|
|
|
|
|
|
# Sort order (boekstukken). |
61
|
|
|
|
|
|
|
my $so = join(", ", |
62
|
|
|
|
|
|
|
$opts->{bkstsort} |
63
|
|
|
|
|
|
|
? ( |
64
|
0
|
0
|
|
|
|
|
"jnl_dbk_id", # dagboek |
65
|
|
|
|
|
|
|
"bsk_nr", # boekstuk |
66
|
|
|
|
|
|
|
"jnl_date", # date |
67
|
|
|
|
|
|
|
) |
68
|
|
|
|
|
|
|
: ( |
69
|
|
|
|
|
|
|
"jnl_date", # date |
70
|
|
|
|
|
|
|
"jnl_dbk_id", # dagboek |
71
|
|
|
|
|
|
|
"bsk_nr", # boekstuk |
72
|
|
|
|
|
|
|
), |
73
|
|
|
|
|
|
|
"CASE WHEN jnl_seq = 0 THEN 0 ELSE 1 END",# bsr 0 eerst |
74
|
|
|
|
|
|
|
"sign(jnl_amount) DESC", # debet eerst |
75
|
|
|
|
|
|
|
"jnl_acc_id", # rekeningnummer |
76
|
|
|
|
|
|
|
"jnl_amount DESC", # grootste bedragen vooraan |
77
|
|
|
|
|
|
|
"jnl_type", |
78
|
|
|
|
|
|
|
"jnl_seq"); # if all else fails |
79
|
|
|
|
|
|
|
|
80
|
0
|
|
|
|
|
|
$rep->start(_T("Journaal")); |
81
|
|
|
|
|
|
|
|
82
|
0
|
|
|
|
|
|
my $sth; |
83
|
0
|
0
|
|
|
|
|
if ( $nr ) { |
84
|
0
|
0
|
|
|
|
|
if ( $nr =~ /^([[:alpha:]].*):(\d+)$/ ) { |
|
|
0
|
|
|
|
|
|
85
|
0
|
|
|
|
|
|
my $rr = $dbh->do("SELECT dbk_desc, dbk_id". |
86
|
|
|
|
|
|
|
" FROM Dagboeken". |
87
|
|
|
|
|
|
|
" WHERE dbk_desc ILIKE ?", |
88
|
|
|
|
|
|
|
$1); |
89
|
0
|
0
|
|
|
|
|
unless ( $rr ) { |
90
|
0
|
|
|
|
|
|
warn("?".__x("Onbekend dagboek: {dbk}", dbk => $1)."\n"); |
91
|
0
|
|
|
|
|
|
return; |
92
|
|
|
|
|
|
|
} |
93
|
0
|
0
|
|
|
|
|
$sth = $dbh->sql_exec("SELECT jnl_date, jnl_bsr_date, jnl_dbk_id, jnl_bsk_id, bsk_nr, jnl_bsr_seq, jnl_seq, ". |
|
|
0
|
|
|
|
|
|
94
|
|
|
|
|
|
|
"jnl_type, jnl_acc_id, jnl_amount, jnl_damount, jnl_desc, jnl_rel, jnl_bsk_ref". |
95
|
|
|
|
|
|
|
" FROM Journal, Boekstukken, Dagboeken". |
96
|
|
|
|
|
|
|
" WHERE bsk_nr = ?". |
97
|
|
|
|
|
|
|
" AND dbk_id = ?". |
98
|
|
|
|
|
|
|
" AND jnl_bsk_id = bsk_id". |
99
|
|
|
|
|
|
|
" AND jnl_dbk_id = dbk_id". |
100
|
|
|
|
|
|
|
($per ? " AND jnl_date >= ? AND jnl_date <= ?" : ""). |
101
|
|
|
|
|
|
|
" ORDER BY ".$so, |
102
|
|
|
|
|
|
|
$2, $rr->[1], $per ? @$per : ()); |
103
|
0
|
|
0
|
|
|
|
$pfx ||= __x("Boekstuk {nr}", nr => "$rr->[0]:$2"); |
104
|
|
|
|
|
|
|
} |
105
|
|
|
|
|
|
|
elsif ( $nr =~ /^([[:alpha:]].*)$/ ) { |
106
|
0
|
|
|
|
|
|
my $rr = $dbh->do("SELECT dbk_desc, dbk_id". |
107
|
|
|
|
|
|
|
" FROM Dagboeken". |
108
|
|
|
|
|
|
|
" WHERE dbk_desc ILIKE ?", |
109
|
|
|
|
|
|
|
$1); |
110
|
0
|
0
|
|
|
|
|
unless ( $rr ) { |
111
|
0
|
|
|
|
|
|
warn("?".__x("Onbekend dagboek: {dbk}", dbk => $1)."\n"); |
112
|
0
|
|
|
|
|
|
return; |
113
|
|
|
|
|
|
|
} |
114
|
0
|
0
|
|
|
|
|
$sth = $dbh->sql_exec("SELECT jnl_date, jnl_bsr_date, jnl_dbk_id, jnl_bsk_id, bsk_nr, jnl_bsr_seq, jnl_seq, ". |
|
|
0
|
|
|
|
|
|
115
|
|
|
|
|
|
|
"jnl_type, jnl_acc_id, jnl_amount, jnl_damount, jnl_desc, jnl_rel, jnl_bsk_ref". |
116
|
|
|
|
|
|
|
" FROM Journal, Boekstukken, Dagboeken". |
117
|
|
|
|
|
|
|
" WHERE dbk_id = ?". |
118
|
|
|
|
|
|
|
" AND jnl_bsk_id = bsk_id". |
119
|
|
|
|
|
|
|
" AND jnl_dbk_id = dbk_id". |
120
|
|
|
|
|
|
|
($per ? " AND jnl_date >= ? AND jnl_date <= ?" : ""). |
121
|
|
|
|
|
|
|
" ORDER BY ".$so, |
122
|
|
|
|
|
|
|
$rr->[1], $per ? @$per : ()); |
123
|
0
|
|
0
|
|
|
|
$pfx ||= __x("Dagboek {nr}", nr => $rr->[0]); |
124
|
|
|
|
|
|
|
} |
125
|
|
|
|
|
|
|
else { |
126
|
0
|
0
|
|
|
|
|
$sth = $dbh->sql_exec("SELECT jnl_date, jnl_bsr_date, jnl_dbk_id, jnl_bsk_id, bsk_nr, jnl_bsr_seq, jnl_seq, ". |
|
|
0
|
|
|
|
|
|
127
|
|
|
|
|
|
|
"jnl_type, jnl_acc_id, jnl_amount, jnl_damount, jnl_desc, jnl_rel". |
128
|
|
|
|
|
|
|
" FROM Journal, Boekstukken". |
129
|
|
|
|
|
|
|
" WHERE jnl_bsk_id = ?". |
130
|
|
|
|
|
|
|
" AND jnl_bsk_id = bsk_id". |
131
|
|
|
|
|
|
|
($per ? " AND jnl_date >= ? AND jnl_date <= ?" : ""). |
132
|
|
|
|
|
|
|
" ORDER BY ".$so,, |
133
|
|
|
|
|
|
|
$nr, $per ? @$per : ()); |
134
|
0
|
|
0
|
|
|
|
$pfx ||= __x("Boekstuk {nr}", nr => $nr); |
135
|
|
|
|
|
|
|
} |
136
|
|
|
|
|
|
|
} |
137
|
|
|
|
|
|
|
else { |
138
|
0
|
0
|
|
|
|
|
$sth = $dbh->sql_exec("SELECT jnl_date, jnl_bsr_date, jnl_dbk_id, jnl_bsk_id, bsk_nr, jnl_bsr_seq, jnl_seq, ". |
|
|
0
|
|
|
|
|
|
139
|
|
|
|
|
|
|
"jnl_type, jnl_acc_id, jnl_amount, jnl_damount, jnl_desc, jnl_rel, jnl_bsk_ref". |
140
|
|
|
|
|
|
|
" FROM Journal, Boekstukken". |
141
|
|
|
|
|
|
|
" WHERE jnl_bsk_id = bsk_id". |
142
|
|
|
|
|
|
|
($per ? " AND jnl_date >= ? AND jnl_date <= ?" : ""). |
143
|
|
|
|
|
|
|
" ORDER BY ".$so, |
144
|
|
|
|
|
|
|
$per ? @$per : ()); |
145
|
|
|
|
|
|
|
} |
146
|
0
|
|
|
|
|
|
my $rr; |
147
|
0
|
|
|
|
|
|
my $nl = 0; |
148
|
0
|
|
|
|
|
|
my $totd = my $totc = 0; |
149
|
|
|
|
|
|
|
|
150
|
0
|
|
|
|
|
|
while ( $rr = $sth->fetchrow_arrayref ) { |
151
|
0
|
|
|
|
|
|
my ($jnl_date, $jnl_bsr_date, $jnl_dbk_id, $jnl_bsk_id, $bsk_nr, |
152
|
|
|
|
|
|
|
$jnl_bsr_seq, $jnl_seq, $jnl_type, $jnl_acc_id, |
153
|
|
|
|
|
|
|
$jnl_amount, $jnl_damount, $jnl_desc, $jnl_rel, $jnl_bsk_ref) = @$rr; |
154
|
|
|
|
|
|
|
|
155
|
0
|
0
|
|
|
|
|
my $iv = _dbk_type($jnl_dbk_id) == DBKTYPE_INKOOP ? 'c' |
|
|
0
|
|
|
|
|
|
156
|
|
|
|
|
|
|
: _dbk_type($jnl_dbk_id) == DBKTYPE_VERKOOP ? 'd' : ''; |
157
|
|
|
|
|
|
|
|
158
|
0
|
0
|
|
|
|
|
if ( $jnl_seq == 0 ) { |
159
|
0
|
0
|
|
|
|
|
$nl++, next unless $detail; |
160
|
0
|
|
|
|
|
|
my $t = $jnl_rel; |
161
|
0
|
0
|
0
|
|
|
|
if ( $t && $jnl_bsk_ref ) { |
162
|
0
|
|
|
|
|
|
$t .= ":" . $jnl_bsk_ref; |
163
|
|
|
|
|
|
|
} |
164
|
0
|
0
|
0
|
|
|
|
if ( $iv && $cfg->val(qw(internal noxrel), 0) ) { |
165
|
0
|
|
|
|
|
|
undef $t; |
166
|
|
|
|
|
|
|
} |
167
|
0
|
|
|
|
|
|
my $st = $iv.'head'; |
168
|
0
|
0
|
|
|
|
|
if ( EB::Booking->find_attachment($jnl_bsk_id) ) { |
169
|
0
|
|
|
|
|
|
$st .= 'a'; |
170
|
|
|
|
|
|
|
} |
171
|
0
|
|
|
|
|
|
$rep->add({ _style => $st, |
172
|
|
|
|
|
|
|
date => datefmt($jnl_bsr_date), |
173
|
|
|
|
|
|
|
desc => join(":", _dbk_desc($jnl_dbk_id), $bsk_nr), |
174
|
|
|
|
|
|
|
bsk => $jnl_desc, |
175
|
|
|
|
|
|
|
rel => $t, |
176
|
|
|
|
|
|
|
}); |
177
|
0
|
|
|
|
|
|
next; |
178
|
|
|
|
|
|
|
} |
179
|
|
|
|
|
|
|
|
180
|
0
|
|
|
|
|
|
my ($deb, $crd) = EB::Booking::dcfromtd($jnl_amount, $jnl_damount); |
181
|
0
|
|
|
|
|
|
$totd += $deb; |
182
|
0
|
|
|
|
|
|
$totc += $crd; |
183
|
0
|
0
|
|
|
|
|
next unless $detail; |
184
|
0
|
|
|
|
|
|
my $t = $jnl_rel; |
185
|
0
|
0
|
0
|
|
|
|
if ( $t && $jnl_bsk_ref ) { |
186
|
0
|
|
|
|
|
|
$t .= ":" . $jnl_bsk_ref; |
187
|
|
|
|
|
|
|
} |
188
|
0
|
0
|
|
|
|
|
if ( $t ) { |
189
|
0
|
0
|
|
|
|
|
$iv = _acc_type($jnl_acc_id) ? 'd' : 'c'; |
190
|
|
|
|
|
|
|
} |
191
|
|
|
|
|
|
|
else { |
192
|
0
|
|
|
|
|
|
$iv = ''; |
193
|
|
|
|
|
|
|
} |
194
|
|
|
|
|
|
|
|
195
|
0
|
|
|
|
|
|
my $btw_perc = ""; |
196
|
0
|
|
|
|
|
|
my $btw_tg = ""; |
197
|
0
|
0
|
0
|
|
|
|
if ( $extra_btw_info > 1 |
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
198
|
|
|
|
|
|
|
|| ( $extra_btw_info && defined($jnl_type) && $jnl_type == 0 ) ) { |
199
|
0
|
|
|
|
|
|
my $res = $dbh->do( "SELECT bsr_btw_id, bsr_btw_class FROM Boekstukregels". |
200
|
|
|
|
|
|
|
" WHERE bsr_bsk_id = ? AND bsr_nr = ?", |
201
|
|
|
|
|
|
|
$jnl_bsk_id, $jnl_bsr_seq ); |
202
|
0
|
0
|
0
|
|
|
|
if ( defined($res) && defined($res->[0]) |
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
203
|
|
|
|
|
|
|
&& defined($res->[1]) |
204
|
|
|
|
|
|
|
&& $res->[1] & BTWKLASSE_BTW_BIT ) { |
205
|
0
|
|
|
|
|
|
my $btw_id = $res->[0]; |
206
|
0
|
|
|
|
|
|
$res = $dbh->do( "SELECT btw_perc, btw_tariefgroep". |
207
|
|
|
|
|
|
|
" FROM BTWTabel". |
208
|
|
|
|
|
|
|
" WHERE btw_id = ?", |
209
|
|
|
|
|
|
|
$btw_id ); |
210
|
0
|
|
|
|
|
|
$btw_perc = btwfmt( $res->[0] ); |
211
|
0
|
|
|
|
|
|
$btw_tg = BTWTARIEVEN->[$res->[1]]; |
212
|
|
|
|
|
|
|
} |
213
|
|
|
|
|
|
|
} |
214
|
|
|
|
|
|
|
|
215
|
|
|
|
|
|
|
|
216
|
0
|
0
|
0
|
|
|
|
$rep->add({ _style => $iv.'data', |
|
|
0
|
0
|
|
|
|
|
|
|
0
|
|
|
|
|
|
|
|
0
|
|
|
|
|
|
217
|
|
|
|
|
|
|
date => datefmt($jnl_bsr_date), |
218
|
|
|
|
|
|
|
desc => _acc_desc($jnl_acc_id), |
219
|
|
|
|
|
|
|
acct => $jnl_acc_id, |
220
|
|
|
|
|
|
|
($deb || defined $jnl_damount) ? (deb => numfmt($deb)) : (), |
221
|
|
|
|
|
|
|
($crd || defined $jnl_damount) ? (crd => numfmt($crd)) : (), |
222
|
|
|
|
|
|
|
bsk => $jnl_desc, |
223
|
|
|
|
|
|
|
$jnl_rel ? ( rel => $t ) : (), |
224
|
|
|
|
|
|
|
$extra_btw_info ? ( btw => $btw_perc, btg => $btw_tg ) : (), |
225
|
|
|
|
|
|
|
}); |
226
|
|
|
|
|
|
|
} |
227
|
0
|
|
|
|
|
|
$rep->add({ _style => 'total', |
228
|
|
|
|
|
|
|
desc => __x("Totaal {pfx}", pfx => $pfx), |
229
|
|
|
|
|
|
|
deb => numfmt($totd), |
230
|
|
|
|
|
|
|
crd => numfmt($totc), |
231
|
|
|
|
|
|
|
}); |
232
|
0
|
|
|
|
|
|
$rep->finish; |
233
|
|
|
|
|
|
|
} |
234
|
|
|
|
|
|
|
|
235
|
|
|
|
|
|
|
my %dbk_desc; |
236
|
|
|
|
|
|
|
sub _dbk_desc { |
237
|
0
|
|
0
|
0
|
|
|
$dbk_desc{$_[0]} ||= $dbh->lookup($_[0], |
238
|
|
|
|
|
|
|
qw(Dagboeken dbk_id dbk_desc =)); |
239
|
|
|
|
|
|
|
} |
240
|
|
|
|
|
|
|
|
241
|
|
|
|
|
|
|
my %dbk_type; |
242
|
|
|
|
|
|
|
sub _dbk_type { |
243
|
0
|
|
0
|
0
|
|
|
$dbk_type{$_[0]} ||= $dbh->lookup($_[0], |
244
|
|
|
|
|
|
|
qw(Dagboeken dbk_id dbk_type =)); |
245
|
|
|
|
|
|
|
} |
246
|
|
|
|
|
|
|
|
247
|
|
|
|
|
|
|
my %acc_desc; |
248
|
|
|
|
|
|
|
sub _acc_desc { |
249
|
0
|
0
|
|
0
|
|
|
return '' unless $_[0]; |
250
|
0
|
|
0
|
|
|
|
$acc_desc{$_[0]} ||= $dbh->lookup($_[0], |
251
|
|
|
|
|
|
|
qw(Accounts acc_id acc_desc =)); |
252
|
|
|
|
|
|
|
} |
253
|
|
|
|
|
|
|
|
254
|
|
|
|
|
|
|
my %acc_type; |
255
|
|
|
|
|
|
|
sub _acc_type { |
256
|
0
|
0
|
|
0
|
|
|
return '' unless $_[0]; |
257
|
0
|
|
0
|
|
|
|
$acc_type{$_[0]} ||= $dbh->lookup($_[0], |
258
|
|
|
|
|
|
|
qw(Accounts acc_id acc_debcrd =)); |
259
|
|
|
|
|
|
|
} |
260
|
|
|
|
|
|
|
|
261
|
|
|
|
|
|
|
package EB::Report::Journal::Text; |
262
|
|
|
|
|
|
|
|
263
|
1
|
|
|
1
|
|
16
|
use EB; |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
236
|
|
264
|
1
|
|
|
1
|
|
9
|
use base qw(EB::Report::Reporter::Text); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
640
|
|
265
|
1
|
|
|
1
|
|
9
|
use strict; |
|
1
|
|
|
|
|
4
|
|
|
1
|
|
|
|
|
196
|
|
266
|
|
|
|
|
|
|
|
267
|
|
|
|
|
|
|
sub new { |
268
|
0
|
|
|
0
|
|
|
my ($class, $opts) = @_; |
269
|
0
|
|
|
|
|
|
$class->SUPER::new($opts->{STYLE}, $opts->{LAYOUT}); |
270
|
|
|
|
|
|
|
} |
271
|
|
|
|
|
|
|
|
272
|
|
|
|
|
|
|
# Style mods. |
273
|
|
|
|
|
|
|
|
274
|
|
|
|
|
|
|
sub style { |
275
|
0
|
|
|
0
|
|
|
my ($self, $row, $cell) = @_; |
276
|
|
|
|
|
|
|
|
277
|
0
|
|
|
|
|
|
my $style_data = { |
278
|
|
|
|
|
|
|
_style => { skip_after => 1, |
279
|
|
|
|
|
|
|
cancel_skip => 1, |
280
|
|
|
|
|
|
|
}, |
281
|
|
|
|
|
|
|
desc => { indent => 2 }, |
282
|
|
|
|
|
|
|
bsk => { indent => 2 }, |
283
|
|
|
|
|
|
|
}; |
284
|
|
|
|
|
|
|
|
285
|
0
|
|
|
|
|
|
my $stylesheet = { |
286
|
|
|
|
|
|
|
data => $style_data, |
287
|
|
|
|
|
|
|
cdata => $style_data, |
288
|
|
|
|
|
|
|
ddata => $style_data, |
289
|
|
|
|
|
|
|
total => { |
290
|
|
|
|
|
|
|
_style => { line_before => 1 }, |
291
|
|
|
|
|
|
|
# desc => { excess => 2 }, |
292
|
|
|
|
|
|
|
}, |
293
|
|
|
|
|
|
|
}; |
294
|
|
|
|
|
|
|
|
295
|
0
|
0
|
|
|
|
|
$cell = "_style" unless defined($cell); |
296
|
0
|
|
|
|
|
|
return $stylesheet->{$row}->{$cell}; |
297
|
|
|
|
|
|
|
} |
298
|
|
|
|
|
|
|
|
299
|
|
|
|
|
|
|
package EB::Report::Journal::Html; |
300
|
|
|
|
|
|
|
|
301
|
1
|
|
|
1
|
|
8
|
use EB; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
256
|
|
302
|
1
|
|
|
1
|
|
7
|
use base qw(EB::Report::Reporter::Html); |
|
1
|
|
|
|
|
3
|
|
|
1
|
|
|
|
|
592
|
|
303
|
1
|
|
|
1
|
|
6
|
use strict; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
65
|
|
304
|
|
|
|
|
|
|
|
305
|
|
|
|
|
|
|
sub new { |
306
|
0
|
|
|
0
|
|
|
my ($class, $opts) = @_; |
307
|
0
|
|
|
|
|
|
$class->SUPER::new($opts->{STYLE}, $opts->{LAYOUT}); |
308
|
|
|
|
|
|
|
} |
309
|
|
|
|
|
|
|
|
310
|
|
|
|
|
|
|
package EB::Report::Journal::Csv; |
311
|
|
|
|
|
|
|
|
312
|
1
|
|
|
1
|
|
5
|
use EB; |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
217
|
|
313
|
1
|
|
|
1
|
|
7
|
use base qw(EB::Report::Reporter::Csv); |
|
1
|
|
|
|
|
2
|
|
|
1
|
|
|
|
|
533
|
|
314
|
|
|
|
|
|
|
|
315
|
|
|
|
|
|
|
sub new { |
316
|
0
|
|
|
0
|
|
|
my ($class, $opts) = @_; |
317
|
0
|
|
|
|
|
|
$class->SUPER::new($opts->{STYLE}, $opts->{LAYOUT}); |
318
|
|
|
|
|
|
|
} |
319
|
|
|
|
|
|
|
|
320
|
|
|
|
|
|
|
1; |
321
|
|
|
|
|
|
|
|