Revision c26abfe6
Von Tamino Steinert vor 9 Monaten hinzugefügt
- ID c26abfe699ba61e0503a8f77e705a0530f039fb3
- Vorgänger 52b51c68
SL/DB/Helper/ZUGFeRD.pm | ||
---|---|---|
sub _payment_terms {
|
||
my ($self, %params) = @_;
|
||
|
||
return unless $self->payment_terms;
|
||
return if !$self->payment_terms && !$self->duedate;
|
||
|
||
if (!$self->payment_terms) { # only duedate
|
||
# <ram:SpecifiedTradePaymentTerms>
|
||
$params{xml}->startTag("ram:SpecifiedTradePaymentTerms");
|
||
|
||
# <ram:DueDateDateTime>
|
||
$params{xml}->startTag("ram:DueDateDateTime");
|
||
$params{xml}->dataElement("udt:DateTimeString", $self->duedate->strftime('%Y%m%d'), format => "102");
|
||
$params{xml}->endTag;
|
||
# </ram:DueDateDateTime>
|
||
|
||
$params{xml}->endTag;
|
||
# </ram:SpecifiedTradePaymentTerms>
|
||
return;
|
||
}
|
||
|
||
my %payment_terms_vars = _calculate_payment_terms_values($self);
|
||
|
||
... | ... | |
}
|
||
}
|
||
|
||
if ($self->amount - $self->paid > 0) {
|
||
if (!$self->duedate && !$self->payment_terms) {
|
||
SL::X::ZUGFeRDValidation->throw(message => $prefix . $::locale->text('In case the amount due is positive, either due date or payment term must be set.'));
|
||
}
|
||
}
|
||
|
||
if (_is_profile($self, PROFILE_XRECHNUNG())) {
|
||
if (!$self->customer->c_vendor_routing_id) {
|
||
SL::X::ZUGFeRDValidation->throw(message => $prefix . $::locale->text('The value \'our routing id at customer\' must be set in the customer\'s master data for profile #1.', 'XRechnung 2.0'));
|
Auch abrufbar als: Unified diff
ZUGFeRD: auch ohne Zahlungsbedingung Fälligkeitsdatum übernehmen