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; |
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.