Kontoauszug verbuchen -> Buchung erstellen -> Dialogbuchung nur abs()
authorJan Büren <jan@kivitendo-premium.de>
Sat, 12 Aug 2017 14:54:31 +0000 (16:54 +0200)
committerJan Büren <jan@kivitendo-premium.de>
Sat, 12 Aug 2017 14:54:31 +0000 (16:54 +0200)
Ob die Zahlung positiv oder negativ ist, bestimmt die Soll und Haben
in der Maske Dialogbuchung und liegt somit in der Hand des Anwenders,
 in welche Vorlage er buchen will.

SL/Controller/BankTransaction.pm

index 6684b8a..85e9674 100644 (file)
@@ -888,7 +888,7 @@ sub load_gl_record_template_url {
     controller                           => 'gl.pl',
     action                               => 'load_record_template',
     id                                   => $template->id,
-    'form_defaults.amount_1'             => -1 * $self->transaction->amount,
+    'form_defaults.amount_1'             => abs($self->transaction->amount), # always positive
     'form_defaults.transdate'            => $self->transaction->transdate_as_date,
     'form_defaults.callback'             => $self->callback,
   );