X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=SL%2FForm.pm;h=849167363a05dcdde05e4cd920b1adad5ea79451;hb=60e09e25d76ec7c0a4f8431df0bc7a3b25e9041a;hp=810552b1c6cc6ed03552858385b1e3b3a9b81a2c;hpb=2bbd4152c4ead167ccbe5dd3487f5be10f787645;p=kivitendo-erp.git diff --git a/SL/Form.pm b/SL/Form.pm index 810552b1c..849167363 100644 --- a/SL/Form.pm +++ b/SL/Form.pm @@ -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"; } @@ -496,14 +501,16 @@ sub header { push @header, ""; } - push @header, map { qq|| } $self->use_stylesheet; + push @header, map { qq|| } $self->use_stylesheet; push @header, "" if $self->{landscape}; push @header, "" if -f $self->{favicon}; push @header, map { qq|| } 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|| } - qw(main menu tabcontent list_accounts jquery.autocomplete jquery.multiselect2side frame_header/header); + 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|| } push @header, map { $_->show_javascript } @{ $self->{AJAX} || [] }; push @header, "" if $self->{fokus}; push @header, sprintf "", @@ -588,7 +595,7 @@ sub set_standard_title { $::lxdebug->enter_sub; my $self = shift; - $self->{titlebar} = "Lx-Office " . $::locale->text('Version') . " $self->{version}"; + $self->{titlebar} = "kivitendo " . $::locale->text('Version') . " $self->{version}"; $self->{titlebar} .= "- $::myconfig{name}" if $::myconfig{name}; $self->{titlebar} .= "- $::myconfig{dbname}" if $::myconfig{name}; @@ -1107,10 +1114,10 @@ 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, + UNLINK => ($::lx_office_conf{debug} && $::lx_office_conf{debug}->{keep_temp_files})? 0 : 1, ); close $temp_fh; @@ -2539,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); }