Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 33ddf79c

Von Jan Büren vor mehr als 3 Jahren hinzugefügt

  • ID 33ddf79cc8c6a43ed1661a1f04002d62cdf264eb
  • Vorgänger 606b2190
  • Nachfolger 56f1a79e

Für #485 Offene Forderungen zum Stichtag mit aktuellem Status

Liefert den aktuell offenen Betrag zum aktuell letztem Zahlungsdatum

Unterschiede anzeigen:

SL/RP.pm
1298 1298
      phone as customerphone, fax as customerfax, ${ct}number,
1299 1299
      "invnumber", "transdate",
1300 1300
      (amount - COALESCE((SELECT sum(amount)*$ml FROM acc_trans WHERE chart_link ilike '%paid%' AND acc_trans.trans_id=${arap}.id AND acc_trans.transdate <= (date $todate)),0)) as "open", "amount",
1301
      "duedate", invoice, ${arap}.id, date_part('days', now() - duedate) as overduedays, datepaid,
1301
      "duedate", invoice, ${arap}.id, date_part('days', now() - duedate) as overduedays, datepaid, (amount - paid) as current_open,
1302 1302
      (SELECT $buysell
1303 1303
       FROM exchangerate
1304 1304
       WHERE (${arap}.currency_id = exchangerate.currency_id)
bin/mozilla/rp.pl
1006 1006

  
1007 1007
  my $report = SL::ReportGenerator->new(\%myconfig, $form);
1008 1008

  
1009
  my @columns = qw(statement ct invnumber transdate duedate amount open datepaid);
1009
  my @columns = qw(statement ct invnumber transdate duedate amount open datepaid current_open);
1010 1010
  my %column_defs = (
1011 1011
    'statement' => { raw_header_data => SL::Presenter::Tag::checkbox_tag("checkall", checkall => '[name^=statement_]'), 'visible' => $form->{ct} eq 'customer' ? 'HTML' : 0, align => "center" },
1012 1012
    'ct'        => { 'text' => $form->{ct} eq 'customer' ? $locale->text('Customer') : $locale->text('Vendor'), },
......
1015 1015
    'duedate'   => { 'text' => $locale->text('Due'), },
1016 1016
    'amount'    => { 'text' => $locale->text('Amount'), },
1017 1017
    'open'      => { 'text' => $locale->text('Open'), },
1018
    'datepaid'  => { 'text' => $locale->text('Date Paid'), visible => ($form->{reporttype} eq 'custom') },
1018
    'datepaid'  => { 'text' => $locale->text('Date of Last Payment'), visible => ($form->{reporttype} eq 'custom') },
1019
    'current_open' => { 'text' => $locale->text('Open Amount at Last Payment Date'), visible => ($form->{reporttype} eq 'custom') },
1019 1020
  );
1020 1021

  
1021 1022
  my %column_alignment = ('statement' => 'center',
1022
                          map { $_ => 'right' } qw(open amount));
1023
                          map { $_ => 'right' } qw(open amount current_open datepaid));
1023 1024

  
1024 1025
  $report->set_options('std_column_visibility' => 1);
1025 1026
  $report->set_columns(%column_defs);
......
1048 1049
    $form->{title} = sprintf($locale->text('Ap aging on %s'), $form->{todate});
1049 1050
  }
1050 1051

  
1051
  if ($form->{fromdate}) {
1052
    push @options, $locale->text('for Period') . " " . $locale->text('From') . " " .$locale->date(\%myconfig, $form->{fromdate}, 1) . " " . $locale->text('Bis') . " " . $locale->date(\%myconfig, $form->{todate}, 1);
1052
  if ($form->{reporttype} eq 'free') {
1053
    if ($form->{fromdate}) {
1054
      push @options, $locale->text('for Period') . " " . $locale->text('From') . " " .
1055
      $locale->date(\%myconfig, $form->{fromdate}, 1) . " "                          .
1056
      $locale->text('Bis') . " " . $locale->date(\%myconfig, $form->{todate}, 1);
1057
    } else {
1058
      push @options, $locale->text('for Period') . " " . $locale->text('Bis') . " " .
1059
      $locale->date(\%myconfig, $form->{todate}, 1);
1060
    }
1061
  } elsif ($form->{reporttype} eq 'custom') {
1062
    push @options, $locale->text('Reference day') . " " . $locale->date(\%myconfig, $form->{fordate}, 1);
1053 1063
  } else {
1054
    push @options, $locale->text('for Period') . " " . $locale->text('Bis') . " " . $locale->date(\%myconfig, $form->{todate}, 1);
1064
    die "Unknown reporttype for aging";
1055 1065
  }
1056 1066

  
1057 1067
  $attachment_basename = $form->{ct} eq 'customer' ? $locale->text('ar_aging_list') : $locale->text('ap_aging_list');
......
1066 1076

  
1067 1077
  my $previous_ctid = 0;
1068 1078
  my $row_idx       = 0;
1069
  my @periods       = qw(open amount);
1079
  my @periods       = qw(open amount current_open);
1070 1080
  my %subtotals     = map { $_ => 0 } @periods;
1071 1081
  my %totals        = map { $_ => 0 } @periods;
1072 1082

  
locale/de/all
949 949
  'Date Paid'                   => 'Zahlungsdatum',
950 950
  'Date and timestamp variables: If the default value equals \'NOW\' then the current date/current timestamp will be used. Otherwise the default value is copied as-is.' => 'Datums- und Uhrzeitvariablen: Wenn der Standardwert \'NOW\' ist, so wird das aktuelle Datum/die aktuelle Uhrzeit eingefügt. Andernfalls wird der Standardwert so wie er ist benutzt.',
951 951
  'Date missing!'               => 'Datum fehlt!',
952
  'Date of Last Payment'        => 'Letzter Zahlungseingang',
952 953
  'Date the payment is due in full' => 'Das Datum, bis die Rechnung in voller Höhe bezahlt werden muss',
953 954
  'Date the payment is due with discount' => 'Das Datum, bis die Rechnung unter Abzug von Skonto bezahlt werden kann',
954 955
  'Datev export encoding'       => 'DATEV-Export Kodierung',
......
2286 2287
  'Oops. No valid action found to dispatch. Please report this case to the kivitendo team.' => 'Ups. Es wurde keine gültige Funktion zum Aufrufen gefunden. Bitte berichten Sie diesen Fall den kivitendo-Entwicklern.',
2287 2288
  'Open'                        => 'Offen',
2288 2289
  'Open Amount'                 => 'Offener Betrag',
2290
  'Open Amount at Last Payment Date' => 'Offener Betrag zum letzten Zahlungseingang',
2289 2291
  'Open Items'                  => 'Offene Posten',
2290 2292
  'Open Orders'                 => 'Offene Aufträge',
2291 2293
  'Open a further kivitendo window or tab' => 'Weiteres kivitendo-Fenster/-Tab öffnen',

Auch abrufbar als: Unified diff