| line |
true |
false |
branch |
|
44
|
0 |
6 |
unless exists $GUIDELINE{$profile} |
|
47
|
0 |
6 |
unless (eval {
do {
$share_dir = dist_dir("PDF-FacturX");
1
}
}) |
|
125
|
0 |
5 |
unless $xsd_root and -d $xsd_root |
|
131
|
0 |
5 |
unless $main_xsd and -r $main_xsd |
|
135
|
0 |
5 |
unless $schema |
|
138
|
0 |
5 |
unless $doc |
|
140
|
1 |
4 |
unless (eval {
do {
$schema->validate($doc);
1
}
}) |
|
158
|
2 |
18 |
unless exists $GUIDELINE{$profile} |
|
160
|
1 |
17 |
unless ref $inv eq "HASH" |
|
165
|
1 |
32 |
unless defined $inv->{$field} and length $inv->{$field} |
|
169
|
9 |
6 |
if defined $inv->{'due_date'} |
|
173
|
1 |
25 |
unless ref $inv->{$party} eq "HASH" |
|
175
|
2 |
23 |
unless defined $inv->{$party}{'name'} and length $inv->{$party}{'name'} |
|
178
|
11 |
0 |
if (defined $inv->{'currency'}) |
|
180
|
1 |
10 |
unless $inv->{'currency'} =~ /^[A-Z]{3}$/ |
|
186
|
7 |
3 |
if ($needs_lines) |
|
188
|
1 |
6 |
unless ref $inv->{'lines'} eq "ARRAY" and @{$inv->{'lines'};} |
|
190
|
9 |
0 |
if (ref $inv->{'lines'} eq "ARRAY") |
|
194
|
0 |
14 |
unless ref $line eq "HASH" |
|
198
|
0 |
42 |
unless defined $line->{$f} and length $line->{$f} |
|
203
|
1 |
13 |
unless $VALID_VAT_CAT{$cat} |
|
207
|
0 |
8 |
if (ref $inv->{'allowances'} eq "ARRAY") |
|
211
|
0 |
0 |
unless ref $a eq "HASH" |
|
214
|
0 |
0 |
unless defined $a->{'amount'} |
|
217
|
0 |
0 |
unless $VALID_VAT_CAT{$cat} |
|
226
|
0 |
25 |
unless defined $val |
|
227
|
2 |
23 |
unless $val =~ /^\d{4}-\d{2}-\d{2}$/ |
|
248
|
0 |
8 |
if (defined $inv->{'notes'} and length $inv->{'notes'}) |
|
260
|
5 |
3 |
if ($with_lines) |
|
262
|
0 |
5 |
unless $inv->{'lines'} |
|
280
|
2 |
6 |
if $profile eq "minimum" |
|
282
|
0 |
6 |
unless $date |
|
312
|
8 |
0 |
unless $cat eq "O" |
|
335
|
6 |
2 |
if ($is_seller and $party->{'siret'}) |
|
342
|
12 |
4 |
if ($profile ne "minimum") |
|
343
|
12 |
0 |
if $party->{'postcode'} |
|
344
|
12 |
0 |
if $party->{'address_1'} |
|
345
|
0 |
12 |
if $party->{'address_2'} |
|
346
|
12 |
0 |
if $party->{'city'} |
|
350
|
6 |
2 |
if ($is_seller and $party->{'vat'}) |
|
366
|
2 |
6 |
if ($profile eq "minimum") |
|
374
|
5 |
1 |
if ($pay->{'iban'}) |
|
380
|
1 |
4 |
if ($pay->{'bic'} and $profile eq "en16931") |
|
391
|
0 |
6 |
unless $inv->{'lines'} |
|
400
|
10 |
0 |
unless defined $reason and length $reason |
|
401
|
0 |
10 |
if defined $reason and length $reason |
|
404
|
6 |
0 |
unless $inv->{'allowances'} |
|
427
|
0 |
10 |
if ($r->{'cat'} =~ /^(E|AE|O|K|G)$/) |
|
429
|
0 |
0 |
if defined $reason and length $reason |
|
436
|
10 |
0 |
unless $r->{'cat'} eq "O" |
|
440
|
6 |
0 |
unless $inv->{'allowances'} |
|
444
|
0 |
0 |
$a->{'is_charge'} ? : |
|
446
|
0 |
0 |
if $a->{'reason'} |
|
451
|
0 |
0 |
unless ($a->{'vat_cat'} // "S") eq "O" |
|
455
|
5 |
1 |
if $pay->{'terms'} |
|
456
|
6 |
0 |
if ($inv->{'due_date'}) |
|
464
|
0 |
6 |
unless $inv->{'lines'} |
|
474
|
0 |
6 |
if $allowance_total > 0 |
|
489
|
0 |
2 |
unless $inv->{'lines'} |
|
495
|
2 |
0 |
unless $inv->{'allowances'} |
|
517
|
0 |
533 |
unless my $ns = $NS{$prefix} |
|
523
|
300 |
233 |
if defined $text and length $text |
|
536
|
8 |
0 |
$v == int $v ? : |
|
541
|
0 |
20 |
unless defined $iso |
|
542
|
0 |
20 |
unless $iso =~ /^(\d{4})-(\d{2})-(\d{2})/ |