Merge branch 'master' of vc.linet-services.de:public/lx-office-erp
authorG. Richardson <information@lx-office-hosting.de>
Tue, 13 Mar 2012 15:38:38 +0000 (16:38 +0100)
committerG. Richardson <information@lx-office-hosting.de>
Tue, 13 Mar 2012 15:38:38 +0000 (16:38 +0100)
SL/Form.pm
bin/mozilla/ca.pl
templates/webpages/amcvar/render_inputs.html

index 32675d8..050614d 100644 (file)
@@ -464,7 +464,12 @@ sub get_stylesheet_for_user {
   my $css_path = 'css';
   if (my $user_style = $::myconfig{stylesheet}) {
     $user_style =~ s/\.css$//; # nuke trailing .css, this is a remnand of pre 2.7.0 stylesheet handling
-    $css_path = "$css_path/$user_style" if -d "$css_path/$user_style";
+    if (-d "$css_path/$user_style" &&
+        -f "$css_path/$user_style/main.css") {
+      $css_path = "$css_path/$user_style";
+    } else {
+      $css_path = "$css_path/lx-office-erp";
+    }
   } else {
     $css_path = "$css_path/lx-office-erp";
   }
@@ -2540,13 +2545,17 @@ sub all_vc {
 
   $table = $table eq "customer" ? "customer" : "vendor";
 
-  my $query = qq|SELECT count(*) FROM $table WHERE NOT obsolete|;
+  # build selection list
+  # Hotfix für Bug 1837 - Besser wäre es alte Buchungsbelege
+  # OHNE Auswahlliste (reines Textfeld) zu laden. Hilft aber auch
+  # nicht für veränderbare Belege (oe, do, ...)
+  my $obsolete = "WHERE NOT obsolete" unless $self->{id};
+  my $query = qq|SELECT count(*) FROM $table $obsolete|;
   my ($count) = selectrow_query($self, $dbh, $query);
 
-  # build selection list
-  if ($count <= $myconfig->{vclimit}) {
+  if ($count < $myconfig->{vclimit}) {
     $query = qq|SELECT id, name, salesman_id
-                FROM $table WHERE NOT obsolete
+                FROM $table $obsolete
                 ORDER BY name|;
     $self->{"all_$table"} = selectall_hashref_query($self, $dbh, $query);
   }
index fcff5cf..af6c6c8 100644 (file)
@@ -359,7 +359,7 @@ sub list_transactions {
 
   $form->{callback} = $link . '&sort=' . E($form->{sort});
 
-  my %column_alignment = map { $_ => 'right' } qw(debit credit);
+  my %column_alignment = map { $_ => 'right' } qw(debit credit balance);
 
   my @custom_headers = ();
  # Zeile 1:
index f4f1c63..a69101b 100644 (file)
@@ -31,7 +31,7 @@
 
 <select name="[% var_name %]">
  [%- FOREACH option = var.OPTIONS %]
- <option[% IF option.value == var.value %] selected[% END %]>[% HTML.escape(option.value) %]</option>
+ <option value="[% option.value | html %]"[% IF option.value == var.value %] selected[% END %]>[% HTML.escape(option.value) %]</option>
  [%- END %]
 </select>