Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 09f64724

Von Philip Reetz vor mehr als 15 Jahren hinzugefügt

  • ID 09f6472492fd33fbca181838c48b4c83136172b1
  • Vorgänger 9b04fa2d
  • Nachfolger 256d534f

Bug #826 behoben, Kontenuebersicht angepasst, zusaetzliche Spalte mit dem fortlaufenden Saldo

Unterschiede anzeigen:

bin/mozilla/ca.pl
495 495

  
496 496
  my $saldo_old = format_debit_credit($form->{saldo_old});
497 497
  my $eb_string = format_debit_credit($form->{beginning_balance});
498
  $form->{balance} = $form->{saldo_old};
498 499

  
499 500
  my @options;
500 501
  if ($form->{department}) {
......
524 525

  
525 526
  push @options, $period;
526 527

  
527
  my @columns     = qw(transdate reference description gegenkonto debit credit ustkonto ustrate);
528
  my @columns     = qw(transdate reference description gegenkonto debit credit ustkonto ustrate balance);
528 529
  my %column_defs = (
529 530
    'transdate'   => { 'text' => $locale->text('Date'), },
530 531
    'reference'   => { 'text' => $locale->text('Reference'), },
......
533 534
    'credit'      => { 'text' => $locale->text('Credit'), },
534 535
    'gegenkonto'     => { 'text' => $locale->text('Gegenkonto'), },
535 536
    'ustkonto'     => { 'text' => $locale->text('USt-Konto'), },
536
     'ustrate'     => { 'text' => $locale->text('Satz %'), },
537
    'balance'          => { 'text' => $locale->text('Balance'), },
538
    'ustrate'     => { 'text' => $locale->text('Satz %'), },
537 539
 );
538 540

  
539 541
  my @hidden_variables = qw(accno fromdate todate description accounttype l_heading subtotal department projectnumber project_id sort);
......
571 573
   { 'text' => $locale->text('Credit'), },
572 574
   { 'text' => $locale->text('USt-Konto'), },
573 575
   { 'text' => $locale->text('Satz %'), },
576
   { 'text' => $locale->text('Balance'), },
574 577
 ];
575 578

  
576 579

  
......
595 598

  
596 599
  $report->set_sort_indicator($form->{sort}, 1);
597 600

  
598
  $column_defs->{balance}->{visible} = $form->{accno} ? 1 : 0;
601
  $column_defs->{balance}->{visible} = 1;
599 602

  
600 603
  my $ml = ($form->{category} =~ /(A|E)/) ? -1 : 1;
601 604

  
......
610 613
    foreach (qw(debit credit)) {
611 614
      $subtotals{$_} += $ca->{$_};
612 615
      $totals{$_}    += $ca->{$_};
616
      if ($_ =~ /debit.*/) {
617
        $ml = -1;
618
      } else {
619
        $ml = 1;
620
      }
621
      $form->{balance}= $form->{balance} + $ca->{$_} * $ml;
613 622
      $ca->{$_}       = $form->format_amount(\%myconfig, $ca->{$_}, 2) if ($ca->{$_} != 0);
614 623
    }
615 624

  
......
645 654
      };
646 655
    }
647 656

  
657
    my $sh = "";
658
    if ($form->{balance} < 0) {
659
      $sh = " S";
660
      $ml = -1;
661
    } elsif ($form->{balance} > 0) {
662
      $sh = " H";
663
      $ml = 1;
664
    }
665
    my $data = $form->format_amount(\%myconfig, ($form->{balance} * $ml), 2);
666
    $data .= $sh;
667

  
668
    $row->{balance}->{data}        = $data;
669

  
648 670
    if ($ca->{index} ne $previous_index) {
649 671
#       $report->add_data($row_set) if ($row_set);
650 672

  
......
675 697
  $report->add_separator();
676 698

  
677 699
  my $row = create_subtotal_row(\%totals, \@columns, \%column_alignment, 'listtotal');
678
  $row->{balance}->{data} = $form->format_amount(\%myconfig, $form->{balance} * $ml, 2);
700

  
701
  my $sh = "";
702
  if ($form->{balance} < 0) {
703
    $sh = " S";
704
    $ml = -1;
705
  } elsif ($form->{balance} > 0) {
706
    $sh = " H";
707
    $ml = 1;
708
  }
709
  my $data = $form->format_amount(\%myconfig, ($form->{balance} * $ml), 2);
710
  $data .= $sh;
711

  
712
  $row->{balance}->{data}        = $data;
713

  
679 714
  $report->add_data($row);
680 715

  
681 716

  

Auch abrufbar als: Unified diff