return @{ $self->{stylesheet} };
}
+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
+ 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";
+ }
+ $::myconfig{css_path} = $css_path; # needed for menunew, FIXME: don't do this here
+
+ return $css_path;
+}
+
sub header {
$::lxdebug->enter_sub;
$::lxdebug->leave_sub and return if !$ENV{HTTP_USER_AGENT} || $self->{header}++;
+ my $css_path = $self->get_stylesheet_for_user;
+
$self->{favicon} ||= "favicon.ico";
$self->{titlebar} = "$self->{title} - $self->{titlebar}" if $self->{title};
push @header, "<meta http-equiv='refresh' content='$refresh_time;$refresh_url'>";
}
- push @header, map { qq|<link rel="stylesheet" href="$_" type="text/css" title="Lx-Office stylesheet">| } $self->use_stylesheet;
+ push @header, map { qq|<link rel="stylesheet" href="$_" type="text/css" title="Stylesheet">| } $self->use_stylesheet;
push @header, "<style type='text/css'>\@page { size:landscape; }</style>" if $self->{landscape};
push @header, "<link rel='shortcut icon' href='$self->{favicon}' type='image/x-icon'>" if -f $self->{favicon};
- push @header, '<script type="text/javascript" src="js/jquery.js"></script>',
- '<script type="text/javascript" src="js/common.js"></script>',
- '<link rel="stylesheet" type="text/css" href="js/jscalendar/calendar-win2k-1.css">',
- '<script type="text/javascript" src="js/jscalendar/calendar.js"></script>',
- '<script type="text/javascript" src="js/jscalendar/lang/calendar-de.js"></script>',
- '<script type="text/javascript" src="js/jscalendar/calendar-setup.js"></script>',
- '<script type="text/javascript" src="js/part_selection.js"></script>',
- '<script type="text/javascript" src="js/jquery-ui.js"></script>',
- '<script type="text/javascript" src="js/jqModal.js"></script>',
- '<link rel="stylesheet" type="text/css" href="css/ui-lightness/jquery-ui-1.8.12.custom.css">';
+ 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">| }
push @header, map { $_->show_javascript } @{ $self->{AJAX} || [] };
push @header, "<script type='text/javascript'>function fokus(){ document.$self->{fokus}.focus(); }</script>" if $self->{fokus};
push @header, sprintf "<script type='text/javascript'>top.document.title='%s';</script>",
EOT
print " $_\n" for @header;
print <<EOT;
- <link rel="stylesheet" href="css/jquery.autocomplete.css" type="text/css">
<meta name="robots" content="noindex,nofollow">
- <link rel="stylesheet" type="text/css" href="css/tabcontent.css">
<script type="text/javascript" src="js/tabcontent.js">
/***********************************************
$::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};
$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;
$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);
}