Quiq/Zugferd/Entity.pm

filter: Statementstmt 76.4% 13 / 17 Branchbran 0.0% 0 / 2 Conditioncond n/a MC/DCmcdc n/a Subroutinesub 80.0% 4 / 5 Podpod 100% 1 / 1 totaltotal 72.0% 18 / 25 CC 2 SCAR 9.8
CC
2
Cov
68%
transferDate
6.0
BEGIN
1.0
BEGIN
1.0
CRAP 2.7
« Quiq/Stopwatch.pm ↑ Summary Quiq/Net.pm »
1 # -----------------------------------------------------------------------------
2  
3 =encoding utf8
4  
5 =head1 NAME
6  
7 Quiq::Zugferd::Entity - Basisklasse der Entitätsklassen
8  
9 =head1 BASE CLASS
10  
11 L<Quiq::Hash>
12  
13 =head1 DESCRIPTION
14  
15 Diese Klasse enthält Methoden, die von allen Entitätsklassen
16 genutzt werden.
17  
18 =cut
19  
20 # -----------------------------------------------------------------------------
21  
22 package Quiq::Zugferd::Entity;
23 11 ▶use base qw/Quiq::Hash/;
Subroutine BEGIN: called CC=1 SCAR=0.0
24  
25 11 ▶use v5.10;
Subroutine BEGIN: called CC=1 SCAR=0.0
26 11 ▶use strict;
Subroutine BEGIN: called CC=1 SCAR=0.0
27 11 ▶use warnings;
Subroutine BEGIN: called CC=1 SCAR=0.0
28  
29 11 our $VERSION = '1.240';
30  
31 # -----------------------------------------------------------------------------
32  
33 =head1 METHODS
34  
35 =head2 Objektmethoden
36  
37 =head3 transferDate() - Übertrage Datum ins ZUGFeRD XML
38  
39 =head4 Synopsis
40  
41 @arr = $class->transferDate($key,$btCode);
42  
43 =head4 Description
44  
45 Übertrage den (Datums-)Wert des Attributs $key unter dem Business Term
46 $btCode ins ZUGFeRD XML. Beispiel:
47  
48 @arr = $rch->transferDate('faelligkeitsdatum','BT-9');
49  
50 liefert
51  
52 ('BT-9','20250707','BT-9-0',102)
53  
54 wenn das Rechnungsattribut faelligkeitsdatum den Wert '20250707' hat.
55  
56 =cut
57  
58 # -----------------------------------------------------------------------------
59  
60 0 ▶sub transferDate {
Subroutine transferDate: not called CC=2 SCAR=17.9
Pod documented
61 0 my ($self,$key,$btCode) = @_;
62  
63 0 my $date = $self->$key;
64 0 ▶ my $dateCode = $date? 102: undef;
Branch: 1 branch
BranchTrueFalseTotal
$date ? : 0 0 0
65  
66 0 return ($btCode,$date,"$btCode-0",$dateCode);
67 }
68  
69 # -----------------------------------------------------------------------------
70  
71 =head1 VERSION
72  
73 1.240
74  
75 =head1 AUTHOR
76  
77 Frank Seitz, L<http://fseitz.de/>
78  
79 =head1 COPYRIGHT
80  
81 Copyright (C) 2026 Frank Seitz
82  
83 =head1 LICENSE
84  
85 This code is free software; you can redistribute it and/or modify
86 it under the same terms as Perl itself.
87  
88 =cut
89  
90 # -----------------------------------------------------------------------------
91  
92 11 1;
93  
94 # eof
« Quiq/Stopwatch.pm ↑ Summary Quiq/Net.pm »