From cecc0509e2a2abeaca123ab95a2364eb98d0a380 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20B=C3=BCren?= Date: Sun, 3 Mar 2019 16:00:41 +0100 Subject: [PATCH] =?utf8?q?Reconciliation:=20Veto,=20kein=20invoice=5Famoun?= =?utf8?q?t=20nachtr=C3=A4glich=20setzen.?= MIME-Version: 1.0 Content-Type: text/plain; charset=utf8 Content-Transfer-Encoding: 8bit Im Fehlerfall die Summe der Bank gegenüber der Buchungen an Benutzer (testfall) übergeben. --- SL/Controller/Reconciliation.pm | 6 ++++-- locale/de/all | 1 + 2 files changed, 5 insertions(+), 2 deletions(-) diff --git a/SL/Controller/Reconciliation.pm b/SL/Controller/Reconciliation.pm index c2891315f..76127b1c1 100644 --- a/SL/Controller/Reconciliation.pm +++ b/SL/Controller/Reconciliation.pm @@ -344,7 +344,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 +360,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; } diff --git a/locale/de/all b/locale/de/all index eb9c6a0be..8836f03b3 100755 --- a/locale/de/all +++ b/locale/de/all @@ -3050,6 +3050,7 @@ $self->{texts} = { 'Sum for #1' => 'Summe für #1', 'Sum for section' => 'Summe für Abschnitt', 'Sum of all amounts' => 'Summe aller Beträge', + 'Sum of bank #1 and sum of bookings #2' => 'Summe der Bank #1 und Summe der Buchungen #2', 'Sum open amount' => 'Summierter offener Betrag', 'Sum per' => 'Summe per', 'Summen- und Saldenliste' => 'Summen- und Saldenliste', -- 2.20.1