X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FController%2FReconciliation.pm;h=6f8ebfe8f8dceb2224d34bcca2ed5f67bf404eb2;hb=c6913fd763664cb1d352c80317d3266c2af7dadc;hp=c2891315fae64b8405361992af35172db509f089;hpb=21834d2cfc47063cd0a730a20ff532d07d94def1;p=kivitendo-erp.git diff --git a/SL/Controller/Reconciliation.pm b/SL/Controller/Reconciliation.pm index c2891315f..6f8ebfe8f 100644 --- a/SL/Controller/Reconciliation.pm +++ b/SL/Controller/Reconciliation.pm @@ -183,9 +183,6 @@ sub action_reconcile_proposals { my $rec_group = SL::DB::Manager::ReconciliationLink->get_new_rec_group(); my $bank_transaction = SL::DB::Manager::BankTransaction->find_by(id => $bt_id); $bank_transaction->cleared('1'); - if ( $bank_transaction->isa('SL::DB::BankTransaction') ) { - $bank_transaction->invoice_amount($bank_transaction->amount); - } $bank_transaction->save; foreach my $acc_trans_id (@{ $::form->{proposal_list}->{$bt_id}->{BB} }) { SL::DB::ReconciliationLink->new( @@ -344,7 +341,7 @@ sub _get_elements_and_validate { } if ($::form->round_amount($bt_sum + $bb_sum, 2) != 0) { - push @errors, t8('Out of balance!'); + push @errors, t8('Out of balance!'), t8('Sum of bank #1 and sum of bookings #2',$bt_sum, $bb_sum); } $self->{ELEMENTS} = \@elements; @@ -360,7 +357,9 @@ sub _reconcile { # 1. step: set AccTrans and BankTransactions to 'cleared' foreach my $element (@{ $self->{ELEMENTS} }) { $element->cleared('1'); - $element->invoice_amount($element->amount) if $element->isa('SL::DB::BankTransaction'); + # veto either invoice_amount is fully assigned or not! No state tricks in later workflow! + # invoice_amount should be a distinct sign, that some bookings were really made from a bank transaction + # $element->invoice_amount($element->amount) if $element->isa('SL::DB::BankTransaction'); $element->save; }