}
# preselection chart type
- my $select_charttype = q{};
-
- my %charttype = (
- 'A' => $locale->text('Account'),
- 'H' => $locale->text('Heading'),
- );
-
- foreach my $item ( sort({ $a <=> $b } keys %charttype) ) {
- if ($item eq $form->{charttype}) {
- $select_charttype .= qq|<option value="$item" selected="selected">$charttype{$item}\n|;
-
- } else {
- $select_charttype .= qq|<option value="$item">$charttype{$item}\n|;
- }
+ my @all_charttypes = ({'name' => $locale->text('Account'), 'value' => 'A'},
+ {'name' => $locale->text('Heading'), 'value' => 'H'},
+ );
+ my $selected_charttype = $form->{charttype};
- }
# account where AR_tax or AP_tax is set are not orphaned if they are used as
# tax-o-matic account
ChartTypeIsAccount => $ChartTypeIsAccount,
AccountIsPosted => $AccountIsPosted,
select_category => $select_category,
- select_charttype => $select_charttype,
+ all_charttypes => \@all_charttypes,
+ selected_charttype => $selected_charttype,
select_bwa => $select_bwa,
select_bilanz => $select_bilanz,
select_eur => $select_eur,
- Bugfix 1760 - 1760: Bei einem Lieferschein wird die Abteilung nicht mitgespeichert
- Bugfix 1752: Rechnung -> Druckvorschau ignoriert Änderung des Steuersatz beim Beleg
- Bugfix 1708: Fehlender Übertrag der Lieferadresse von Angebot -> Auftragsbestätigung
+ - Bugfix 1648: bebuchte Konten sollten nicht in Überschriften umgewandelt werden können
2011-06-15 - Release 2.6.3
</label>
</td>
- <td><select name="charttype">[% select_charttype %]</select></td>
+ <td>
+[% IF AccountIsPosted %]
+ [% L.select_tag('dummy_charttype',
+ L.options_for_select(all_charttypes,
+ title => 'name', value => 'value',
+ default => selected_charttype),
+ disabled => '1') %]
+ [% L.hidden_tag('charttype', selected_charttype) %]
+[% ELSE %]
+ [% L.select_tag('charttype',
+ L.options_for_select(all_charttypes,
+ title => 'name', value => 'value',
+ default => selected_charttype)) %]
+[% END %]
+ </td>
</tr>
</table>
</fieldset>
+
<fieldset class="DEPENDS ON charttype BEING A">
<legend>[% 'Account Type' | $T8 %]</legend>
<select name="category" id="AccountType" class="DEPENDS ON charttype BEING A">