Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 5b554d89

Von Tamino Steinert vor etwa 1 Jahr hinzugefügt

  • ID 5b554d89b101ec19de8d9dc955ffa1b919091898
  • Vorgänger 47713b33

Kreditorenbuchung: leeres Konto in neuen Zeilen

Unterschiede anzeigen:

bin/mozilla/ap.pl
432 432
  my %project_labels = map { $_->id => $_->projectnumber }  @{ SL::DB::Manager::Project->get_all };
433 433

  
434 434
  my (%charts, %bank_accounts);
435
  my $default_ap_amount_chart_id;
436 435
  # don't add manual bookings for charts which are assigned to real bank accounts
437 436
  # and are flagged for use with bank import
438 437
  my $bank_accounts = SL::DB::Manager::BankAccount->get_all();
......
444 443
  }
445 444

  
446 445
  foreach my $item (@{ $form->{ALL_CHARTS} }) {
447
    if ( grep({ $_ eq 'AP_amount' } @{ $item->{link_split} }) ) {
448
      $default_ap_amount_chart_id //= $item->{id};
449

  
450
    } elsif ( grep({ $_ eq 'AP_paid' } @{ $item->{link_split} }) ) {
446
    if ( grep({ $_ eq 'AP_paid' } @{ $item->{link_split} }) ) {
451 447
      next if $bank_accounts{$item->{accno}};
452 448
      push(@{ $form->{ALL_CHARTS_AP_paid} }, $item);
453 449
    }
......
476 472

  
477 473
  for my $i (1 .. $form->{rowcount}) {
478 474

  
475
    my $amount_chart_id = $form->{"AP_amount_chart_id_$i"};
476
    next if $amount_chart_id eq '';
477

  
479 478
    # format amounts
480 479
    $form->{"amount_$i"} = $form->format_amount(\%myconfig, $form->{"amount_$i"}, 2);
481 480
    $form->{"tax_$i"} = $form->format_amount(\%myconfig, $form->{"tax_$i"}, 2);
......
485 484
    if ( $form->{"taxchart_$i"} ) {
486 485
      ($used_tax_id) = split(/--/, $form->{"taxchart_$i"});
487 486
    }
488
    my $amount_chart_id = $form->{"AP_amount_chart_id_$i"} || $default_ap_amount_chart_id;
489 487

  
490 488
    my @taxcharts       = GL->get_active_taxes_for_chart($amount_chart_id, $taxdate, $used_tax_id);
491 489
    foreach my $item (@taxcharts) {
......
685 683
  my (@a, $j, $totaltax);
686 684
  for my $i (1 .. $form->{rowcount}) {
687 685
    $form->{"amount_$i"} = $form->parse_amount(\%myconfig, $form->{"amount_$i"});
688
    if ($form->{"amount_$i"} || $params{keep_rows_without_amount}) {
686
    if (($form->{"amount_$i"} || $params{keep_rows_without_amount})
687
        && $form->{"AP_amount_chart_id_$i"}) {
689 688
      push @a, {};
690 689
      $j = $#a;
691 690
      my ($taxkey, $rate) = split(/--/, $form->{"taxchart_$i"});
......
838 837

  
839 838
  my $zero_amount_posting = 1;
840 839
  for my $i (1 .. $form->{rowcount}) {
840
    next if $form->{"AP_amount_chart_id_$i"} eq '';
841 841

  
842 842
    # no taxincluded for reverse charge
843 843
    my ($used_tax_id) = split(/--/, $form->{"taxchart_$i"});

Auch abrufbar als: Unified diff