Merge remote-tracking branch 'cebitversion/kivitendo_style'
authorSven Schöling <s.schoeling@linet-services.de>
Tue, 3 Apr 2012 09:53:03 +0000 (11:53 +0200)
committerSven Schöling <s.schoeling@linet-services.de>
Tue, 3 Apr 2012 09:53:03 +0000 (11:53 +0200)
Conflicts:
SL/Form.pm

1  2 
SL/Form.pm

diff --combined SL/Form.pm
@@@ -464,12 -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";
    }
@@@ -507,7 -502,6 +507,7 @@@ sub header 
    push @header, "<link rel='shortcut icon' href='$self->{favicon}' type='image/x-icon'>" if -f $self->{favicon};
    push @header, map { qq|<script type="text/javascript" src="js/$_.js"></script>| }
         qw(jquery common jscalendar/calendar jscalendar/lang/calendar-de jscalendar/calendar-setup part_selection jquery-ui jqModal switchmenuframe);
 +  push @header, $self->{javascript} if $self->{javascript};
    push @header, map { qq|<link rel="stylesheet" type="text/css" href="$css_path/$_.css">| }
         qw(main menu tabcontent list_accounts jquery.autocomplete jquery.multiselect2side frame_header/header ui-lightness/jquery-ui-1.8.12.custom);
    push @header, map { qq|<link rel="stylesheet" type="text/css" href="js/jscalendar/calendar-win2k-1.css">| }
@@@ -1114,7 -1108,7 +1114,7 @@@ sub parse_template 
    $suffix =  $self->{IN};
    $suffix =~ s/.*\.//;
    ($temp_fh, $self->{tmpfile}) = File::Temp::tempfile(
-     'lx-office-printXXXXXX',
+     'kivitendo-printXXXXXX',
      SUFFIX => '.' . ($suffix || 'tex'),
      DIR    => $userspath,
      UNLINK => 1,
@@@ -2546,17 -2540,13 +2546,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);
    }