Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 56041df3

Von Udo Spallek vor fast 18 Jahren hinzugefügt

  • ID 56041df395cc2d8971f822c54f4e48743cc4f22b
  • Vorgänger 0bb6aed5
  • Nachfolger dcef6ec7

Neue Version System-> Kontenuebersicht-> Konten anzeigen.
Bitte testen, steuerliche Zuordnungen noch nicht ganz in Ordnung...

Unterschiede anzeigen:

bin/mozilla/am.pl
40 40

  
41 41
1;
42 42

  
43

  
44

  
43 45
require "$form->{path}/common.pl";
44 46

  
45 47
# end of main
......
528 530
  $callback =
529 531
    "$form->{script}?action=list_account&path=$form->{path}&login=$form->{login}&password=$form->{password}";
530 532

  
531
  @column_index = qw(accno gifi_accno description debit credit link);
532

  
533
  $column_header{accno} = qq|<th>| . $locale->text('Account') . qq|</a></th>|;
534
  $column_header{gifi_accno} =
535
    qq|<th>| . $locale->text('GIFI') . qq|</a></th>|;
536
  $column_header{description} =
537
    qq|<th>| . $locale->text('Description') . qq|</a></th>|;
538
  $column_header{debit}  = qq|<th>| . $locale->text('Debit') . qq|</a></th>|;
539
  $column_header{credit} = qq|<th>| . $locale->text('Credit') . qq|</a></th>|;
540
  $column_header{link}   = qq|<th>| . $locale->text('Link') . qq|</a></th>|;
541

  
542 533
  $form->header;
543
  $colspan = $#column_index + 1;
544

  
545
  print qq|
546
<body>
547

  
548
<table width=100%>
549
  <tr>
550
    <th class=listtop colspan=$colspan>$form->{title}</th>
551
  </tr>
552
  <tr height=5></tr>
553
  <tr class=listheading>
554
|;
555

  
556
  map { print "$column_header{$_}\n" } @column_index;
557

  
558
  print qq|
559
</tr>
560
|;
561 534

  
562 535
  # escape callback
563 536
  $callback = $form->escape($callback);
......
576 549
        $form->format_amount(\%myconfig, -$ca->{amount}, 2, "&nbsp;");
577 550
    }
578 551

  
579
    $ca->{link} =~ s/:/<br>/og;
580

  
581
    if ($ca->{charttype} eq "H") {
582
      print qq|<tr class=listheading>|;
583

  
584
      $column_data{accno} =
585
        qq|<th><a href=$form->{script}?action=edit_account&id=$ca->{id}&path=$form->{path}&login=$form->{login}&password=$form->{password}&callback=$callback>$ca->{accno}</a></th>|;
586
      $column_data{gifi_accno} =
587
        qq|<th><a href=$form->{script}?action=edit_gifi&accno=$ca->{gifi_accno}&path=$form->{path}&login=$form->{login}&password=$form->{password}&callback=$callback>$ca->{gifi_accno}</a>&nbsp;</th>|;
588
      $column_data{description} = qq|<th>$ca->{description}&nbsp;</th>|;
589
      $column_data{debit}       = qq|<th>&nbsp;</th>|;
590
      $column_data{credit}      = qq| <th>&nbsp;</th>|;
591
      $column_data{link}        = qq|<th>&nbsp;</th>|;
592

  
593
    } else {
594
      $i++;
595
      $i %= 2;
596
      print qq|
597
<tr valign=top class=listrow$i>|;
598
      $column_data{accno} =
599
        qq|<td><a href=$form->{script}?action=edit_account&id=$ca->{id}&path=$form->{path}&login=$form->{login}&password=$form->{password}&callback=$callback>$ca->{accno}</a></td>|;
600
      $column_data{gifi_accno} =
601
        qq|<td><a href=$form->{script}?action=edit_gifi&accno=$ca->{gifi_accno}&path=$form->{path}&login=$form->{login}&password=$form->{password}&callback=$callback>$ca->{gifi_accno}</a>&nbsp;</td>|;
602
      $column_data{description} = qq|<td>$ca->{description}&nbsp;</td>|;
603
      $column_data{debit}       = qq|<td align=right>$ca->{debit}</td>|;
604
      $column_data{credit}      = qq|<td align=right>$ca->{credit}</td>|;
605
      $column_data{link}        = qq|<td>$ca->{link}&nbsp;</td>|;
606

  
552
    my @links = split( q{:}, $ca->{link});
553
    
554
    $ca->{link} = q{};
555
    
556
    foreach my $link (@links){
557
      $link = ( $link eq 'AR')             ? $locale->text('Account Link AR')
558
               : ( $link eq 'AP')             ? $locale->text('Account Link AP')
559
               : ( $link eq 'IC')             ? $locale->text('Account Link IC')
560
               : ( $link eq 'AR_amount' )     ? $locale->text('Account Link AR_amount')
561
               : ( $link eq 'AR_paid' )       ? $locale->text('Account Link AR_paid')
562
               : ( $link eq 'AR_tax' )        ? $locale->text('Account Link AR_tax')
563
               : ( $link eq 'AP_amount' )     ? $locale->text('Account Link AP_amount')
564
               : ( $link eq 'AP_paid' )       ? $locale->text('Account Link AP_paid')
565
               : ( $link eq 'AP_tax' )        ? $locale->text('Account Link AP_tax')
566
               : ( $link eq 'IC_sale' )       ? $locale->text('Account Link IC_sale')
567
               : ( $link eq 'IC_cogs' )       ? $locale->text('Account Link IC_cogs')
568
               : ( $link eq 'IC_taxpart' )    ? $locale->text('Account Link IC_taxpart')
569
               : ( $link eq 'IC_income' )     ? $locale->text('Account Link IC_income')
570
               : ( $link eq 'IC_expense' )    ? $locale->text('Account Link IC_expense')
571
               : ( $link eq 'IC_taxservice' ) ? $locale->text('Account Link IC_taxservice')
572
               : ( $link eq 'CT_tax' )        ? $locale->text('Account Link CT_tax')
573
               : $locale->text('Unknown Link') . ': ' . $link;
574
      
575
      $ca->{link} .= qq|[| . $link . qq|]&nbsp;|;
607 576
    }
608

  
609
    map { print "$column_data{$_}\n" } @column_index;
610

  
611
    print "</tr>\n";
577
    
578
    $ca->{startdate} =~ s/,/<br>/og;
579
    $ca->{tk_ustva}  =~ s/,/<br>/og;
580

  
581
    $ca->{taxkey_id}  =~ s/,/<br>/og;
582
    $ca->{taxdescription}  =~ s/,/<br>/og;
583

  
584
    $ca->{datevautomatik} = ($ca->{datevautomatik}) ? $locale->text('On'):q{};
585

  
586
    $ca->{category} = ($ca->{category} eq 'A') ? $locale->text('Account Category A')
587
                    : ($ca->{category} eq 'E') ? $locale->text('Account Category E')
588
                    : ($ca->{category} eq 'L') ? $locale->text('Account Category L')
589
                    : ($ca->{category} eq 'I') ? $locale->text('Account Category I')
590
                    : ($ca->{category} eq 'Q') ? $locale->text('Account Category Q')
591
                    : ($ca->{category} eq 'C') ? $locale->text('Account Category C')
592
                    : ($ca->{category} eq 'G') ? $locale->text('Account Category G')
593
                    : $locale->text('Unknown Category') . ': ' . $ca->{category};
594

  
595
    $ca->{link_edit_account} = 
596
        qq|$form->{script}?action=edit_account&id=$ca->{id}|
597
       .qq|&path=$form->{path}&login=$form->{login}|
598
       .qq|&password=$form->{password}&callback=$callback>$ca->{accno}|;
612 599
  }
600
  
601
  my $parameters_ref = {
602
  
603
  
604
  #   hidden_variables                => $_hidden_variables_ref,
605
  };
606
  
607
  # Ausgabe des Templates
608
  print($form->parse_html_template('am/list_accounts', $parameters_ref));
609
  
610
  $lxdebug->leave_sub();
611
  
613 612

  
614
  print qq|
615
  <tr><td colspan=$colspan><hr size=3 noshade></td></tr>
616
</table>
617

  
618
</body>
619
</html>
620
|;
621

  
622
  $lxdebug->leave_sub();
623 613
}
624 614

  
625 615
sub delete_account {

Auch abrufbar als: Unified diff