Revision e271f064
Von Jan Büren vor mehr als 6 Jahren hinzugefügt
SL/Controller/BankTransaction.pm | ||
---|---|---|
555 | 555 |
}; |
556 | 556 |
} |
557 | 557 |
|
558 |
my $bank_transaction = $data{bank_transaction}; |
|
559 |
|
|
560 |
# see pod |
|
561 |
if (@{ $bank_transaction->linked_invoices } || $bank_transaction->invoice_amount != 0) { |
|
562 |
return { |
|
563 |
%data, |
|
564 |
result => 'error', |
|
565 |
message => $::locale->text("Bank transaction with id #1 has already been linked to one or more record and/or some amount is already assigned.", $bank_transaction->id), |
|
566 |
}; |
|
567 |
} |
|
558 | 568 |
my (@warnings); |
559 | 569 |
|
560 | 570 |
my $worker = sub { |
561 | 571 |
my $bt_id = $data{bank_transaction_id}; |
562 |
my $bank_transaction = $data{bank_transaction}; |
|
563 | 572 |
my $sign = $bank_transaction->amount < 0 ? -1 : 1; |
564 | 573 |
my $amount_of_transaction = $sign * $bank_transaction->amount; |
565 | 574 |
my $payment_received = $bank_transaction->amount > 0; |
Auch abrufbar als: Unified diff
save_single_bank_transaction dem caller weniger erlauben
Als Konsequenz zum beschriebenem Verhalten im POD