Revision e7117e52
Von Jan Büren vor etwa 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 |
|
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 | ||
---|---|---|
580 | 580 |
if ($form->date_closed($form->{"gldate_$i"})) { |
581 | 581 |
$form->{"changeable_$i"} = 0; |
582 | 582 |
} |
583 |
|
|
583 |
# don't add manual bookings for charts which are assigned to real bank accounts |
|
584 |
my $bank_accounts = SL::DB::Manager::BankAccount->get_all(); |
|
585 |
foreach my $bank (@{ $bank_accounts }) { |
|
586 |
my $accno_paid_bank = $bank->chart->accno; |
|
587 |
$form->{selectAP_paid} =~ s/<option>$accno_paid_bank--(.*?)<\/option>//; |
|
588 |
} |
|
584 | 589 |
$form->{"selectAP_paid_$i"} = $form->{selectAP_paid}; |
585 | 590 |
if (!$form->{"AP_paid_$i"}) { |
586 | 591 |
$form->{"selectAP_paid_$i"} =~ s/option>$accno_arap--(.*?)>/option selected>$accno_arap--$1>/; |
bin/mozilla/is.pl | ||
---|---|---|
764 | 764 |
if ($form->date_closed($form->{"gldate_$i"})) { |
765 | 765 |
$form->{"changeable_$i"} = 0; |
766 | 766 |
} |
767 |
# don't add manual bookings for charts which are assigned to real bank accounts |
|
768 |
my $bank_accounts = SL::DB::Manager::BankAccount->get_all(); |
|
769 |
foreach my $bank (@{ $bank_accounts }) { |
|
770 |
my $accno_paid_bank = $bank->chart->accno; |
|
771 |
$form->{selectAR_paid} =~ s/<option>$accno_paid_bank--(.*?)<\/option>//; |
|
772 |
} |
|
767 | 773 |
|
768 | 774 |
$form->{"selectAR_paid_$i"} = $form->{selectAR_paid}; |
769 | 775 |
if (!$form->{"AR_paid_$i"}) { |
Auch abrufbar als: Unified diff
Zahlungsbuchung in Belegen: Konten ausblenden, die über Bank verbucht werden