Revision e7117e52
Von Jan Büren vor fast 2 Jahren hinzugefügt
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 |
|
Auch abrufbar als: Unified diff
Zahlungsbuchung in Belegen: Konten ausblenden, die über Bank verbucht werden