Revision 22ad5a29
Von Jan Büren vor fast 2 Jahren hinzugefügt
bin/mozilla/ap.pl | ||
---|---|---|
444 | 444 |
|
445 | 445 |
my %project_labels = map { $_->id => $_->projectnumber } @{ SL::DB::Manager::Project->get_all }; |
446 | 446 |
|
447 |
my %charts;
|
|
447 |
my (%charts, %bank_accounts);
|
|
448 | 448 |
my $default_ap_amount_chart_id; |
449 |
# don't add manual bookings for charts which are assigned to real bank accounts |
|
450 |
my $bank_accounts = SL::DB::Manager::BankAccount->get_all(); |
|
451 |
foreach my $bank (@{ $bank_accounts }) { |
|
452 |
my $accno_paid_bank = $bank->chart->accno; |
|
453 |
$bank_accounts{$accno_paid_bank} = 1; |
|
454 |
} |
|
449 | 455 |
|
450 | 456 |
foreach my $item (@{ $form->{ALL_CHARTS} }) { |
451 | 457 |
if ( grep({ $_ eq 'AP_amount' } @{ $item->{link_split} }) ) { |
452 | 458 |
$default_ap_amount_chart_id //= $item->{id}; |
453 | 459 |
|
454 | 460 |
} elsif ( grep({ $_ eq 'AP_paid' } @{ $item->{link_split} }) ) { |
461 |
next if $bank_accounts{$item->{accno}}; |
|
455 | 462 |
push(@{ $form->{ALL_CHARTS_AP_paid} }, $item); |
456 | 463 |
} |
457 | 464 |
|
bin/mozilla/ar.pl | ||
---|---|---|
406 | 406 |
|
407 | 407 |
my %project_labels = map { $_->{id} => $_->{projectnumber} } @{ $form->{"ALL_PROJECTS"} }; |
408 | 408 |
|
409 |
my (@AR_paid_values, %AR_paid_labels); |
|
409 |
my (@AR_paid_values, %AR_paid_labels, %bank_accounts);
|
|
410 | 410 |
my $default_ar_amount_chart_id; |
411 |
|
|
411 |
# don't add manual bookings for charts which are assigned to real bank accounts |
|
412 |
my $bank_accounts = SL::DB::Manager::BankAccount->get_all(); |
|
413 |
foreach my $bank (@{ $bank_accounts }) { |
|
414 |
my $accno_paid_bank = $bank->chart->accno; |
|
415 |
$bank_accounts{$accno_paid_bank} = 1; |
|
416 |
} |
|
412 | 417 |
foreach my $item (@{ $form->{ALL_CHARTS} }) { |
413 | 418 |
if ($item->{link_split}{AR_amount}) { |
414 | 419 |
$default_ar_amount_chart_id //= $item->{id}; |
415 | 420 |
|
416 | 421 |
} elsif ($item->{link_split}{AR_paid}) { |
422 |
next if $bank_accounts{$item->{accno}}; |
|
417 | 423 |
push(@AR_paid_values, $item->{accno}); |
418 | 424 |
$AR_paid_labels{$item->{accno}} = "$item->{accno}--$item->{description}"; |
419 | 425 |
} |
bin/mozilla/ir.pl | ||
---|---|---|
591 | 591 |
if ($form->date_closed($form->{"gldate_$i"})) { |
592 | 592 |
$form->{"changeable_$i"} = 0; |
593 | 593 |
} |
594 |
|
|
594 |
# don't add manual bookings for charts which are assigned to real bank accounts |
|
595 |
my $bank_accounts = SL::DB::Manager::BankAccount->get_all(); |
|
596 |
foreach my $bank (@{ $bank_accounts }) { |
|
597 |
my $accno_paid_bank = $bank->chart->accno; |
|
598 |
$form->{selectAP_paid} =~ s/<option>$accno_paid_bank--(.*?)<\/option>//; |
|
599 |
} |
|
595 | 600 |
$form->{"selectAP_paid_$i"} = $form->{selectAP_paid}; |
596 | 601 |
if (!$form->{"AP_paid_$i"}) { |
597 | 602 |
$form->{"selectAP_paid_$i"} =~ s/option>$accno_arap--(.*?)>/option selected>$accno_arap--$1>/; |
bin/mozilla/is.pl | ||
---|---|---|
771 | 771 |
if ($form->date_closed($form->{"gldate_$i"})) { |
772 | 772 |
$form->{"changeable_$i"} = 0; |
773 | 773 |
} |
774 |
# don't add manual bookings for charts which are assigned to real bank accounts |
|
775 |
my $bank_accounts = SL::DB::Manager::BankAccount->get_all(); |
|
776 |
foreach my $bank (@{ $bank_accounts }) { |
|
777 |
my $accno_paid_bank = $bank->chart->accno; |
|
778 |
$form->{selectAR_paid} =~ s/<option>$accno_paid_bank--(.*?)<\/option>//; |
|
779 |
} |
|
774 | 780 |
|
775 | 781 |
$form->{"selectAR_paid_$i"} = $form->{selectAR_paid}; |
776 | 782 |
if (!$form->{"AR_paid_$i"}) { |
Auch abrufbar als: Unified diff
Zahlungsbuchung in Belegen: Konten ausblenden, die über Bank verbucht werden