Revision 967813e1
Von Moritz Bunkus vor mehr als 7 Jahren hinzugefügt
bin/mozilla/ap.pl | ||
---|---|---|
451 | 451 |
$form->{"tax_$i"} = $form->format_amount(\%myconfig, $form->{"tax_$i"}, 2); |
452 | 452 |
|
453 | 453 |
my ($default_taxchart, $taxchart_to_use); |
454 |
my $amount_chart_id = $form->{"AP_amount_chart_id_$i"} || $default_ap_amount_chart_id; |
|
455 |
my $chart_has_changed = $::form->{"previous_AP_amount_chart_id_$i"} && ($amount_chart_id != $::form->{"previous_AP_amount_chart_id_$i"}); |
|
456 |
my @taxcharts = GL->get_active_taxes_for_chart($amount_chart_id, $transdate); |
|
454 |
my $amount_chart_id = $form->{"AP_amount_chart_id_$i"} || $default_ap_amount_chart_id; |
|
455 |
my @taxcharts = GL->get_active_taxes_for_chart($amount_chart_id, $transdate); |
|
457 | 456 |
|
458 | 457 |
foreach my $item (@taxcharts) { |
459 | 458 |
my $key = $item->id . "--" . $item->rate; |
... | ... | |
462 | 461 |
$taxchart_to_use = $item if $key eq $form->{"taxchart_$i"}; |
463 | 462 |
} |
464 | 463 |
|
465 |
$taxchart_to_use = $default_taxchart // $first_taxchart if $chart_has_changed || !$taxchart_to_use;
|
|
464 |
$taxchart_to_use //= $default_taxchart // $first_taxchart;
|
|
466 | 465 |
my $selected_taxchart = $taxchart_to_use->id . '--' . $taxchart_to_use->rate; |
467 | 466 |
$form->{"selected_taxchart_$i"} = $selected_taxchart; |
468 | 467 |
$form->{"AP_amount_chart_id_$i"} = $amount_chart_id; |
bin/mozilla/ar.pl | ||
---|---|---|
407 | 407 |
}; |
408 | 408 |
|
409 | 409 |
my (%taxchart_labels, @taxchart_values, $default_taxchart, $taxchart_to_use); |
410 |
my $amount_chart_id = $form->{"AR_amount_chart_id_$i"} // $default_ar_amount_chart_id; |
|
411 |
my $chart_has_changed = $::form->{"previous_AR_amount_chart_id_$i"} && ($amount_chart_id != $::form->{"previous_AR_amount_chart_id_$i"}); |
|
410 |
my $amount_chart_id = $form->{"AR_amount_chart_id_$i"} // $default_ar_amount_chart_id; |
|
412 | 411 |
|
413 | 412 |
foreach my $item ( GL->get_active_taxes_for_chart($amount_chart_id, $transdate) ) { |
414 | 413 |
my $key = $item->id . "--" . $item->rate; |
... | ... | |
420 | 419 |
$taxchart_labels{$key} = $item->taxdescription . " " . $item->rate * 100 . ' %'; |
421 | 420 |
} |
422 | 421 |
|
423 |
$taxchart_to_use = $default_taxchart // $first_taxchart if $chart_has_changed || !$taxchart_to_use;
|
|
422 |
$taxchart_to_use //= $default_taxchart // $first_taxchart;
|
|
424 | 423 |
my $selected_taxchart = $taxchart_to_use->id . '--' . $taxchart_to_use->rate; |
425 | 424 |
|
426 | 425 |
$transaction->{selectAR_amount} = |
bin/mozilla/gl.pl | ||
---|---|---|
816 | 816 |
my %taxchart_labels = (); |
817 | 817 |
my @taxchart_values = (); |
818 | 818 |
|
819 |
my $accno_id = $::form->{"accno_id_$i"}; |
|
820 |
my $chart = $charts_by_id{$accno_id} // $default_chart; |
|
821 |
$accno_id = $chart->{id}; |
|
822 |
my $chart_has_changed = $::form->{"previous_accno_id_$i"} && ($accno_id != $::form->{"previous_accno_id_$i"}); |
|
819 |
my $accno_id = $::form->{"accno_id_$i"}; |
|
820 |
my $chart = $charts_by_id{$accno_id} // $default_chart; |
|
821 |
$accno_id = $chart->{id}; |
|
823 | 822 |
my ($first_taxchart, $default_taxchart, $taxchart_to_use); |
824 | 823 |
|
825 | 824 |
foreach my $item ( GL->get_active_taxes_for_chart($accno_id, $transdate) ) { |
... | ... | |
832 | 831 |
$taxchart_labels{$key} = $item->taxdescription . " " . $item->rate * 100 . ' %'; |
833 | 832 |
} |
834 | 833 |
|
835 |
$taxchart_to_use = $default_taxchart // $first_taxchart if $chart_has_changed || !$taxchart_to_use;
|
|
834 |
$taxchart_to_use //= $default_taxchart // $first_taxchart;
|
|
836 | 835 |
my $selected_taxchart = $taxchart_to_use->id . '--' . $taxchart_to_use->rate; |
837 | 836 |
|
838 | 837 |
my $accno = qq|<td>| . |
Auch abrufbar als: Unified diff
Finanzbuchhaltung: abweichend gesetzte Steuer respektieren
Das Standardsteuerkonto wird inzwischen bereits vom Chart-Picker
belegt. Wenn also die Benutzer*in sowohl Buchungskonto als auch die
Steuer ändert, so sollte das Programm die Steuer nicht erneut setzen.