Revision 8809a4d1
Von Kivitendo Admin vor mehr als 9 Jahren hinzugefügt
SL/Controller/BankTransaction.pm | ||
---|---|---|
use SL::DB::Draft;
|
||
use SL::DB::BankAccount;
|
||
use SL::Presenter;
|
||
use SL::DB::Helper::Payment qw(validate_payment_type);
|
||
use List::Util qw(max);
|
||
|
||
use Rose::Object::MakeMethods::Generic
|
||
... | ... | |
|
||
foreach my $invoice (@invoices) {
|
||
my $payment_type;
|
||
if (@{ $skonto_hash->{"$bt_id"} }) {
|
||
if ( defined $skonto_hash->{"$bt_id"} ) {
|
||
$payment_type = shift(@{ $skonto_hash->{"$bt_id"} });
|
||
SL::DB::Helper::Payment->validate_payment_type($payment_type);
|
||
} else {
|
||
$payment_type = 'without_skonto';
|
||
};
|
Auch abrufbar als: Unified diff
Banktransactions - beim Speichern der Rechnung Zahlungsart prüfen
ob es einem gültigen payment type entspricht.
Außerdem korrekte Variablenprüfung, für den Fall, daß kein payment_term
gesetzt ist.