Gesammtbetrag in der Maske für SEPA Überweisung ausgeben.
authorWaldemar Toews <waldemar.toews@opendynamic.de>
Wed, 13 Feb 2013 15:39:03 +0000 (16:39 +0100)
committerMoritz Bunkus <m.bunkus@linet-services.de>
Tue, 7 Jan 2014 15:34:55 +0000 (16:34 +0100)
bin/mozilla/sepa.pl
locale/de/all
templates/webpages/sepa/bank_transfer_create.html

index 2850bfb..3ac7c3e 100755 (executable)
@@ -1,7 +1,7 @@
 use strict;
 
 use List::MoreUtils qw(any none uniq);
-use List::Util qw(first);
+use List::Util qw(sum first);
 use POSIX qw(strftime);
 
 use SL::BankAccount;
@@ -105,6 +105,8 @@ sub bank_transfer_create {
     $form->error($locale->text('You have selected none of the invoices.'));
   }
 
+  my $total_trans = sum map { $_->{open_amount} } @bank_transfers;
+
   my ($vc_bank_info);
   my $error_message;
 
@@ -136,6 +138,7 @@ sub bank_transfer_create {
                                        'bank_account_label' => $bank_account_label_sub,
                                        'error_message'      => $error_message,
                                        'vc'                 => $vc,
+                                       'total_trans'        => $total_trans,
                                      });
 
   } else {
index e7c9de4..9e50555 100755 (executable)
@@ -2000,6 +2000,7 @@ $self->{texts} = {
   'Sum Credit'                  => 'Summe Haben',
   'Sum Debit'                   => 'Summe Soll',
   'Sum for'                     => 'Summe für',
+  'Sum open amount'             => 'Summierter offener Betrag',
   'Sum per'                     => 'Summe per',
   'Summen- und Saldenliste'     => 'Summen- und Saldenliste',
   'Superuser name'              => 'Datenbankadministrator',
index 561baec..0924982 100644 (file)
    </table>
   </p>
 
+  <p>
+   [% 'Sum open amount' | $T8 %]: [% LxERP.format_amount(total_trans, -2) %]
+  </p>
+
   <p>
    [%- IF is_vendor %]
     <input type="submit" class="submit" name="action_bank_transfer_create" value="[% 'Create bank transfer' | $T8 %]">