Revision b3835437
Von Martin Helmling vor fast 8 Jahren hinzugefügt
SL/DB/Helper/Payment.pm | ||
---|---|---|
323 | 323 |
my $is_sales = ref($self) eq 'SL::DB::Invoice'; |
324 | 324 |
|
325 | 325 |
my $skonto_date; |
326 |
|
|
327 |
if ( $is_sales ) { |
|
328 |
return undef unless ref $self->payment_terms; |
|
329 |
return undef unless $self->payment_terms->terms_skonto > 0; |
|
330 |
$skonto_date = DateTime->from_object(object => $self->transdate)->add(days => $self->payment_terms->terms_skonto); |
|
331 |
} else { |
|
332 |
return undef unless ref $self->vendor->payment_terms; |
|
333 |
return undef unless $self->vendor->payment_terms->terms_skonto > 0; |
|
334 |
$skonto_date = DateTime->from_object(object => $self->transdate)->add(days => $self->vendor->payment_terms->terms_skonto); |
|
335 |
}; |
|
326 |
return undef unless ref $self->payment_terms; |
|
327 |
return undef unless $self->payment_terms->terms_skonto > 0; |
|
328 |
$skonto_date = DateTime->from_object(object => $self->transdate)->add(days => $self->payment_terms->terms_skonto); |
|
336 | 329 |
|
337 | 330 |
return $skonto_date; |
338 | 331 |
}; |
... | ... | |
428 | 421 |
|
429 | 422 |
my $percent_skonto = 0; |
430 | 423 |
|
431 |
if ( $is_sales ) { |
|
432 |
return undef unless ref $self->payment_terms; |
|
433 |
return undef unless $self->payment_terms->percent_skonto > 0; |
|
434 |
$percent_skonto = $self->payment_terms->percent_skonto; |
|
435 |
} else { |
|
436 |
return undef unless ref $self->vendor->payment_terms; |
|
437 |
return undef unless $self->vendor->payment_terms->terms_skonto > 0; |
|
438 |
$percent_skonto = $self->vendor->payment_terms->percent_skonto; |
|
439 |
}; |
|
424 |
return undef unless ref $self->payment_terms; |
|
425 |
return undef unless $self->payment_terms->percent_skonto > 0; |
|
426 |
$percent_skonto = $self->payment_terms->percent_skonto; |
|
440 | 427 |
|
441 | 428 |
return $percent_skonto; |
442 | 429 |
}; |
SL/SEPA.pm | ||
---|---|---|
33 | 33 |
# currently there is no option in vendor invoices for setting payment terms, |
34 | 34 |
# so the vendor settings are always used |
35 | 35 |
|
36 |
my $payment_term_type = $params{vc} eq 'customer' ? "${arap}" : 'vc'; |
|
36 |
# Opendynamic: Es gibt es die Option Zahlungsbedingungen zu setzen |
|
37 |
my $payment_term_type = "${arap}"; |
|
37 | 38 |
|
38 | 39 |
# Flag for direct debit. For SEPA bank transfers vendors flagged |
39 | 40 |
# with »direct debit« should not be shown. Similarly for SEPA bank |
Auch abrufbar als: Unified diff
SEPA-Skonto-Erweiterung: falsche Skonto-Informationen
Da im Kivi-Master keine dokumentenspezifischen Skonti für Lieferanten eingebaut sind,
wurde hier immer der Skonto des Lieferanten genommen.
Nun werden die Skonti aus den Dokumenten genommen.
Auch im Payment-Helper werden nur die Lieferanten-Skonti berücksichtigt.
Nun werden die Skonti aus den Dokumenten genommen.
fix EGW #4179