Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision dd40d937

Von Jan Büren vor etwa 2 Jahren hinzugefügt

  • ID dd40d93718b867f1209499502c523f329ab32f81
  • Vorgänger 1fdb8bc7
  • Nachfolger 5104f579

Zahlungsbuchung in Belegen: Konten ausblenden, die über Bank verbucht werden

Unterschiede anzeigen:

bin/mozilla/ap.pl
437 437

  
438 438
  my %project_labels = map { $_->id => $_->projectnumber }  @{ SL::DB::Manager::Project->get_all };
439 439

  
440
  my %charts;
440
  my (%charts, %bank_accounts);
441 441
  my $default_ap_amount_chart_id;
442
  # don't add manual bookings for charts which are assigned to real bank accounts
443
  my $bank_accounts = SL::DB::Manager::BankAccount->get_all();
444
  foreach my $bank (@{ $bank_accounts }) {
445
    my $accno_paid_bank = $bank->chart->accno;
446
    $bank_accounts{$accno_paid_bank} = 1;
447
  }
442 448

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

  
447 453
    } elsif ( grep({ $_ eq 'AP_paid' } @{ $item->{link_split} }) ) {
454
      next if $bank_accounts{$item->{accno}};
448 455
      push(@{ $form->{ALL_CHARTS_AP_paid} }, $item);
449 456
    }
450 457

  
bin/mozilla/ar.pl
399 399

  
400 400
  my %project_labels = map { $_->{id} => $_->{projectnumber} } @{ $form->{"ALL_PROJECTS"} };
401 401

  
402
  my (@AR_paid_values, %AR_paid_labels);
402
  my (@AR_paid_values, %AR_paid_labels, %bank_accounts);
403 403
  my $default_ar_amount_chart_id;
404

  
404
  # don't add manual bookings for charts which are assigned to real bank accounts
405
  my $bank_accounts = SL::DB::Manager::BankAccount->get_all();
406
  foreach my $bank (@{ $bank_accounts }) {
407
    my $accno_paid_bank = $bank->chart->accno;
408
    $bank_accounts{$accno_paid_bank} = 1;
409
  }
405 410
  foreach my $item (@{ $form->{ALL_CHARTS} }) {
406 411
    if ($item->{link_split}{AR_amount}) {
407 412
      $default_ar_amount_chart_id //= $item->{id};
408 413

  
409 414
    } elsif ($item->{link_split}{AR_paid}) {
415
      next if $bank_accounts{$item->{accno}};
410 416
      push(@AR_paid_values, $item->{accno});
411 417
      $AR_paid_labels{$item->{accno}} = "$item->{accno}--$item->{description}";
412 418
    }
bin/mozilla/ir.pl
569 569
    if ($form->date_closed($form->{"gldate_$i"})) {
570 570
      $form->{"changeable_$i"} = 0;
571 571
    }
572

  
572
    # don't add manual bookings for charts which are assigned to real bank accounts
573
    my $bank_accounts = SL::DB::Manager::BankAccount->get_all();
574
    foreach my $bank (@{ $bank_accounts }) {
575
      my $accno_paid_bank = $bank->chart->accno;
576
      $form->{selectAP_paid} =~ s/<option>$accno_paid_bank--(.*?)<\/option>//;
577
    }
573 578
    $form->{"selectAP_paid_$i"} = $form->{selectAP_paid};
574 579
    if (!$form->{"AP_paid_$i"}) {
575 580
      $form->{"selectAP_paid_$i"} =~ s/option>$accno_arap--(.*?)>/option selected>$accno_arap--$1>/;
bin/mozilla/is.pl
763 763
    if ($form->date_closed($form->{"gldate_$i"})) {
764 764
      $form->{"changeable_$i"} = 0;
765 765
    }
766
    # don't add manual bookings for charts which are assigned to real bank accounts
767
    my $bank_accounts = SL::DB::Manager::BankAccount->get_all();
768
    foreach my $bank (@{ $bank_accounts }) {
769
      my $accno_paid_bank = $bank->chart->accno;
770
      $form->{selectAR_paid} =~ s/<option>$accno_paid_bank--(.*?)<\/option>//;
771
    }
766 772

  
767 773
    $form->{"selectAR_paid_$i"} = $form->{selectAR_paid};
768 774
    if (!$form->{"AR_paid_$i"}) {

Auch abrufbar als: Unified diff