Merge branch 'master' of vc.linet-services.de:public/lx-office-erp
authorBernd Blessmann <bibi@online.de>
Wed, 11 Jan 2012 14:44:08 +0000 (15:44 +0100)
committerBernd Blessmann <bibi@online.de>
Wed, 11 Jan 2012 14:44:08 +0000 (15:44 +0100)
bin/mozilla/am.pl
doc/changelog
templates/webpages/am/edit_accounts.html

index 997fd2c..2dacb6f 100644 (file)
@@ -328,22 +328,11 @@ sub account_header {
   }
 
   # 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
@@ -362,7 +351,8 @@ sub account_header {
     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,
index 28cb786..c19e8c4 100644 (file)
@@ -86,6 +86,7 @@
   - 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
index bb8d484..4a7503d 100644 (file)
@@ -60,10 +60,25 @@ window.onload = function() {
 
         </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">