Revision e325dbd2
Von Moritz Bunkus vor mehr als 15 Jahren hinzugefügt
bin/mozilla/gl.pl | ||
---|---|---|
793 | 793 |
my $taxchart_init; |
794 | 794 |
foreach my $item (@{ $form->{ALL_CHARTS} }) { |
795 | 795 |
my $key = $item->{accno} . "--" . $item->{tax_id}; |
796 |
$taxchart_init = $item->{taxkey_id} unless (@chart_values);
|
|
796 |
$taxchart_init = $item->{tax_id} unless (@chart_values); |
|
797 | 797 |
push(@chart_values, $key); |
798 | 798 |
$chart_labels{$key} = $item->{accno} . "--" . $item->{description}; |
799 | 799 |
$charts{$item->{accno}} = $item; |
... | ... | |
804 | 804 |
my %taxcharts = (); |
805 | 805 |
foreach my $item (@{ $form->{ALL_TAXCHARTS} }) { |
806 | 806 |
my $key = $item->{id} . "--" . $item->{rate}; |
807 |
$taxchart_init = $key if ($taxchart_init eq $item->{taxkey});
|
|
807 |
$taxchart_init = $key if ($taxchart_init == $item->{id});
|
|
808 | 808 |
push(@taxchart_values, $key); |
809 | 809 |
$taxchart_labels{$key} = $item->{taxdescription} . " " . $item->{rate} * 100 . ' %'; |
810 | 810 |
$taxcharts{$item->{id}} = $item; |
... | ... | |
839 | 839 |
$selected_taxchart = "$item->{id}--$item->{rate}"; |
840 | 840 |
} |
841 | 841 |
|
842 |
$selected_accno = '' if ($init); |
|
843 |
$selected_taxchart = $taxchart_init unless ($selected_taxchart ne "");
|
|
842 |
$selected_accno = '' if ($init);
|
|
843 |
$selected_taxchart ||= $taxchart_init;
|
|
844 | 844 |
|
845 | 845 |
$accno = qq|<td>| . |
846 | 846 |
NTI($cgi->popup_menu('-name' => "accno_$i", |
... | ... | |
1295 | 1295 |
print qq| |
1296 | 1296 |
<input class=submit type=submit name=action id=update_button value="| . $locale->text('Update') . qq|"> |
1297 | 1297 |
<input class=submit type=submit name=action value="| . $locale->text('Post') . qq|">|; |
1298 |
print $form->parse_html_template('gl/form_footer_initial_taxkey_selection'); |
|
1299 | 1298 |
} |
1300 | 1299 |
|
1301 | 1300 |
print " |
templates/webpages/gl/form_footer_initial_taxkey_selection_de.html | ||
---|---|---|
1 |
<script type="text/javascript"> |
|
2 |
<!-- |
|
3 |
$(document).ready(function() { |
|
4 |
setTaxkey(1); |
|
5 |
setTaxkey(2); |
|
6 |
}); |
|
7 |
--> |
|
8 |
</script> |
templates/webpages/gl/form_footer_initial_taxkey_selection_master.html | ||
---|---|---|
1 |
<script type="text/javascript"> |
|
2 |
<!-- |
|
3 |
$(document).ready(function() { |
|
4 |
setTaxkey(1); |
|
5 |
setTaxkey(2); |
|
6 |
}); |
|
7 |
--> |
|
8 |
</script> |
Auch abrufbar als: Unified diff
Beim Aufrufen der Dialogbuchenmaske automatisch die richtigen Steuersätze für die vorausgewählten Konten und für neu angezeigte Zeilen ("Erneuern") auswählen.
Teil des Fixes für Bug 960.