Revision 1b9d3857
Von Tamino Steinert vor 5 Tagen hinzugefügt
SL/DB/Helper/ZUGFeRD.pm | ||
---|---|---|
388 | 388 |
sub _payment_terms { |
389 | 389 |
my ($self, %params) = @_; |
390 | 390 |
|
391 |
return unless $self->payment_terms; |
|
391 |
return if !$self->payment_terms && !$self->duedate; |
|
392 |
|
|
393 |
if (!$self->payment_terms) { # only duedate |
|
394 |
# <ram:SpecifiedTradePaymentTerms> |
|
395 |
$params{xml}->startTag("ram:SpecifiedTradePaymentTerms"); |
|
396 |
|
|
397 |
# <ram:DueDateDateTime> |
|
398 |
$params{xml}->startTag("ram:DueDateDateTime"); |
|
399 |
$params{xml}->dataElement("udt:DateTimeString", $self->duedate->strftime('%Y%m%d'), format => "102"); |
|
400 |
$params{xml}->endTag; |
|
401 |
# </ram:DueDateDateTime> |
|
402 |
|
|
403 |
$params{xml}->endTag; |
|
404 |
# </ram:SpecifiedTradePaymentTerms> |
|
405 |
return; |
|
406 |
} |
|
392 | 407 |
|
393 | 408 |
my %payment_terms_vars = _calculate_payment_terms_values($self); |
394 | 409 |
|
... | ... | |
722 | 737 |
} |
723 | 738 |
} |
724 | 739 |
|
740 |
if ($self->amount - $self->paid > 0) { |
|
741 |
if (!$self->duedate && !$self->payment_terms) { |
|
742 |
SL::X::ZUGFeRDValidation->throw(message => $prefix . $::locale->text('In case the amount due is positive, either due date or payment term must be set.')); |
|
743 |
} |
|
744 |
} |
|
745 |
|
|
725 | 746 |
if (_is_profile($self, PROFILE_XRECHNUNG())) { |
726 | 747 |
if (!$self->customer->c_vendor_routing_id) { |
727 | 748 |
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