Revision 97d2859d
Von Tamino Steinert vor 3 Monaten hinzugefügt
SL/DB/Helper/ZUGFeRD.pm | ||
---|---|---|
106 | 106 |
return @result; |
107 | 107 |
} |
108 | 108 |
|
109 |
sub _buyer_contact_information { |
|
110 |
my ($self, %params) = @_; |
|
111 |
|
|
112 |
my $contact = $params{contact}; |
|
113 |
|
|
114 |
# <ram:DefinedTradeContact> |
|
115 |
$params{xml}->startTag("ram:DefinedTradeContact"); |
|
116 |
|
|
117 |
$params{xml}->dataElement("ram:PersonName", _u8(join(" ", $contact->cp_givenname, $contact->cp_name))); |
|
118 |
$params{xml}->dataElement("ram:DepartmentName", _u8($contact->cp_abteilung)); |
|
119 |
|
|
120 |
my $phone_number = first {$_} ( |
|
121 |
$contact->cp_phone1, |
|
122 |
$contact->cp_phone2, |
|
123 |
$contact->cp_mobile1, |
|
124 |
$contact->cp_mobile2, |
|
125 |
$contact->cp_satphone, |
|
126 |
); |
|
127 |
if ($phone_number) { |
|
128 |
$params{xml}->startTag("ram:TelephoneUniversalCommunication"); |
|
129 |
$params{xml}->dataElement("ram:CompleteNumber", _u8($phone_number)); |
|
130 |
$params{xml}->endTag; |
|
131 |
} |
|
132 |
|
|
133 |
if (_is_profile($self, PROFILE_FACTURX_EXTENDED())) { |
|
134 |
my $fax_number = first {$_} ( |
|
135 |
$contact->cp_fax, |
|
136 |
$contact->cp_satfax, |
|
137 |
); |
|
138 |
if ($fax_number) { |
|
139 |
$params{xml}->startTag("ram:FaxUniversalCommunication"); |
|
140 |
$params{xml}->dataElement("ram:CompleteNumber", _u8($fax_number)); |
|
141 |
$params{xml}->endTag; |
|
142 |
} |
|
143 |
} |
|
144 |
|
|
145 |
if ($contact->cp_email) { |
|
146 |
$params{xml}->startTag("ram:EmailURIUniversalCommunication"); |
|
147 |
$params{xml}->dataElement("ram:URIID", _u8($contact->cp_email)); |
|
148 |
$params{xml}->endTag; |
|
149 |
} |
|
150 |
|
|
151 |
$params{xml}->endTag; |
|
152 |
# </ram:DefinedTradeContact> |
|
153 |
} |
|
154 |
|
|
109 | 155 |
sub _customer_postal_trade_address { |
110 | 156 |
my (%params) = @_; |
111 | 157 |
|
... | ... | |
515 | 561 |
$params{xml}->dataElement("ram:ID", _u8($self->customer->customernumber)); |
516 | 562 |
$params{xml}->dataElement("ram:Name", _u8($self->customer->name)); |
517 | 563 |
|
564 |
_buyer_contact_information($self, %params, contact => $self->contact) if ($self->cp_id); |
|
518 | 565 |
_customer_postal_trade_address(%params, customer => $self->customer); |
519 | 566 |
_specified_tax_registration($self->customer->ustid, %params) if $self->customer->ustid; |
520 | 567 |
|
Auch abrufbar als: Unified diff
ZUGFeRD: Ansprechperson-Informationen