From: Niclas Zimmermann Date: Thu, 22 Nov 2012 10:14:30 +0000 (+0100) Subject: Merge branch 'master' of vc.linet-services.de:public/lx-office-erp X-Git-Tag: release-3.0.0beta2~10^2~4 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=4486e3bc8eb00c37cf8029e663eb94b4b9c5346a;hp=b6cc210659f5ed09f22de0b5985c62457ec634ac;p=kivitendo-erp.git Merge branch 'master' of vc.linet-services.de:public/lx-office-erp --- diff --git a/SL/AM.pm b/SL/AM.pm index 0e64e5a66..c7a88d2df 100644 --- a/SL/AM.pm +++ b/SL/AM.pm @@ -269,7 +269,7 @@ sub save_account { do_query($form, $dbh, $query, $form->{"id"}, $form->{"accno"}); } - my @values; + @values = (); if ($form->{id}) { diff --git a/SL/Auth.pm b/SL/Auth.pm index b9840fc08..d63b6a2f6 100644 --- a/SL/Auth.pm +++ b/SL/Auth.pm @@ -489,8 +489,9 @@ sub read_user { @user_data{qw(id login)} = @{$ref}{qw(id login)}; } - # The XUL/XML backed menu has been removed. - $user_data{menustyle} = 'v3' if lc($user_data{menustyle} || '') eq 'xml'; + # The XUL/XML & 'CSS new' backed menus have been removed. + my %menustyle_map = ( xml => 'new', v4 => 'v3' ); + $user_data{menustyle} = $menustyle_map{lc($user_data{menustyle} || '')} || $user_data{menustyle}; # Set default language if selected language does not exist (anymore). $user_data{countrycode} = $::lx_office_conf{system}->{language} unless $user_data{countrycode} && -d "locale/$user_data{countrycode}"; diff --git a/SL/CA.pm b/SL/CA.pm index 52d2b0baf..577d6b98a 100644 --- a/SL/CA.pm +++ b/SL/CA.pm @@ -203,22 +203,6 @@ sub all_transactions { $project = qq| AND ac.project_id = ? |; @project_values = (conv_i($form->{project_id})); } - my $acc_cash_where = ""; - my $ar_cash_where = ""; - my $ap_cash_where = ""; - - - if ($form->{method} eq "cash") { - $where = qq| (ac.trans_id IN (SELECT id FROM ar WHERE datepaid>= ? AND datepaid<= ? UNION SELECT id FROM ap WHERE datepaid>= ? AND datepaid<= ? UNION SELECT id FROM gl WHERE transdate>= ? AND transdate<= ?)) |; - @where_values = (); - push(@where_values, conv_date($form->{fromdate})); - push(@where_values, conv_date($form->{todate})); - push(@where_values, conv_date($form->{fromdate})); - push(@where_values, conv_date($form->{todate})); - push(@where_values, conv_date($form->{fromdate})); - push(@where_values, conv_date($form->{todate})); - } - if ($form->{accno}) { diff --git a/SL/Controller/CsvImport/Part.pm b/SL/Controller/CsvImport/Part.pm index 3c781aad6..1538f2d9c 100644 --- a/SL/Controller/CsvImport/Part.pm +++ b/SL/Controller/CsvImport/Part.pm @@ -365,7 +365,7 @@ sub handle_makemodel { my $found_any; my @makemodels; - foreach my $idx (map { substr $_, 5 } grep { m/^make_\d+$/ && $entry->{raw_data}->{$_} } keys %{ $entry->{raw_data} }) { + foreach my $idx (sort map { substr $_, 5 } grep { m/^make_\d+$/ && $entry->{raw_data}->{$_} } keys %{ $entry->{raw_data} }) { my $vendor = $entry->{raw_data}->{"make_${idx}"}; $vendor = $self->vc_by->{id}-> { $vendor } || $self->vc_by->{number}->{vendors}->{ $vendor } @@ -457,10 +457,10 @@ sub setup_displayable_columns { { name => 'image', description => $::locale->text('Image') }, { name => 'lastcost', description => $::locale->text('Last Cost') }, { name => 'listprice', description => $::locale->text('List Price') }, - { name => 'make_X', description => $::locale->text('Make (with X being a number)') }, + { name => 'make_X', description => $::locale->text('Make (vendor\'s database ID, number or name; with X being a number)') . ' [1]' }, { name => 'microfiche', description => $::locale->text('Microfiche') }, - { name => 'model_X', description => $::locale->text('Model (with X being a number)') }, - { name => 'lastcost_X', description => $::locale->text('Lastcost (with X being a number)') }, + { name => 'model_X', description => $::locale->text('Model (with X being a number)') . ' [1]' }, + { name => 'lastcost_X', description => $::locale->text('Lastcost (with X being a number)') . ' [1]' }, { name => 'not_discountable', description => $::locale->text('Not Discountable') }, { name => 'notes', description => $::locale->text('Notes') }, { name => 'obsolete', description => $::locale->text('Obsolete') }, diff --git a/SL/Controller/Helper/Paginated.pm b/SL/Controller/Helper/Paginated.pm index d3da20dc0..1683aada0 100644 --- a/SL/Controller/Helper/Paginated.pm +++ b/SL/Controller/Helper/Paginated.pm @@ -7,7 +7,9 @@ our @EXPORT = qw(make_paginated get_paginate_spec get_current_paginate_params _s use constant PRIV => '__paginatedhelper_priv'; -my $controller_paginate_spec; +use List::Util qw(min); + +my %controller_paginate_spec; sub make_paginated { my ($class, %specs) = @_; @@ -20,7 +22,7 @@ sub make_paginated { $specs{ONLY} = [ $specs{ONLY} ] if !ref $specs{ONLY}; $specs{ONLY_MAP} = @{ $specs{ONLY} } ? { map { ($_ => 1) } @{ $specs{ONLY} } } : { '__ALL__' => 1 }; - $controller_paginate_spec = \%specs; + $controller_paginate_spec{$class} = \%specs; my %hook_params = @{ $specs{ONLY} } ? ( only => $specs{ONLY} ) : (); $class->run_before('_save_current_paginate_params', %hook_params); @@ -38,7 +40,7 @@ sub make_paginated { sub get_paginate_spec { my ($class_or_self) = @_; - return $controller_paginate_spec; + return $controller_paginate_spec{ref($class_or_self) || $class_or_self}; } sub get_current_paginate_params { @@ -60,7 +62,8 @@ sub get_current_paginate_params { : (); my $calculated_params = "SL::DB::Manager::$spec->{MODEL}"->paginate(%paginate_params, args => \%paginate_args); %paginate_params = ( - %paginate_params, + page => min($paginate_params{page}, $calculated_params->{max}), + per_page => $paginate_params{per_page}, num_pages => $calculated_params->{max}, common_pages => $calculated_params->{common}, ); diff --git a/SL/Controller/Helper/Sorted.pm b/SL/Controller/Helper/Sorted.pm index c9e577911..98c0a7c10 100644 --- a/SL/Controller/Helper/Sorted.pm +++ b/SL/Controller/Helper/Sorted.pm @@ -11,7 +11,7 @@ our @EXPORT = qw(make_sorted get_sort_spec get_current_sort_params set_report_ge use constant PRIV => '__sortedhelperpriv'; -my $controller_sort_spec; +my %controller_sort_spec; sub make_sorted { my ($class, %specs) = @_; @@ -35,7 +35,7 @@ sub make_sorted { $specs{ONLY} ||= []; $specs{ONLY} = [ $specs{ONLY} ] if !ref $specs{ONLY}; - $controller_sort_spec = \%specs; + $controller_sort_spec{$class} = \%specs; my %hook_params = @{ $specs{ONLY} } ? ( only => $specs{ONLY} ) : (); $class->run_before('_save_current_sort_params', %hook_params); @@ -53,7 +53,7 @@ sub make_sorted { sub get_sort_spec { my ($class_or_self) = @_; - return $controller_sort_spec; + return $controller_sort_spec{ref($class_or_self) || $class_or_self}; } sub get_current_sort_params { diff --git a/SL/FU.pm b/SL/FU.pm index 27836e0ad..a005c1814 100644 --- a/SL/FU.pm +++ b/SL/FU.pm @@ -426,11 +426,11 @@ sub save_access_rights { my ($id) = selectrow_query($form, $dbh, qq|SELECT id FROM employee WHERE login = ?|, $form->{login}); + do_query($form, $dbh, qq|DELETE FROM follow_up_access WHERE what = ?|, $id); + my $query = qq|INSERT INTO follow_up_access (who, what) VALUES (?, ?)|; my $sth = prepare_query($form, $dbh, $query); - do_query($form, $dbh, qq|DELETE FROM follow_up_access WHERE what = ?|, $id); - while (my ($who, $access_allowed) = each %{ $params{access} }) { next unless ($access_allowed); diff --git a/SL/Form.pm b/SL/Form.pm index 3e9704fd2..45f37599c 100644 --- a/SL/Form.pm +++ b/SL/Form.pm @@ -1970,7 +1970,7 @@ sub get_duedate { $reference_date = $reference_date ? conv_dateq($reference_date) . '::DATE' : 'current_date'; my $dbh = $self->get_standard_dbh($myconfig); - my $payment_id; + my ($payment_id, $duedate); if($self->{payment_id}) { $payment_id = $self->{payment_id}; @@ -1979,8 +1979,10 @@ sub get_duedate { ($payment_id) = selectrow_query($self, $dbh, $query, $self->{vendor_id}); } - my $query = qq|SELECT ${reference_date} + terms_netto FROM payment_terms WHERE id = ?|; - my ($duedate) = selectrow_query($self, $dbh, $query, $payment_id); + if ($payment_id) { + my $query = qq|SELECT ${reference_date} + terms_netto FROM payment_terms WHERE id = ?|; + ($duedate) = selectrow_query($self, $dbh, $query, $payment_id); + } $main::lxdebug->leave_sub(); @@ -3581,7 +3583,6 @@ sub layout { my %style_to_script_map = ( v3 => 'v3', neu => 'new', - v4 => 'v4', ); my $menu_script = $style_to_script_map{$::myconfig{menustyle}} || ''; diff --git a/SL/IC.pm b/SL/IC.pm index f5f014b9d..f39c169b2 100644 --- a/SL/IC.pm +++ b/SL/IC.pm @@ -109,60 +109,20 @@ sub get_part { $form->{amount}{IC_expense} = $form->{expense_accno}; $form->{amount}{IC_cogs} = $form->{expense_accno}; - my @pricegroups = (); - my @pricegroups_not_used = (); - # get prices - $query = - qq|SELECT p.parts_id, p.pricegroup_id, p.price, - (SELECT pg.pricegroup - FROM pricegroup pg - WHERE pg.id = p.pricegroup_id) AS pricegroup - FROM prices p - WHERE (parts_id = ?) - ORDER BY pricegroup|; - $sth = prepare_execute_query($form, $dbh, $query, conv_i($form->{id})); - - #for pricegroups - my $i = 1; - while (($form->{"klass_$i"}, $form->{"pricegroup_id_$i"}, - $form->{"price_$i"}, $form->{"pricegroup_$i"}) - = $sth->fetchrow_array()) { - push @pricegroups, $form->{"pricegroup_id_$i"}; - $i++; - } - - $sth->finish; - - # get pricegroups - $query = qq|SELECT id, pricegroup FROM pricegroup|; - $form->{PRICEGROUPS} = selectall_hashref_query($form, $dbh, $query); - - #find not used pricegroups - while (my $tmp = pop(@{ $form->{PRICEGROUPS} })) { - my $in_use = 0; - foreach my $item (@pricegroups) { - if ($item eq $tmp->{id}) { - $in_use = 1; - last; - } - } - push(@pricegroups_not_used, $tmp) unless ($in_use); - } - - # if not used pricegroups are avaible - if (@pricegroups_not_used) { + $query = <{"klass_$i"} = "$name->{id}"; - $form->{"pricegroup_id_$i"} = "$name->{id}"; - $form->{"pricegroup_$i"} = "$name->{pricegroup}"; - $i++; - } + my $row = 1; + foreach $ref (selectall_hashref_query($form, $dbh, $query, conv_i($form->{id}))) { + $form->{"${_}_${row}"} = $ref->{$_} for qw(pricegroup_id pricegroup price); + $row++; } - - #correct rows - $form->{price_rows} = $i - 1; + $form->{price_rows} = $row - 1; # get makes if ($form->{makemodel}) { @@ -241,7 +201,7 @@ sub get_pricegroups { my $dbh = $form->dbconnect($myconfig); # get pricegroups - my $query = qq|SELECT id, pricegroup FROM pricegroup|; + my $query = qq|SELECT id, pricegroup FROM pricegroup ORDER BY lower(pricegroup)|; my $pricegroups = selectall_hashref_query($form, $dbh, $query); my $i = 1; @@ -471,26 +431,20 @@ sub save { # delete price records do_query($form, $dbh, qq|DELETE FROM prices WHERE parts_id = ?|, conv_i($form->{id})); + $query = qq|INSERT INTO prices (parts_id, pricegroup_id, price) VALUES(?, ?, ?)|; + $sth = prepare_query($form, $dbh, $query); + # insert price records only if different to sellprice for my $i (1 .. $form->{price_rows}) { my $price = $form->parse_amount($myconfig, $form->{"price_$i"}); - if ($price == 0) { - $form->{"price_$i"} = $form->{sellprice}; - } - if ( - ( $price - || $form->{"klass_$i"} - || $form->{"pricegroup_id_$i"}) - and $price != $form->{sellprice} - ) { - #$klass = $form->parse_amount($myconfig, $form->{"klass_$i"}); - $query = qq|INSERT INTO prices (parts_id, pricegroup_id, price) | . - qq|VALUES(?, ?, ?)|; - @values = (conv_i($form->{id}), conv_i($form->{"pricegroup_id_$i"}), $price); - do_query($form, $dbh, $query, @values); - } + next unless $price && ($price != $form->{sellprice}); + + @values = (conv_i($form->{id}), conv_i($form->{"pricegroup_id_$i"}), $price); + do_statement($form, $sth, $query, @values); } + $sth->finish; + # insert makemodel records my $lastupdate = ''; my $value = 0; diff --git a/SL/IS.pm b/SL/IS.pm index 616e2bf6f..e240d979a 100644 --- a/SL/IS.pm +++ b/SL/IS.pm @@ -222,12 +222,18 @@ sub invoice_details { my ($dec) = ($sellprice =~ /\.(\d+)/); my $decimalplaces = max 2, length($dec); - my $parsed_discount = $form->parse_amount($myconfig, $form->{"discount_$i"}); - my $linetotal_exact = $form->{"qty_$i"} * $sellprice * (100 - $parsed_discount) / 100 / $price_factor->{factor}; - my $linetotal = $form->round_amount($linetotal_exact, 2); - my $discount = $form->round_amount($form->{"qty_$i"} * $sellprice * $parsed_discount / 100 / $price_factor->{factor} - ($linetotal - $linetotal_exact), - $decimalplaces); - my $nodiscount_linetotal = $form->round_amount($form->{"qty_$i"} * $sellprice / $price_factor->{factor}, 2); + my $parsed_discount = $form->parse_amount($myconfig, $form->{"discount_$i"}); + + my $linetotal_exact = $form->{"qty_$i"} * $sellprice * (100 - $parsed_discount) / 100 / $price_factor->{factor}; + my $linetotal = $form->round_amount($linetotal_exact, 2); + + my $nodiscount_exact_linetotal = $form->{"qty_$i"} * $sellprice / $price_factor->{factor}; + my $nodiscount_linetotal = $form->round_amount($nodiscount_exact_linetotal,2); + + my $discount = $nodiscount_linetotal - $linetotal; # is always rounded because $nodiscount_linetotal and $linetotal are rounded + + my $discount_round_error = $discount + ($linetotal_exact - $nodiscount_exact_linetotal); # not used + $form->{"netprice_$i"} = $form->round_amount($form->{"qty_$i"} ? ($linetotal / $form->{"qty_$i"}) : 0, 2); push @{ $form->{TEMPLATE_ARRAYS}->{netprice} }, ($form->{"netprice_$i"} != 0) ? $form->format_amount($myconfig, $form->{"netprice_$i"}, $decimalplaces) : ''; @@ -2130,16 +2136,18 @@ sub get_pricegroups_for_parts { $pkr->{selected} = ' selected'; # unless $form->{selected}; # no customer pricesgroup set - if ($pkr->{price_unfmt} == $pkr->{default_sellprice} || $form->{'sellprice_'.$i} * 1 > 1) { + if ($pkr->{price_ufmt} == $pkr->{default_sellprice}) { $pkr->{price} = $form->{"sellprice_$i"}; } else { +# this sub should not set anything and only return. --sschoeling, 20090506 +# is this correct? put in again... -- grichardson 20110119 $form->{"sellprice_$i"} = $pkr->{price}; } - } elsif ($pkr->{price_unfmt} == $pkr->{default_sellprice} and $pkr->{default_sellprice} != 0) { + } elsif ($pkr->{price_ufmt} == $pkr->{default_sellprice} and $pkr->{default_sellprice} != 0) { $pkr->{price} = $form->{"sellprice_$i"}; $pkr->{selected} = ' selected'; } diff --git a/SL/InstallationCheck.pm b/SL/InstallationCheck.pm index 37f276c80..6ee8c11ed 100644 --- a/SL/InstallationCheck.pm +++ b/SL/InstallationCheck.pm @@ -28,6 +28,8 @@ BEGIN { { name => "Rose::DB::Object", url => "http://search.cpan.org/~jsiracusa/", debian => 'librose-db-object-perl' }, { name => "String::ShellQuote", version => 1.01, url => "http://search.cpan.org/~rosch/", debian => 'libstring-shellquote-perl' }, { name => "Sort::Naturally", url => "http://search.cpan.org/~sburke/", debian => 'libsort-naturally-perl' }, + # Test::Harness is core, so no Debian packages. Test::Harness 3.00 was first packaged in 5.10.1 + { name => "Test::Harness", version => '3.00', url => "http://search.cpan.org/~petdance/", }, { name => "Template", version => '2.18', url => "http://search.cpan.org/~abw/", debian => 'libtemplate-perl' }, { name => "Text::CSV_XS", version => '0.23', url => "http://search.cpan.org/~hmbrand/", debian => 'libtext-csv-xs-perl' }, { name => "Text::Iconv", version => '1.2', url => "http://search.cpan.org/~mpiotr/", debian => 'libtext-iconv-perl' }, @@ -41,8 +43,8 @@ BEGIN { { name => "IO::Socket::SSL", url => "http://search.cpan.org/~sullr/", debian => 'libio-socket-ssl-perl' }, { name => "Net::LDAP", url => "http://search.cpan.org/~gbarr/", debian => 'libnet-ldap-perl' }, # Net::SMTP is core since 5.7.3 - { name => "Net::SMTP::SSL", version => '1.01', url => "http://search.cpan.org/~cwest/", debian => 'libnet-smtp-ssl-perl' }, - { name => "Net::SSLGlue", version => '1.01', url => "http://search.cpan.org/~sullr/", debian => 'libnet-sslglue-perl' }, + { name => "Net::SMTP::SSL", url => "http://search.cpan.org/~cwest/", debian => 'libnet-smtp-ssl-perl' }, + { name => "Net::SSLGlue", url => "http://search.cpan.org/~sullr/", debian => 'libnet-sslglue-perl' }, ); @developer_modules = ( diff --git a/SL/Layout/Base.pm b/SL/Layout/Base.pm index 0c209e2af..83f8ff5ef 100644 --- a/SL/Layout/Base.pm +++ b/SL/Layout/Base.pm @@ -101,10 +101,10 @@ sub get_stylesheet_for_user { -f "$css_path/$user_style/main.css") { $css_path = "$css_path/$user_style"; } else { - $css_path = "$css_path/lx-office-erp"; + $css_path = "$css_path/kivitendo"; } } else { - $css_path = "$css_path/lx-office-erp"; + $css_path = "$css_path/kivitendo"; } $::myconfig{css_path} = $css_path; # needed for menunew, FIXME: don't do this here diff --git a/SL/Layout/Css.pm b/SL/Layout/Css.pm index 883353a20..dc0bf057f 100644 --- a/SL/Layout/Css.pm +++ b/SL/Layout/Css.pm @@ -51,7 +51,7 @@ sub print_menu { my $menu_title = $::locale->text($item); my $menu_text = $menu_title; - if ($menu_item->{"submenu"} || !defined($menu_item->{"module"})) { + if ($menu_item->{"submenu"} || !defined($menu_item->{"module"}) && !defined($menu_item->{href})) { my $h = $self->print_menu("${parent}${item}", $depth * 1 + 1)."\n"; if (!$parent) { @@ -96,7 +96,7 @@ sub menuitem_v3 { my @vars = qw(module action target href); if ($menuitem->{href}) { - $str = qq|{href}|; + $str = qq|create_menu($menu, $item->{subitems}, "${parent}${name}", $depth * 1 + 1); diff --git a/SL/Layout/Top.pm b/SL/Layout/Top.pm index f007e09cb..075e2f267 100644 --- a/SL/Layout/Top.pm +++ b/SL/Layout/Top.pm @@ -24,7 +24,7 @@ __END__ =head1 NAME -SL::Layout::Top - Top line in classic and v4 menu. +SL::Layout::Top - Top line in classic and v3 menu. =head1 DOM MODEL diff --git a/SL/Layout/V4.pm b/SL/Layout/V4.pm deleted file mode 100644 index 81789d466..000000000 --- a/SL/Layout/V4.pm +++ /dev/null @@ -1,44 +0,0 @@ -package SL::Layout::V4; - -use strict; -use parent qw(SL::Layout::Base); -use SL::Layout::Css; -use SL::Layout::Top; - -use URI; - -sub init_sub_layouts { - [ - SL::Layout::Top->new, - SL::Layout::None->new, - ] -} - -sub start_content { - "
\n"; -} - -sub end_content { - "
\n"; -} - -sub pre_content { - my ($self) = @_; - - $self->{sub_class} = 1; - - my $callback = $::form->unescape($::form->{callback}); - $callback = URI->new($callback)->rel($callback) if $callback; - $callback = "login.pl?action=company_logo" if $callback =~ /^(\.\/)?$/; - - $self->SUPER::pre_content . - - $self->SUPER::render('menu/menuv4', { no_menu => 1, no_output => 1 }, - force_ul_width => 1, - date => $self->clock_line, - menu => $self->print_menu, - callback => $callback, - ); -} - -1; diff --git a/SL/OE.pm b/SL/OE.pm index 6648e2242..b6816c138 100644 --- a/SL/OE.pm +++ b/SL/OE.pm @@ -1181,12 +1181,18 @@ sub order_details { my ($dec) = ($sellprice =~ /\.(\d+)/); my $decimalplaces = max 2, length($dec); - my $parsed_discount = $form->parse_amount($myconfig, $form->{"discount_$i"}); - my $linetotal_exact = $form->{"qty_$i"} * $sellprice * (100 - $parsed_discount) / 100 / $price_factor->{factor}; - my $linetotal = $form->round_amount($linetotal_exact, 2); - my $discount = $form->round_amount($form->{"qty_$i"} * $sellprice * $parsed_discount / 100 / $price_factor->{factor} - ($linetotal - $linetotal_exact), - $decimalplaces); - my $nodiscount_linetotal = $form->round_amount($form->{"qty_$i"} * $sellprice / $price_factor->{factor}, 2); + my $parsed_discount = $form->parse_amount($myconfig, $form->{"discount_$i"}); + + my $linetotal_exact = $form->{"qty_$i"} * $sellprice * (100 - $parsed_discount) / 100 / $price_factor->{factor}; + my $linetotal = $form->round_amount($linetotal_exact, 2); + + my $nodiscount_exact_linetotal = $form->{"qty_$i"} * $sellprice / $price_factor->{factor}; + my $nodiscount_linetotal = $form->round_amount($nodiscount_exact_linetotal,2); + + my $discount = $nodiscount_linetotal - $linetotal; # is always rounded because $nodiscount_linetotal and $linetotal are rounded + + my $discount_round_error = $discount + ($linetotal_exact - $nodiscount_exact_linetotal); # not used + $form->{"netprice_$i"} = $form->round_amount($form->{"qty_$i"} ? ($linetotal / $form->{"qty_$i"}) : 0, 2); push @{ $form->{TEMPLATE_ARRAYS}->{netprice} }, ($form->{"netprice_$i"} != 0) ? $form->format_amount($myconfig, $form->{"netprice_$i"}, $decimalplaces) : ''; diff --git a/SL/RP.pm b/SL/RP.pm index 0ea40ec02..a319cf59d 100644 --- a/SL/RP.pm +++ b/SL/RP.pm @@ -1649,7 +1649,7 @@ sub bwa { my @periods = qw(jetzt kumm); my @gesamtleistung = qw(1 3); - my @gesamtkosten = qw (10 11 12 13 14 15 16 17 18 19 20); + my @gesamtkosten = qw (10 11 12 13 14 15 16 17 18 20); my @ergebnisse = qw (rohertrag betriebrohertrag betriebsergebnis neutraleraufwand neutralerertrag ergebnisvorsteuern ergebnis gesamtleistung gesamtkosten); @@ -1684,7 +1684,7 @@ sub bwa { $form->{ "$key" . "betriebrohertrag" } - $form->{ "$key" . "gesamtkosten" }; $form->{ "$key" . "neutraleraufwand" } = - $form->{30}{$key} + $form->{31}{$key}; + $form->{19}{$key} + $form->{30}{$key} + $form->{31}{$key}; $form->{ "$key" . "neutralerertrag" } = $form->{32}{$key} + $form->{33}{$key} + $form->{34}{$key}; $form->{ "$key" . "ergebnisvorsteuern" } = diff --git a/SL/Template/Plugin/L.pm b/SL/Template/Plugin/L.pm index c25941cbc..95d225441 100644 --- a/SL/Template/Plugin/L.pm +++ b/SL/Template/Plugin/L.pm @@ -111,6 +111,8 @@ sub select_tag { my $title_sub = delete($attributes{title_sub}); my $default_sub = delete($attributes{default_sub}); + my $with_empty = delete($attributes{with_empty}); + my $empty_title = delete($attributes{empty_title}); my %selected; @@ -128,8 +130,8 @@ sub select_tag { my @options; - if ( delete($attributes{with_empty}) ) { - push(@options, [undef, $attributes{empty_title} || '']); + if ( $with_empty ) { + push(@options, [undef, $empty_title || '']); } my $normalize_entry = sub { @@ -180,7 +182,7 @@ sub select_tag { my $title; if ( $value_title_sub ) { - ($value, $title) = $value_title_sub->($entry); + ($value, $title) = @{ $value_title_sub->($entry) }; } else { $value = $normalize_entry->('value', $entry, $value_sub, $value_key); diff --git a/SL/Template/Simple.pm b/SL/Template/Simple.pm index d29ec8f5c..926ef1f7f 100644 --- a/SL/Template/Simple.pm +++ b/SL/Template/Simple.pm @@ -197,6 +197,7 @@ sub _parse_block_if { } my $value = $self->_get_loop_variable($var, 0, @indices); + $value = scalar(@{ $value }) if (ref($value) || '') eq 'ARRAY'; my $hit = 0; if ($operator_type) { diff --git a/VERSION b/VERSION index dd8693a9f..05ea4cf25 100644 --- a/VERSION +++ b/VERSION @@ -1 +1 @@ -2.7.1-unstable +3.0.0-beta1 diff --git a/bin/mozilla/admin.pl b/bin/mozilla/admin.pl index 0a7145a60..767669899 100755 --- a/bin/mozilla/admin.pl +++ b/bin/mozilla/admin.pl @@ -40,6 +40,7 @@ use File::Copy; use File::Find; use File::Spec; use Cwd; +use IO::Dir; use IO::File; use POSIX qw(strftime); use Sys::Hostname; @@ -79,7 +80,6 @@ my @all_stylesheets = qw(lx-office-erp.css Win2000.css Mobile.css kivitendo.css) my @all_menustyles = ( { id => 'old', title => $::locale->text('Old (on the side)') }, { id => 'v3', title => $::locale->text('Top (CSS)') }, - { id => 'v4', title => $::locale->text('Top (CSS) new') }, { id => 'neu', title => $::locale->text('Top (Javascript)') }, ); @@ -379,16 +379,14 @@ sub list_users { sub add_user { $::form->{title} = "kivitendo " . $::locale->text('Administration') . " / " . $::locale->text('Add User'); -# Note: Menu Style 'v3' is not compatible to all browsers! -# "menustyle" => "old" sets the HTML Menu to default. -# User does not have a well behaved new constructor, so we#Ll just have to build one ourself + # User does not have a well behaved new constructor, so we'll just have to build one ourself my $user = bless { "vclimit" => 200, "countrycode" => "de", "numberformat" => "1.000,00", "dateformat" => "dd.mm.yy", - "stylesheet" => "lx-office-erp.css", - "menustyle" => "old", + "stylesheet" => "kivitendo.css", + "menustyle" => "neu", dbport => $::auth->{DB_config}->{port} || 5432, dbuser => $::auth->{DB_config}->{user} || 'lxoffice', dbhost => $::auth->{DB_config}->{host} || 'localhost', @@ -745,35 +743,17 @@ sub create_dataset { $form->{CHARTS} = []; - opendir SQLDIR, "sql/." or $form->error($ERRNO); - foreach my $item (sort grep /-chart\.sql\z/, readdir SQLDIR) { - next if ($item eq 'Default-chart.sql'); - $item =~ s/-chart\.sql//; - push @{ $form->{CHARTS} }, { "name" => $item, - "selected" => $item eq "Germany-DATEV-SKR03EU" }; + tie my %dir_h, 'IO::Dir', 'sql/'; + foreach my $item (map { s/-chart\.sql$//; $_ } sort grep { /-chart\.sql\z/ && !/Default-chart.sql\z/ } keys %dir_h) { + push @{ $form->{CHARTS} }, { name => $item, + selected => $item eq "Germany-DATEV-SKR03EU" }; } - closedir SQLDIR; - $form->{ACCOUNTING_METHODS} = []; - foreach my $item ( qw(accrual cash) ) { - push @{ $form->{ACCOUNTING_METHODS} }, { "name" => $item, - "selected" => $item eq "cash" }; - }; - - $form->{INVENTORY_SYSTEMS} = []; - foreach my $item ( qw(perpetual periodic) ) { - push @{ $form->{INVENTORY_SYSTEMS} }, { "name" => $item, - "selected" => $item eq "periodic" }; - }; - - $form->{PROFIT_DETERMINATIONS} = []; - foreach my $item ( qw(balance income) ) { - push @{ $form->{PROFIT_DETERMINATIONS} }, { "name" => $item, - "selected" => $item eq "income" }; - }; + $form->{ACCOUNTING_METHODS} = [ map { { name => $_, selected => $_ eq 'cash' } } qw(accrual cash) ]; + $form->{INVENTORY_SYSTEMS} = [ map { { name => $_, selected => $_ eq 'periodic' } } qw(perpetual periodic) ]; + $form->{PROFIT_DETERMINATIONS} = [ map { { name => $_, selected => $_ eq 'income' } } qw(balance income) ]; - my $default_charset = $::lx_office_conf{system}->{dbcharset}; - $default_charset ||= Common::DEFAULT_CHARSET; + my $default_charset = $::lx_office_conf{system}->{dbcharset} || Common::DEFAULT_CHARSET; my $cluster_encoding = User->dbclusterencoding($form); if ($cluster_encoding && ($cluster_encoding =~ m/^(?:UTF-?8|UNICODE)$/i)) { @@ -786,13 +766,7 @@ sub create_dataset { $form->{FORCE_DBENCODING} = 'UNICODE'; } else { - $form->{DBENCODINGS} = []; - - foreach my $encoding (@Common::db_encodings) { - push @{ $form->{DBENCODINGS} }, { "dbencoding" => $encoding->{dbencoding}, - "label" => $encoding->{label}, - "selected" => $encoding->{charset} eq $default_charset }; - } + $form->{DBENCODINGS} = [ map { { %{$_}, selected => $_->{charset} eq $default_charset } } @Common::db_encodings ]; } $form->{title} = "kivitendo " . $locale->text('Database Administration') . " / " . $locale->text('Create Dataset'); @@ -1198,23 +1172,17 @@ sub _search_templates { $::form->error(sprintf($::locale->text("The directory %s does not exist."), $::lx_office_conf{paths}->{templates})); } - opendir TEMPLATEDIR, $::lx_office_conf{paths}->{templates} or $::form->error($::lx_office_conf{paths}->{templates} . " : $ERRNO"); - my @all = readdir(TEMPLATEDIR); - my @alldir = sort grep { -d ($::lx_office_conf{paths}->{templates} . "/$_") && !/^\.\.?$/ } @all; - closedir TEMPLATEDIR; - - @alldir = grep !/\.(html|tex|sty|odt|xml|txb)$/, @alldir; - @alldir = grep !/^(webpages|print|\.svn)$/, @alldir; + tie my %dir_h, 'IO::Dir', $::lx_office_conf{paths}->{templates}; - # mastertemplates - opendir TEMPLATEDIR, "$::lx_office_conf{paths}->{templates}/print" or $::form->error("$::lx_office_conf{paths}->{templates}/print" . " : $ERRNO"); - my @allmaster = readdir(TEMPLATEDIR); - closedir TEMPLATEDIR; + my @alldir = sort grep { + -d ($::lx_office_conf{paths}->{templates} . "/$_") + && !/^\.\.?$/ + && !m/\.(?:html|tex|sty|odt|xml|txb)$/ + && !m/^(?:webpages$|print$|\.)/ + } keys %dir_h; - @allmaster = sort grep { -d ("$::lx_office_conf{paths}->{templates}/print" . "/$_") && !/^\.\.?$/ } @allmaster; - @allmaster = reverse grep !/Default/, @allmaster; - push @allmaster, 'Default'; - @allmaster = reverse @allmaster; + tie %dir_h, 'IO::Dir', "$::lx_office_conf{paths}->{templates}/print"; + my @allmaster = ('Standard', sort grep { -d ("$::lx_office_conf{paths}->{templates}/print" . "/$_") && !/^\.\.?$/ && !/^Standard$/ } keys %dir_h); return \@alldir, \@allmaster; } diff --git a/bin/mozilla/ap.pl b/bin/mozilla/ap.pl index dcca628b3..3bbe8dcb9 100644 --- a/bin/mozilla/ap.pl +++ b/bin/mozilla/ap.pl @@ -156,24 +156,19 @@ sub create_links { # currencies $form->{defaultcurrency} = $form->get_default_currency(\%myconfig); - map { $form->{selectcurrency} .= "
$form->{"partnumber_$i"}|; + $row{partnumber}{data} = qq|$form->{"partnumber_$i"}|; + $row{partnumber}{link} = $href; $row{qty}{data} = qq||; $row{runningnumber}{data} = qq||; $row{bom}{data} = sprintf qq||, @@ -1875,7 +1882,11 @@ sub save { qw(weight listprice sellprice rop); $form->{assembly_rows}--; - $i = $form->{assembly_rows}; + if ($newform{currow}) { + $i = $newform{currow}; + } else { + $i = $form->{assembly_rows}; + } $form->{"qty_$i"} = 1 unless ($form->{"qty_$i"}); $form->{sellprice} -= $form->{"sellprice_$i"} * $form->{"qty_$i"}; diff --git a/bin/mozilla/io.pl b/bin/mozilla/io.pl index 37df55461..0d7601ea6 100644 --- a/bin/mozilla/io.pl +++ b/bin/mozilla/io.pl @@ -38,7 +38,7 @@ use Carp; use CGI; -use List::MoreUtils qw(uniq); +use List::MoreUtils qw(any uniq); use List::Util qw(min max first); use SL::CVar; @@ -1089,11 +1089,12 @@ sub print_options { opthash("inline", $form->{SM}{inline}, $locale->text('In-line')) if ($form->{media} eq 'email'); + my $printable_templates = any { $::lx_office_conf{print_templates}->{$_} } qw(latex opendocument); push @MEDIA, grep $_, opthash("screen", $form->{OP}{screen}, $locale->text('Screen')), - ($form->{printers} && scalar @{ $form->{printers} } && $::lx_office_conf{print_templates}->{latex}) ? + ($printable_templates && $form->{printers} && scalar @{ $form->{printers} }) ? opthash("printer", $form->{OP}{printer}, $locale->text('Printer')) : undef, - ($::lx_office_conf{print_templates}->{latex} && !$options{no_queue}) ? + ($printable_templates && !$options{no_queue}) ? opthash("queue", $form->{OP}{queue}, $locale->text('Queue')) : undef if ($form->{media} ne 'email'); @@ -1470,7 +1471,7 @@ sub print_form { reformat_numbers($output_numberformat, 2, qw(invtotal ordtotal quototal subtotal linetotal listprice sellprice netprice discount - tax taxbase total paid), + tax taxbase total paid payment), grep({ /^(?:linetotal|nodiscount_linetotal|listprice|sellprice|netprice|taxbase|discount|p_discount|discount_sub|nodiscount_sub|paid|subtotal|total|tax)_\d+$/ } keys(%{$form}))); reformat_numbers($output_numberformat, undef, diff --git a/bin/mozilla/ir.pl b/bin/mozilla/ir.pl index 554d2fd4f..143696311 100644 --- a/bin/mozilla/ir.pl +++ b/bin/mozilla/ir.pl @@ -609,7 +609,7 @@ sub storno { } -sub use_as_template { +sub use_as_new { $main::lxdebug->enter_sub(); my $form = $main::form; diff --git a/bin/mozilla/is.pl b/bin/mozilla/is.pl index 47e713167..6184128b1 100644 --- a/bin/mozilla/is.pl +++ b/bin/mozilla/is.pl @@ -799,7 +799,7 @@ sub print_and_post { } -sub use_as_template { +sub use_as_new { $main::lxdebug->enter_sub(); my $form = $main::form; @@ -807,12 +807,13 @@ sub use_as_template { $main::auth->assert('invoice_edit'); - map { delete $form->{$_} } qw(printed emailed queued invnumber invdate deliverydate id datepaid_1 gldate_1 acc_trans_id_1 source_1 memo_1 paid_1 exchangerate_1 AP_paid_1 storno locked); + delete @{ $form }{qw(printed emailed queued invnumber invdate deliverydate id datepaid_1 gldate_1 acc_trans_id_1 source_1 memo_1 paid_1 exchangerate_1 AP_paid_1 storno locked)}; $form->{paidaccounts} = 1; $form->{rowcount}--; $form->{invdate} = $form->current_date(\%myconfig); + $form->{duedate} = $form->get_duedate(\%myconfig, $form->{invdate}) || $form->{invdate}; - # remember pricegroups for "use as template" + # remember pricegroups for "use as new" IS->get_pricegroups_for_parts(\%myconfig, \%$form); set_pricegroup($_) for 1 .. $form->{rowcount}; diff --git a/bin/mozilla/oe.pl b/bin/mozilla/oe.pl index 3908f7435..a6050945c 100644 --- a/bin/mozilla/oe.pl +++ b/bin/mozilla/oe.pl @@ -341,8 +341,9 @@ sub form_header { "price_factors" => "ALL_PRICE_FACTORS"); # label subs - $TMPL_VAR{ALL_EMPLOYEES} = SL::DB::Manager::Employee->get_all(query => [ or => [ id => $::form->{employee_id}, deleted => 0 ] ]); - $TMPL_VAR{ALL_SALESMEN} = SL::DB::Manager::Employee->get_all(query => [ or => [ id => $::form->{salesman_id}, deleted => 0 ] ]); + my $employee_list_query_gen = sub { $::form->{$_[0]} ? [ or => [ id => $::form->{$_[0]}, deleted => 0 ] ] : [ deleted => 0 ] }; + $TMPL_VAR{ALL_EMPLOYEES} = SL::DB::Manager::Employee->get_all(query => $employee_list_query_gen->('employee_id')); + $TMPL_VAR{ALL_SALESMEN} = SL::DB::Manager::Employee->get_all(query => $employee_list_query_gen->('salesman_id')); $TMPL_VAR{ALL_SHIPTO} = SL::DB::Manager::Shipto->get_all(query => [ or => [ trans_id => $::form->{"$::form->{vc}_id"} * 1, and => [ shipto_id => $::form->{shipto_id} * 1, trans_id => undef ] ] ]); @@ -922,7 +923,7 @@ sub orders { my %totals = map { $_ => 0 } @subtotal_columns; my %subtotals = map { $_ => 0 } @subtotal_columns; - my $idx = 0; + my $idx = 1; my $edit_url = build_std_url('action=edit', 'type', 'vc'); @@ -964,8 +965,8 @@ sub orders { my $row_set = [ $row ]; if (($form->{l_subtotal} eq 'Y') - && (($idx == (scalar @{ $form->{OE} } - 1)) - || ($oe->{ $form->{sort} } ne $form->{OE}->[$idx + 1]->{ $form->{sort} }))) { + && (($idx == (scalar @{ $form->{OE} })) + || ($oe->{ $form->{sort} } ne $form->{OE}->[$idx]->{ $form->{sort} }))) { push @{ $row_set }, create_subtotal_row(\%subtotals, \@columns, \%column_alignment, \@subtotal_columns, 'listsubtotal'); } @@ -1735,13 +1736,14 @@ sub purchase_order { $form->{cp_id} *= 1; + my $source_type = $form->{type}; $form->{title} = $locale->text('Add Purchase Order'); $form->{vc} = "vendor"; $form->{type} = "purchase_order"; $form->get_employee(); - &poso; + poso(source_type => $form->{type}); delete $form->{sales_order_to_purchase_order}; @@ -1763,13 +1765,14 @@ sub sales_order { $form->{cp_id} *= 1; + my $source_type = $form->{type}; $form->{title} = $locale->text('Add Sales Order'); $form->{vc} = "customer"; $form->{type} = "sales_order"; $form->get_employee(); - &poso; + poso(source_type => $source_type); $main::lxdebug->leave_sub(); } @@ -1777,6 +1780,7 @@ sub sales_order { sub poso { $main::lxdebug->enter_sub(); + my %param = @_; my $form = $main::form; my %myconfig = %main::myconfig; @@ -1786,6 +1790,11 @@ sub poso { $form->{transdate} = $form->current_date(\%myconfig); delete $form->{duedate}; + # "reqdate" is the validity date for a quotation and the delivery + # date for an order. Therefore it makes no sense to keep the value + # when converting from one into the other. + delete $form->{reqdate} if ($param{source_type} =~ /_quotation$/) == ($form->{type} =~ /_quotation$/); + $form->{convert_from_oe_ids} = $form->{id}; $form->{closed} = 0; diff --git a/bin/mozilla/projects.pl b/bin/mozilla/projects.pl index b7614ffc6..bda1c6d96 100644 --- a/bin/mozilla/projects.pl +++ b/bin/mozilla/projects.pl @@ -121,6 +121,7 @@ sub project_report { my @columns = qw(projectnumber description active); my @includeable_custom_variables = grep { $_->{includeable} } @{ $cvar_configs }; + my @searchable_custom_variables = grep { $_->{searchable} } @{ $cvar_configs }; my %column_defs_cvars = (); foreach (@includeable_custom_variables) { $column_defs_cvars{"cvar_$_->{name}"} = { @@ -132,7 +133,11 @@ sub project_report { push @columns, map { "cvar_$_->{name}" } @includeable_custom_variables; - my @hidden_vars = ('filter', map { ('cvar_'. $_->{name} , 'l_cvar_'. $_->{name}) } @includeable_custom_variables); + my @hidden_vars = ( + 'filter', + map({ ('cvar_'. $_->{name} , 'l_cvar_'. $_->{name}) } @includeable_custom_variables), + map({'cvar_'. $_->{name} .'_qtyop'} grep({$_->{type} eq 'number'} @searchable_custom_variables)), + ); my $href = build_std_url('action=project_report', @hidden_vars); diff --git a/bin/mozilla/vk.pl b/bin/mozilla/vk.pl index dd0a9b6b1..148fec02d 100644 --- a/bin/mozilla/vk.pl +++ b/bin/mozilla/vk.pl @@ -103,7 +103,7 @@ sub invoice_transactions { my ($callback, $href, @columns); # can't currently be configured from report, empty line between main sortings - my $addemptylines = '1'; + my $addemptylines = 1; if ( $form->{customer} =~ /--/ ) { # Felddaten kommen aus Dropdownbox @@ -134,7 +134,7 @@ sub invoice_transactions { VK->invoice_transactions(\%myconfig, \%$form); - + if ( $form->{mainsort} eq 'month' or $form->{subsort} eq 'month' ) { # Data already comes out of SELECT statement in correct month order, but @@ -162,8 +162,8 @@ sub invoice_transactions { # hidden variables für pdf/csv export übergeben # einmal mit l_ um zu bestimmen welche Spalten ausgegeben werden sollen # einmal optionen für die Überschrift (z.B. transdatefrom, partnumber, ...) - my @hidden_variables = (qw(l_headers_mainsort l_headers_subsort l_subtotal_mainsort l_subtotal_subsort l_total l_parts l_customername l_customernumber transdatefrom transdateto decimalplaces customer customername customer_id department partnumber partsgroup country business description project_id customernumber salesman employee salesman_id employee_id business_id partsgroup_id mainsort subsort), - "$form->{db}number", + my @hidden_variables = (qw(l_headers_mainsort l_headers_subsort l_subtotal_mainsort l_subtotal_subsort l_total l_parts l_customername l_customernumber transdatefrom transdateto decimalplaces customer customername customer_id department partnumber partsgroup country business description project_id customernumber salesman employee salesman_id employee_id business_id partsgroup_id mainsort subsort), + "$form->{db}number", map({ "cvar_$_->{name}" } @searchable_custom_variables), map { "l_$_" } @columns ); @@ -207,73 +207,32 @@ sub invoice_transactions { my %column_alignment = map { $_ => 'right' } qw(lastcost sellprice sellprice_total lastcost_total parts_unit discount marge_total marge_percent qty weight); - + # so now the check-box "Description" is only used as switch for part description in invoice-mode # always fill the column "Description" if we are in Zwischensummenmode - if (not defined $form->{"l_parts"}) { - $form->{"l_description"} = "Y"; - }; + $form->{"l_description"} = "Y" if not defined $form->{"l_parts"};; map { $column_defs{$_}->{visible} = $form->{"l_${_}"} ? 1 : 0 } @columns; my @options; - if ($form->{description}) { - push @options, $locale->text('Description') . " : $form->{description}"; - } - if ($form->{customer}) { - push @options, $locale->text('Customer') . " : $form->{customername}"; - } - if ($form->{customernumber}) { - push @options, $locale->text('Customer Number') . " : $form->{customernumber}"; - } -# TODO: es wird nur id übergeben - if ($form->{department}) { - my ($department) = split /--/, $form->{department}; - push @options, $locale->text('Department') . " : $department"; - } - if ($form->{invnumber}) { - push @options, $locale->text('Invoice Number') . " : $form->{invnumber}"; - } - if ($form->{invdate}) { - push @options, $locale->text('Invoice Date') . " : $form->{invdate}"; - } - if ($form->{partnumber}) { - push @options, $locale->text('Part Number') . " : $form->{partnumber}"; - } - if ($form->{partsgroup_id}) { - my $partsgroup = SL::DB::PartsGroup->new(id => $form->{partsgroup_id})->load; - push @options, $locale->text('Group') . " : $partsgroup->{partsgroup}"; - } - if ($form->{country}) { - push @options, $locale->text('Country') . " : $form->{country}"; - } - if ($form->{employee_id}) { - my $employee = SL::DB::Employee->new(id => $form->{employee_id})->load; - push @options, $locale->text('Employee') . ' : ' . $employee->name; - } - if ($form->{salesman_id}) { - my $salesman = SL::DB::Employee->new(id => $form->{salesman_id})->load; - push @options, $locale->text('Salesman') . ' : ' . $salesman->name; - } - if ($form->{business_id}) { - my $business = SL::DB::Business->new(id => $form->{business_id})->load; - push @options, $locale->text('Customer type') . ' : ' . $business->description; - } - if ($form->{ordnumber}) { - push @options, $locale->text('Order Number') . " : $form->{ordnumber}"; - } - if ($form->{notes}) { - push @options, $locale->text('Notes') . " : $form->{notes}"; - } - if ($form->{transaction_description}) { - push @options, $locale->text('Transaction description') . " : $form->{transaction_description}"; - } - if ($form->{transdatefrom}) { - push @options, $locale->text('From') . " " . $locale->date(\%myconfig, $form->{transdatefrom}, 1); - } - if ($form->{transdateto}) { - push @options, $locale->text('Bis') . " " . $locale->date(\%myconfig, $form->{transdateto}, 1); - } + push @options, $locale->text('Description') . " : $form->{description}" if $form->{description}; + push @options, $locale->text('Customer') . " : $form->{customername}" if $form->{customer}; + push @options, $locale->text('Customer Number') . " : $form->{customernumber}" if $form->{customernumber}; + # TODO: es wird nur id übergeben + push @options, $locale->text('Department') . " : " . (split /--/, $form->{department})[0] if $form->{department}; + push @options, $locale->text('Invoice Number') . " : $form->{invnumber}" if $form->{invnumber}; + push @options, $locale->text('Invoice Date') . " : $form->{invdate}" if $form->{invdate}; + push @options, $locale->text('Part Number') . " : $form->{partnumber}" if $form->{partnumber}; + push @options, $locale->text('Group') . " : " . SL::DB::PartsGroup->new(id => $form->{partsgroup_id})->load->partsgroup if $form->{partsgroup_id}; + push @options, $locale->text('Country') . " : $form->{country}" if $form->{country}; + push @options, $locale->text('Employee') . ' : ' . SL::DB::Employee->new(id => $form->{employee_id})->load->name if $form->{employee_id}; + push @options, $locale->text('Salesman') . ' : ' . SL::DB::Employee->new(id => $form->{salesman_id})->load->name if $form->{salesman_id}; + push @options, $locale->text('Customer type') . ' : ' . SL::DB::Business->new(id => $form->{business_id})->load->description if $form->{business_id}; + push @options, $locale->text('Order Number') . " : $form->{ordnumber}" if $form->{ordnumber}; + push @options, $locale->text('Notes') . " : $form->{notes}" if $form->{notes}; + push @options, $locale->text('Transaction description') . " : $form->{transaction_description}" if $form->{transaction_description}; + push @options, $locale->text('From') . " " . $locale->date(\%myconfig, $form->{transdatefrom}, 1) if $form->{transdatefrom}; + push @options, $locale->text('Bis') . " " . $locale->date(\%myconfig, $form->{transdateto}, 1) if $form->{transdateto}; my $report = SL::ReportGenerator->new(\%myconfig, $form); @@ -306,6 +265,15 @@ sub invoice_transactions { 'data' => $form->{AR} ); + my $num_visible_columns = scalar $report->get_visible_columns; + my %empty_row = ( + description => { + data => '', + class => 'listrowempty', + colspan => $num_visible_columns, + }, + ); + # add sort and escape callback, this one we use for the add sub $form->{callback} = $href .= "&sort=$form->{mainsort}"; @@ -318,7 +286,7 @@ sub invoice_transactions { # Durchschnitt von marge_percent my @total_columns = qw(sellprice_total lastcost_total marge_total marge_percent ); - my %totals = map { $_ => 0 } @total_columns; + my %totals = map { $_ => 0 } @total_columns; my %subtotals1 = map { $_ => 0 } @subtotal_columns; my %subtotals2 = map { $_ => 0 } @subtotal_columns; @@ -352,18 +320,13 @@ sub invoice_transactions { # Anfangshauptüberschrift if ( $form->{l_headers_mainsort} eq "Y" && ( $idx == 0 or $ar->{ $form->{'mainsort'} } ne $form->{AR}->[$idx - 1]->{ $form->{'mainsort'} } )) { - my $headerrow; - - # use $emptyname for mainsort header if mainsort is empty - if ( $ar->{$form->{'mainsort'}} ) { - $headerrow->{description}->{data} = $ar->{$form->{'mainsort'}}; - } else { - $headerrow->{description}->{data} = $locale->text('empty'); + my $headerrow = { + # use $emptyname for mainsort header if mainsort is empty + data => $ar->{$form->{'mainsort'}} || $locale->text('empty'), + class => "listmainsortheader", + colspan => $num_visible_columns, }; - - $headerrow->{description}->{class} = "listmainsortheader"; - my $headerrow_set = [ $headerrow ]; - $report->add_data($headerrow_set); + $report->add_data([ { description => $headerrow } ]); # add empty row after main header # my $emptyheaderrow->{description}->{data} = ""; @@ -373,22 +336,20 @@ sub invoice_transactions { }; # subsort überschriften - if ( $idx == 0 - or $ar->{ $form->{'subsort'} } ne $form->{AR}->[$idx - 1]->{ $form->{'subsort'} } - or $ar->{ $form->{'mainsort'} } ne $form->{AR}->[$idx - 1]->{ $form->{'mainsort'} } + # special case: subsort headers only makes (aesthetical) sense if we show individual parts + if (( $idx == 0 + or $ar->{ $form->{'subsort'} } ne $form->{AR}->[$idx - 1]->{ $form->{'subsort'} } + or $ar->{ $form->{'mainsort'} } ne $form->{AR}->[$idx - 1]->{ $form->{'mainsort'} }) + && ($form->{l_headers_subsort} eq "Y") + && $form->{l_parts} ) { - my $headerrow; - - # if subsort name is defined, use that name in header, otherwise use $emptyname - if ( $ar->{$form->{'subsort'}} ) { - $headerrow->{description}->{data} = $ar->{$form->{'subsort'}}; - } else { - $headerrow->{description}->{data} = $locale->text('empty'); + my $headerrow = { + # if subsort name is defined, use that name in header, otherwise use $emptyname + data => $ar->{$form->{'subsort'}} || $locale->text('empty'), + class => "listsubsortheader", + colspan => $num_visible_columns, }; - $headerrow->{description}->{class} = "listsubsortheader"; - my $headerrow_set = [ $headerrow ]; - # special case: subsort headers only makes (aesthetical) sense if we show individual parts - $report->add_data($headerrow_set) if $form->{l_headers_subsort} eq "Y" and $form->{l_parts}; + $report->add_data([ { description => $headerrow } ]); }; map { $subtotals1{$_} += $ar->{$_}; @@ -401,7 +362,7 @@ sub invoice_transactions { # calculate averages for subtotals1 and subtotals2 # credited positions reduce both total and qty and thus don't influence average prices $subtotals1{sellprice} = $subtotals1{sellprice_total} / $subtotals1{qty}; - $subtotals1{lastcost} = $subtotals1{lastcost_total} / $subtotals1{qty}; + $subtotals1{lastcost} = $subtotals1{lastcost_total} / $subtotals1{qty}; } else { # qty is zero, so we have a special case where each position in subtotal # group has a corresponding credit note so that the total qty is zero in @@ -409,15 +370,15 @@ sub invoice_transactions { # rather than leaving the last value in sellprice/lastcost $subtotals1{sellprice} = 0; - $subtotals1{lastcost} = 0; + $subtotals1{lastcost} = 0; }; if ( $subtotals2{qty} != 0 ) { $subtotals2{sellprice} = $subtotals2{sellprice_total} / $subtotals2{qty}; - $subtotals2{lastcost} = $subtotals2{lastcost_total} / $subtotals2{qty}; + $subtotals2{lastcost} = $subtotals2{lastcost_total} / $subtotals2{qty}; } else { $subtotals2{sellprice} = 0; - $subtotals2{lastcost} = 0; + $subtotals2{lastcost} = 0; }; # Ertrag prozentual in den Summen: (summe VK - summe Ertrag) / summe VK @@ -432,53 +393,44 @@ sub invoice_transactions { map { $ar->{$_} = $form->format_amount(\%myconfig, $ar->{$_}, 3) } qw(weight); map { $ar->{$_} = $form->format_amount(\%myconfig, $ar->{$_}, $form->{"decimalplaces"} )} qw(lastcost sellprice); - my $row = { }; - - foreach my $column (@columns) { - $row->{$column} = { - 'data' => $ar->{$column}, - 'align' => $column_alignment{$column}, - }; - } - - $row->{description}->{class} = 'listsortdescription'; - - $row->{invnumber}->{link} = build_std_url("script=is.pl", 'action=edit') - . "&id=" . E($ar->{id}) . "&callback=${callback}"; - # Einzelzeilen nur zeigen wenn l_parts gesetzt ist, nützlich, wenn man nur # Subtotals und Totals sehen möchte - my $row_set = $form->{l_parts} ? [ $row ] : [ ]; + if ($form->{l_parts}) { + my %row = ( + map { ($_ => { data => $ar->{$_}, align => $column_alignment{$_} }) } @columns + ); + + $row{invnumber}->{link} = build_std_url("script=is.pl", 'action=edit') . "&id=" . E($ar->{id}) . "&callback=${callback}"; + + $report->add_data(\%row); + } # hier wird bei l_subtotal nicht differenziert zwischen mainsort und subsort # macht man l_subtotal_mainsort aus wird l_subtotal_subsort auch nicht ausgeführt - if (($form->{l_subtotal_mainsort} eq 'Y') + if ( ($form->{l_subtotal_mainsort} eq 'Y') + && ($form->{l_subtotal_subsort} eq 'Y') && (($idx == (scalar @{ $form->{AR} } - 1)) # last element always has a subtotal || ($ar->{ $form->{'subsort'} } ne $form->{AR}->[$idx + 1]->{ $form->{'subsort'} }) || ($ar->{ $form->{'mainsort'} } ne $form->{AR}->[$idx + 1]->{ $form->{'mainsort'} }) )) { # if value that is sorted by changes, print subtotal - if ($form->{l_subtotal_subsort} eq 'Y') { - push @{ $row_set }, create_subtotal_row_invoice(\%subtotals2, \@columns, \%column_alignment, \@subtotal_columns, 'listsubsortsubtotal', $ar->{ $form->{'subsort'} }) ; - push @{ $row_set }, insert_empty_row() if $form->{l_parts} and $addemptylines; - }; + $report->add_data(create_subtotal_row_invoice(\%subtotals2, \@columns, \%column_alignment, \@subtotal_columns, $form->{l_parts} ? 'listsubtotal' : undef, $ar->{ $form->{'subsort'} })); + $report->add_data({ %empty_row }) if $form->{l_parts} and $addemptylines; } # if last mainsort is reached or mainsort has changed, add mainsort subtotal and empty row - if (($form->{l_subtotal_mainsort} eq 'Y') + if ( ($form->{l_subtotal_mainsort} eq 'Y') + && ($form->{l_subtotal_mainsort} eq 'Y') + && ($form->{mainsort} ne $form->{subsort}) && (($idx == (scalar @{ $form->{AR} } - 1)) # last element always has a subtotal || ($ar->{ $form->{'mainsort'} } ne $form->{AR}->[$idx + 1]->{ $form->{'mainsort'} }) )) { # if value that is sorted by changes, print subtotal - if ($form->{l_subtotal_mainsort} eq 'Y' and $form->{mainsort} ne $form->{subsort} ) { # subtotal is overriden if mainsort and subsort are equal, don't print # subtotal line even if it is selected - push @{ $row_set }, create_subtotal_row_invoice(\%subtotals1, \@columns, \%column_alignment, \@subtotal_columns, 'listmainsortsubtotal', $ar->{$form->{mainsort}}); - push @{ $row_set }, insert_empty_row() if $addemptylines; # insert empty row after mainsort - }; + $report->add_data(create_subtotal_row_invoice(\%subtotals1, \@columns, \%column_alignment, \@subtotal_columns, 'listsubtotal', $ar->{$form->{mainsort}})); + $report->add_data({ %empty_row }) if $addemptylines; # insert empty row after mainsort } - $report->add_data($row_set); - $idx++; } if ( $form->{l_total} eq "Y" ) { @@ -490,16 +442,6 @@ sub invoice_transactions { $main::lxdebug->leave_sub(); } - -sub insert_empty_row { - my $dummyrow; - $dummyrow->{description}->{data} = ""; - my $dummyrowset = [ $dummyrow ]; - return $dummyrow; -}; - - - sub create_subtotal_row_invoice { $main::lxdebug->enter_sub(); @@ -509,7 +451,7 @@ sub create_subtotal_row_invoice { my %myconfig = %main::myconfig; my $locale = $main::locale; - my $row = { map { $_ => { 'data' => '', 'class' => $class, 'align' => $column_alignment->{$_}, } } @{ $columns } }; + my $row = { map { $_ => { data => '', class => $class, align => $column_alignment->{$_}, } } @{ $columns } }; # set name as "empty" if no value is given, except if we are dealing with the # absolute total, then just write "Total sum" @@ -534,4 +476,3 @@ sub create_subtotal_row_invoice { } 1; - diff --git a/css/Mobile/menuv4.css b/css/Mobile/menuv4.css deleted file mode 120000 index 6f69e0fcd..000000000 --- a/css/Mobile/menuv4.css +++ /dev/null @@ -1 +0,0 @@ -../lx-office-erp/menuv4.css \ No newline at end of file diff --git a/css/kivitendo/background_jobs.css b/css/kivitendo/background_jobs.css deleted file mode 120000 index 8031c949e..000000000 --- a/css/kivitendo/background_jobs.css +++ /dev/null @@ -1 +0,0 @@ -../lx-office-erp/background_jobs.css \ No newline at end of file diff --git a/css/kivitendo/background_jobs.css b/css/kivitendo/background_jobs.css new file mode 100644 index 000000000..e390bb5a4 --- /dev/null +++ b/css/kivitendo/background_jobs.css @@ -0,0 +1,14 @@ +/* Jobverwaltung */ +.background_job_list tbody pre, +.background_job_details tbody pre { + margin: 0px; +} + +.background_job_details tbody th { + text-align: right; + vertical-align: top; +} + +.background_job_details tbody td { + vertical-align: top; +} diff --git a/css/kivitendo/dhtmlsuite/menu-bar.css b/css/kivitendo/dhtmlsuite/menu-bar.css index 71fa9b364..9868743d4 100644 --- a/css/kivitendo/dhtmlsuite/menu-bar.css +++ b/css/kivitendo/dhtmlsuite/menu-bar.css @@ -16,6 +16,7 @@ ************************************************************************************************************/ .DHTMLSuite_menuBar_top{ /* The bar that is parent of the menu strip */ + color:#FFF; height:26px; width:100%; background-repeat:repeat-x; @@ -23,12 +24,15 @@ font-size:12px; z-index:100000; padding-left:10px; +/* background-image:url('../../../image/dhtmlsuite/menu_strip_bg.jpg');*/ + background-image:url('../../../image/bg_css_kivi_menu.png'); } .DHTMLSuite_menuBar_sub{ position:absolute; background-color:#FFF; - border:1px solid #D1D1D1; + border:1px solid #000; + background-image:url('../../../image/dhtmlsuite/menu-bar-kivi-gradient.png'); /* Background image for sub menu items */ background-repeat:repeat-y; background-position: left center; display:inline; diff --git a/css/kivitendo/dhtmlsuite/menu-item.css b/css/kivitendo/dhtmlsuite/menu-item.css index 5f753121a..7202b4401 100644 --- a/css/kivitendo/dhtmlsuite/menu-item.css +++ b/css/kivitendo/dhtmlsuite/menu-item.css @@ -2,41 +2,66 @@ .DHTMLSuite_menuItem_top_regular,.DHTMLSuite_menuItem_top_over,.DHTMLSuite_menuItem_top_click,.DHTMLSuite_menuItem_top_disabled,.DHTMLSuite_menuItem_top_active{ height:19px; - line-height:16px; - margin-right:2px; - margin-top:1px; - padding-left:4px; - padding-right:4px; - padding-top:2px; - padding-bottom:2px; } .DHTMLSuite_menuItem_top_regular div,.DHTMLSuite_menuItem_top_over div,.DHTMLSuite_menuItem_top_click div,.DHTMLSuite_menuItem_top_disabled div,.DHTMLSuite_menuItem_top_active div{ padding-top:2px; padding-bottom:2px; } .DHTMLSuite_menuItem_top_regular{ /* Top level menu item - Regular state */ + padding-left:4px; + padding-right:4px; + margin-right:2px; + padding-top:1px; + padding-bottom:1px; cursor:pointer; + line-height:16px; + margin-top:2px; } .DHTMLSuite_menuItem_top_over{ /* Top level menu item - Mouse over state */ - color:#FE5F14; - background-color:#D1D1D1; + padding-left:3px; + padding-right:3px; + margin-right:2px; + border:1px solid #000; + color:#000; + background-color:#bec6a2; cursor:pointer; + line-height:16px; + margin-top:2px; } .DHTMLSuite_menuItem_top_active{ /* Top level menu item - Active state - this is typical the state for menu item 1 when a sub group is expanded and the mouse is located over one of the sub menu items */ + padding-left:3px; + padding-right:3px; + margin-right:2px; + border:1px solid #000; + border-bottom:1px solid #FFF; cursor:pointer; + line-height:16px; + margin-top:2px; } .DHTMLSuite_menuItem_top_click{ /* Top level menu item - Mouse click state */ - color:#FE5F14; - background-color:#D1D1D1; + padding-left:3px; + padding-right:3px; + margin-right:2px; + border:1px solid #000; + background-color:#bec6a2; cursor:pointer; + line-height:16px; + margin-top:2px; z-index:20000; } .DHTMLSuite_menuItem_top_disabled{ /* Disabled menu item */ + padding-left:4px; + padding-right:4px; + margin-right:2px; + padding-top:1px; + padding-bottom:1px; cursor:default; + line-height:16px; + margin-top:2px; } .DHTMLSuite_menuItem_top_disabled img,.DHTMLSuite_menuItem_top_disabled div{ /* Sub divs of disabled top level items. A menu item is a div with some subdivs(one for the icon, one for text etc.). this is the css for these sub divs */ @@ -112,19 +137,21 @@ -khtml-opacity:.4; /* Transparency */ } .DHTMLSuite_menuItem_sub_regular,.DHTMLSuite_menuItem_sub_disabled{ /* Regular menu item */ + margin-left:2px; /* size of margin above + 1 pixel */ + padding-top:3px; /* Size of padding-top above + 1 pixel */ + padding-bottom:3px; /* Size of padding-bottom above + 1 pixel */ } .DHTMLSuite_menuItem_sub_over,.DHTMLSuite_menuItem_sub_click,.DHTMLSuite_menuItem_sub_active{ + border:1px solid #006; /* Border around mouse over items, click items and active items */ } .DHTMLSuite_menuItem_sub_over,.DHTMLSuite_menuItem_sub_active{ /* Mouse over effect */ - color:#FE5F14; - background-color:#D1D1D1; + background-color:#bec6a2; /* Background color of mouse over items and active items(Active item = parent elements of the menu item the mouse is currently over */ } .DHTMLSuite_menuItem_sub_click{ /* Mouse click effect */ - color:#FE5F14; - background-color:#D1D1D1; + background-color:#bec6a2; /* Background color when the mouse button is pressed down on a menu item */ } .DHTMLSuite_menuItem_sub_click div, .DHTMLSuite_menuItem_sub_regular div,.DHTMLSuite_menuItem_sub_over div,.DHTMLSuite_menuItem_sub_active div,.DHTMLSuite_menuItem_sub_disabled div{ /* divs for the text,icon and arrow of a menu item */ @@ -151,13 +178,10 @@ margin-bottom:1px; /* Space below the separator */ margin-left:24px; /* left margin because we don't want the separator to cover the gradient */ padding-right:3px; /* space at the right of the separator */ - color:#FE5F14; - background-color:#D1D1D1; + background-color:#6A8CCB; /* background color for the separator - blue */ } .DHTMLSuite_menuItem_textContent { - border-bottom-style: none !important; - background-color: inherit !important; color: inherit !important; } diff --git a/css/kivitendo/frame_header b/css/kivitendo/frame_header deleted file mode 120000 index d69ab7feb..000000000 --- a/css/kivitendo/frame_header +++ /dev/null @@ -1 +0,0 @@ -../lx-office-erp/frame_header/ \ No newline at end of file diff --git a/css/kivitendo/frame_header/header.css b/css/kivitendo/frame_header/header.css new file mode 100644 index 000000000..4af67bfef --- /dev/null +++ b/css/kivitendo/frame_header/header.css @@ -0,0 +1,38 @@ +#frame-header .frame-header-element a:link, +#frame-header .frame-header-element a:visited, +#frame-header .frame-header-element a:hover, +#frame-header .frame-header-element a:active { + color: white; + background: none; + text-decoration: underline; +} + +#frame-header { + background: url('../../../image/bg_kivi_titel.png') repeat-x; + text-align: center; + margin: 0; + padding: 0; + color: white; + border: 0; + overflow: hidden; + width: 100%; + border-spacing: 0; + font-size: 12px; +} + +#frame-header .frame-header-left { + float: left; +} +#frame-header .frame-header-right { + float: right; +} + +#frame-header .frame-header-left, +#frame-header .frame-header-center, +#frame-header .frame-header-right { + border-spacing: 0; + color: white; + padding: 0; + font-family: verdana,arial,sans-serif; + vertical-align: middle; +} diff --git a/css/kivitendo/jquery.autocomplete.css b/css/kivitendo/jquery.autocomplete.css deleted file mode 120000 index dc1123169..000000000 --- a/css/kivitendo/jquery.autocomplete.css +++ /dev/null @@ -1 +0,0 @@ -../lx-office-erp/jquery.autocomplete.css \ No newline at end of file diff --git a/css/kivitendo/jquery.autocomplete.css b/css/kivitendo/jquery.autocomplete.css new file mode 100644 index 000000000..91b622833 --- /dev/null +++ b/css/kivitendo/jquery.autocomplete.css @@ -0,0 +1,48 @@ +.ac_results { + padding: 0px; + border: 1px solid black; + background-color: white; + overflow: hidden; + z-index: 99999; +} + +.ac_results ul { + width: 100%; + list-style-position: outside; + list-style: none; + padding: 0; + margin: 0; +} + +.ac_results li { + margin: 0px; + padding: 2px 5px; + cursor: default; + display: block; + /* + if width will be 100% horizontal scrollbar will apear + when scroll mode will be used + */ + /*width: 100%;*/ + font: menu; + font-size: 12px; + /* + it is very important, if line-height not setted or setted + in relative units scroll will be broken in firefox + */ + line-height: 16px; + overflow: hidden; +} + +.ac_loading { + background: white url('indicator.gif') right center no-repeat; +} + +.ac_odd { + background-color: #eee; +} + +.ac_over { + background-color: #0A246A; + color: white; +} diff --git a/css/kivitendo/jquery.multiselect2side.css b/css/kivitendo/jquery.multiselect2side.css deleted file mode 120000 index 270f1a248..000000000 --- a/css/kivitendo/jquery.multiselect2side.css +++ /dev/null @@ -1 +0,0 @@ -../lx-office-erp/jquery.multiselect2side.css \ No newline at end of file diff --git a/css/kivitendo/jquery.multiselect2side.css b/css/kivitendo/jquery.multiselect2side.css new file mode 100644 index 000000000..ced4d988b --- /dev/null +++ b/css/kivitendo/jquery.multiselect2side.css @@ -0,0 +1,56 @@ +.ms2side__div { + clear: left; + width: 100%; + padding: 1px; + float: left; + background : url('') repeat-x; /* HACK FOR CHROME */ +} + +.ms2side__select { + float: left; +} + +.ms2side__header { + color: blue; + background-color: #EEEEFF; +} + +.ms2side__options, .ms2side__updown { + float: left; + font-size: 10pt; + margin: 0; + padding: 0 8px; + width: 40px; + color: black; + text-align: center; + overflow: hidden; +} + +.ms2side__updown { + font-size: 9pt; +} + +.ms2side__options p, .ms2side__updown p { + margin: 2px 0; + padding: 0; + cursor: pointer; + border: 1px solid black; +} + +.ms2side__options p.ms2side_hover, .ms2side__updown p.ms2side_hover { + background-color: #F0F0FF; + border-color: #0000FF; + cursor: pointer; +} + +.ms2side__options p.ms2side__hide, .ms2side__updown p.ms2side__hide { + cursor: default; + color: grey; + border: 1px solid grey; + background-color: #F0F0F0; +} + +.ms2side__div select { + width: 220px; + float: left; +} diff --git a/css/kivitendo/list_accounts.css b/css/kivitendo/list_accounts.css new file mode 100644 index 000000000..552a901cf --- /dev/null +++ b/css/kivitendo/list_accounts.css @@ -0,0 +1,92 @@ +/* Kontenliste Styles */ + +.coa_listtop { + background-color:rgb(236,233,216); + text-align:left; + padding:5px; + font-size:12pt; + color:black; + font-weight: bolder; + border-style:dashed; + border-width:thin; +} + +.coa_listheading { + background-color:rgb(236,233,216); + color: black; + background-image:url("../../image/fade.png"); +} + +.coa_listheading_element { + font-size:10pt; + padding:3px; + font-weight:bolder; + text-align:left; + border-style:dotted; + border-width:thin; +} + +.coa_listrow1 { + background-color: rgb(208,207,201); + color: black; + vertical-align: top; +} + +.coa_listrow0 { + background-color: rgb(236,233,216); + color: black; + vertical-align: top; +} + +.coa_amount { + text-align:right; + font-family:monospace; +} + +.coa_account_header { + font-size:10pt; + padding:3px; + font-weight:bolder; + text-align:left; + border-style:none; + border-width:thin; +} + +.coa_account_header_sc { + font-size:10pt; + padding:3px; + font-weight:bolder; + text-align:left; + border-style:none; + border-width:thin; + cursor:s-resize; +} + +.coa_detail { + padding:0px; + border-style:none; +} + +.coa_detail_emph { + font-size:10pt; + font-weight:bold; + color:darkred; +} + +.coa_details_header { + font-size:8pt; + padding:3px; + font-weight:bolder; + text-align:center; + border-style:none; + border-width:thin; +} + +.coa_details_header2 { + font-size:8pt; + padding:3px; + font-weight:normal; + text-align:left; + border-style:none; + border-width:thin; +} diff --git a/css/kivitendo/main.css b/css/kivitendo/main.css index 77fe0978d..e69e0efe2 100644 --- a/css/kivitendo/main.css +++ b/css/kivitendo/main.css @@ -1,357 +1,452 @@ -/* Stylesheet for kivitendo * Name:kivitendo.css*/ -/* Colortable - -Background: #EBEBEB burlywood -Links: #006400 DarkGreen -Link-hover #FE5F14 Orange / #FFFFE0 lightyellow -Titles, BG/VG: #79B61B Mid-green FFFFFF White -Tabcolor: #CAFFA3 -*/ +/* Stylesheet for Lx-Office -body { - font-family: Verdana, Arial, Helvetica; - background-color: #FFFFFF; - color: #000000; - font-size: 9pt; +/* The look of links */ +A:link { color: #597d12; text-decoration: none; } +A:visited { color: #597d12; text-decoration: none; } +A:active { color: black; text-decoration: none; } +A:hover { color: black; + background-color: #bec6a2; + text-decoration: none; + } +a, div { + transition: background-color 0.2s; + -moz-transition: background-color 0.2s; + -webkit-transition: background-color 0.2s; } - -/* The look of links */ -a { - padding: 0 0.2em; - text-decoration: none; - /* border-bottom: thin solid; */ - /* font-weight: bold; */ +input, textarea, select { + border: 1px; + border-color: darkgray lightgray lightgray; + border-style: solid; + padding: 1px; + background-color: white; } -A:link, A:visited, A:active { - color: #000000; - border-bottom: thin solid #FE5F14; +img:hover { + display:block !important; } -a:hover { - color: #FE5F14; - background-color: #D1D1D1; + +select { + padding: 0px; } -a.selected:hover { - color:#EBEBEB; + +input:focus, textarea:focus, select:focus { + background-color: whitesmoke; + border: 1px; + border-color: gray lightgray lightgray; + border-style: solid; } -a.nomobile { - background-color:transparent; - border:none; + +input:hover, textarea:hover, select:hover { + border-color: dimgray darkgray darkgray; } -table { - font-size: 90% !important; - table-layout: auto; - border-spacing: 0.3em; +input[type="button"], +input[type="submit"], +button, +input[type="button"]:focus, +input[type="submit"]:focus, +button:focus { + border: 1px; + border-color: darkgray; + border-style: solid; + padding: 0px 4px; + -webkit-border-radius: 2px; + -moz-border-radius: 2px; + border-radius: 2px; + background-color: whitesmoke; } -/* table a { - color:#FE5F14 !important; - border-bottom:none; -} */ +button:hover, +input[type="button"]:hover, +input[type="submit"]:hover { + border: 1px; + background-color: lightgray; + border-color: gray; + border-style: solid; + -webkit-border-radius: 2px; + -moz-border-radius: 2px; + border-radius: 2px; +} -ul { +html { + height: 100%; } -hr { - background-color: #006400; - border: none; - color: #79B61B; - height: 2px; +body { + font-family: Verdana, Arial, Helvetica, sans-serif; + font-size: 10pt; + background-color: white; + background-image: url("../../image/fade.png"); background-repeat:repeat-x; + color: black; + height: 100%; } -/* I.E. & Chrome können das nicht! */ -/* input[type="radio"], input[type="checkbox"]{ - width:1.15em; - height:1.15em; - border:1px solid; - color: #006400; -} */ -input:focus, textarea:focus, select:focus { - background-color: #FFFFA0; - border: 2px solid #FE5F14; - /* border-bottom: medium solid #FE5F14; */ -} -/* Fängt den "Schrink" beim focus - problem für i.e. und chrome */ -/* input[type="radio"]:focus, input[type="checkbox"]:focus{ - width:1.2em; - height:1.2em; -} */ td { - color: #000000; - font-weight: normal; + font-family: Verdana, Arial, Helvetica, sans-serif; + color: black; + font-size: 8pt; + font-weight: normal; +} +td.hover:hover { + color: black; +/* background-color: #FFFFCC; + font-size: 8pt; + text-decoration: none; + border:none; + borderWidth:0px; + borderColor:2557AD; +*/ } -/* td.hover:hover { - color: #006400; - background-color: #FFFFE0; -} */ + + th { - color: #000000; - font-weight: bold; + font-family: Verdana, Arial, Helvetica, sans-serif; + color: black; + font-size: 8pt; + font-weight: normal; } + /* login and admin */ -.login a, .login a:visited, .login a:hover { - text-decoration: none !important; - background-color:transparent !important; - border:none; -} -.login a:hover { - background: none; +.login { + font-family: Verdana, Arial, Helvetica, sans-serif; } -body.login { - background-color: #FFFFE0; - color: #000000; +div.login { + min-height: 100%; + height: auto !important; + height: 100%; + background: #bec6a2; + color: #A0A0A0; } h1.login { + font-size: 18pt; +} +h3.login { + color:#fe5f14; } table.login { - background-color: #FFFFE0; - padding: 20px; + background-color: #efedde; + padding: 20px; } td.login { - text-align: center; + text-align: center; } th.login { - text-align: right; + text-align: right; } + div.admin { - background-color: #FFFFE0; - padding: 8px; - color: #000000; -} -body.menu { - color: #000000; + color: black; + margin: 8px; } -/* Warnings */ + .message_error_login { - color: #000000; - border: 1px solid #8b0000; - background-color: #ffcccc; - padding: 3px; + color: #fe5f14; + border: 1px solid #fe5f14; + background-color: #ffffff; + padding: 3px; } .message_ok { - padding: 5px; - background-color: #ADFFB6; - color: black; - font-weight: bolder; - text-align: center; - border-style: solid; - border-width: thin; + font-size: 12pt; + padding:5px; + background-color: #ADFFB6; + color: black; + font-weight: bolder; + text-align:center; + border-style:solid; + border-width:thin; } .message_error { - padding: 5px; - background-color: #CC0000; - color: white; - font-weight: bolder; - text-align: center; - border-style: solid; - border-width: thin; + font-size: 12pt; + padding:5px; + background-color: #FFAAAA; + color: black; + font-weight: bolder; + text-align:center; + border-style:solid; + border-width:thin; } .message_hint { - padding: 0.5em; - background-color: #FFEE66; - color: black; - font-weight: bolder; - text-align: center; - border-style: solid; - border-width: thin; + font-size: 12pt; + padding:5px; + background-color: #FFFE66; + color: black; + font-weight: bolder; + text-align:center; + border-style:solid; + border-width:thin; } .message_error_label { - padding: 0.5em; - background-color: #E00000; - color: white; - font-weight: normal; - text-align: left; - border-style: solid; - border-width: thin; -} -/* Headings */ + font-size: 0.8em; + padding:5px; + background-color: #FEE; + font-weight:normal; + text-align:left; + border-style:solid; + border-width:thin; +} + +/* + Überschriftsbalken +*/ .listtop, h1 { - font-size:125%; - background-color: #006400; - text-align: left; - padding: 0.5em; - color: #FFFFFF; - font-weight: bolder; - border-style: none; - border-width: thin; - -moz-border-radius:0.4em; /* Firefox */ - -webkit-border-radius:0.4em; /* Safari, Chrome */ - -khtml-border-radius:0.4em; /* Konqueror */ - border-radius:0.4em; /* CSS3 */ - behavior:url(border-radius.htc); -} - -/* .listelement { - background-color: #f8ffb3; - color: #000000; + background-color: rgb(236,233,216); + text-align:center; + padding:5px; + font-size: 10pt; + color: black; + font-weight: bolder; + border-style:dashed; + border-width:thin; +} + + +.listelement { + background-image: url("../../image/fade2.png"); + background-repeat:repeat-x; + border-style:dashed; + border-width:thin; } + .listelement2 { - background-color: #8ee085; - color: #000000; -} */ -.listheading { - padding: 0.2em; - background-color: #EBEBEB; - color: #006400; - font-weight: bolder; - text-align: left; - border-style: none; -} - -/* .listheadingcontent { - background-color: #EBEBEB; - color: #006400; - font-weight: bolder; - text-align: left; -} */ + background-image: url("../../image/fade2.png"); + background-repeat:repeat-x; + border-style:dashed; + border-width:thin; +} + +.listheading, .listheading th { + font-size: 9pt; + padding:3px; + background-color: + rgb(236,233,216); + color: black; + font-weight: bolder; + text-align:left; + background-image: url("../../image/fade.png"); + border-style:dotted; + border-width:thin; +} + +.listheadingcontent { + font-size: 9pt; + background-color: + rgb(236,233,216); + color: black; + font-weight: bolder; + text-align:left; +} .accountlistheading { - padding: 0.3em; - color: #006400; - font-weight: bold; - text-align: left; - background-color: #EBEBEB; + font-size: 10pt; + padding:3px; + color: white; + font-weight: bold; + text-align:left; + background-color:rgb(133,132,129); } + .subsubheading { - color: #000000; - font-weight: bolder; - text-decoration: underline; + color: black; + font-weight: bolder; + text-decoration: underline; } + .optionen { - border: dashed; - border-width: 1px; - background: #FFFFE0; -} -.listrow1 { - background-color: #FFFFFF; - color: black; - vertical-align: top; -} -.listrow0 { - background-color: #FFFF99; - color: black; - vertical-align: top; -} -.listsubtotal { - background-color: rgb(236,233,216); - color: black; - font-weight: bolder; -} -.listtotal, .listtotal td { - background-color: rgb(236,233,216); - color: black; - font-weight: bolder; + border:dashed; +/* padding-top:10px; + padding-bottom:10px; + padding-left:10px; +*/ + border-width:1px; + background:#efedde; } + + +.listrow1 { background-color: rgb(208,207,201); color: black; vertical-align: top; } +.listrow0 { background-color: rgb(236,233,216); color: black; vertical-align: top; } +.listrowempty { background-color: rgb(255,255,255); color: black; vertical-align: top; } + +.redrow1 { background-color: rgb(250,167, 161); color: black; vertical-align: top; } +.redrow0 { background-color: rgb(255,193,176); color: black; vertical-align: top; } + +.greenrow1 { background-color: rgb(0,250,0); color: black; vertical-align: top; } +.greenrow0 { background-color: rgb(0,255,0); color: black; vertical-align: top; } + +.listsubtotal { font-size: 8pt; background-color: rgb(236,233,216); color: black; font-weight: bolder;} + +.listtotal, .listtotal td { font-size: 8pt; background-color: rgb(236,233,216); color: black; font-weight: bolder;} + /* Verkaufsbericht */ -.listmainsortheader { - background-color: rgb(236,233,216); - color: red; - font-weight: bolder; - padding-left: 10px; - padding-top: 0px; -} -.listmainsortsubtotal { - background-color: rgb(236,233,216); - color: red; - font-weight: bolder; - padding-left: 10px; -} -.listsubsortheader { - background-color: rgb(236,233,216); - color: green; - font-weight: bolder; - padding-left: 20px -} -.listsubsortsubtotal { - background-color: rgb(236,233,216); - color: green; - font-weight: bolder; - padding-left: 20px -} -.listsortdescription { - background-color: rgb(236,233,216); - color: black; - font-weight: normal; - padding-left: 30px -} +.listmainsortheader { font-size: 8pt; background-color: rgb(236,233,216); color: red; font-weight: bolder; padding-left: 10px; padding-top: 0px;} +.listmainsortsubtotal { font-size: 8pt; background-color: rgb(236,233,216); color: red; font-weight: bolder; padding-left: 10px;} +.listsubsortheader { font-size: 8pt; background-color: rgb(236,233,216); color: green; font-weight: bolder; padding-left: 20px} +.listsubsortsubtotal { font-size: 8pt; background-color: rgb(236,233,216); color: green; font-weight: bolder; padding-left: 20px} +.listsortdescription { font-size: 8pt; background-color: rgb(236,233,216); color: black; font-weight: normal; padding-left: 30px} + + .submit { - font-family: Verdana, Arial, Helvetica; - color: #000000; + font-family: Verdana, Arial, Helvetica, sans-serif; + color: #000000; } .checkbox, .radio { - font-family: Verdana, Arial, Helvetica; - color: #778899; + font-family: Verdana, Arial, Helvetica, sans-serif; + color: #778899; } -.plus0 { -/* font color for negative numbers */ - color: red; + +.plus0 { /* font color for negative numbers */ + color: red; } + .plus1 { - color: green; + color: green; } + +td.numeric { /* class for numeric columns in tables */ + text-align: right +} + h2.confirm { - color: blue; + color: blue; + font-size: 14pt; } + h2.error { - color: red; + color: red; + font-size: 14pt; } + fieldset { - margin-top: 15px; - color: black; - font-weight: bolder; + margin-top:15px; + color: black; + font-weight: bolder; } + /* media stuff */ + @media screen { -.noscreen { -/* items with this class won't display */ - display: none; -} + .noscreen { /* items with this class won't display */ + display: none; + } } + @media print { -.noprint { -/* items with this class won't print */ - display: none; -} + .noprint { /* items with this class won't print */ + display: none; + } } + .filecontent { - border: 1px solid blue; - padding-left: 2px; - padding-right: 2px; + border: 1px solid blue; + padding-left: 2px; + padding-right: 2px; } + label { - cursor: pointer; - vertical-align: top; + cursor:pointer; } + .unbalanced_ledger { - background-color: #ffa0a0; + background-color: #ffa0a0; } + .clearfix:after { - clear: both; - content: "."; - display: block; - height: 0; - visibility: hidden; + clear:both; + content:"."; + display:block; + font-size:0; + height:0; + visibility:hidden; } + .flash_message_error { - background-color: #FFD6D6; - border: 1px solid #AE0014; - margin-top: 5px; - margin-bottom: 5px; - padding: 5px; + background-color:#FFD6D6; + border: 1px solid #AE0014; + margin-top: 5px; + margin-bottom: 5px; + padding: 5px; } + .flash_message_warning { - background-color: #FFE8C7; - border: 1px solid #FF6600; - margin-top: 5px; - margin-bottom: 5px; - padding: 5px; + background-color:#FFE8C7; + border: 1px solid #FF6600; + margin-top: 5px; + margin-bottom: 5px; + padding: 5px; } + .flash_message_info { - background-color: #DCF2FF; - border: 1px solid #4690FF; - margin-top: 5px; - margin-bottom: 5px; - padding: 5px; + background-color:#DCF2FF; + border: 1px solid #4690FF; + margin-top: 5px; + margin-bottom: 5px; + padding: 5px; +} + +.jqmWindow { + display: none; + + position: fixed; + top: 17%; + left: 40%; + + margin-left: -200px; + width: 700px; + + background-color: #bec6a2; + color: #333; + border: 1px solid black; + padding: 4px; +} + +.jqmContent { + padding: 8px; +} + +.jqmWindow h1 { + border: 0; + padding: 0; + background-color: #bec6a2; +} + +.jqmOverlay { + background-color: #000; +} + +/* Kontenliste Styles */ + +.coa_listrow1 { + background-color: rgb(208,207,201); + color: black; + vertical-align: top; +} + +.coa_listrow0 { + background-color: rgb(236,233,216); + color: black; + vertical-align: top; +} + +.coa_detail_emph { + font-size:10pt; + font-weight:bold; + color:darkred; +} + +.coa_details_header { + font-size:8pt; + padding:3px; + font-weight:bolder; + text-align:center; + border-style:none; + border-width:thin; +} + +.coa_details_header2 { + font-size:8pt; + padding:3px; + font-weight:normal; + text-align:left; + border-style:none; + border-width:thin; } diff --git a/css/kivitendo/menu.css b/css/kivitendo/menu.css index b5819a6cc..cbe012cc1 100644 --- a/css/kivitendo/menu.css +++ b/css/kivitendo/menu.css @@ -1,280 +1,155 @@ -/* kivitendo menu Colors: -Menu Background color #FE5F14 -orangemenu color #FFFFFF -whiteMenu Hover background color #FFFFE0 -DarkGreensubenu pointer -*/ -body.menuv4 { - behavior: url("css/csshover.htc"); - /*font-size: 14pt;*/ - line-height: 20pt; - font-family: Verdana, Geneva, Tahoma, sans-serif; - background-color: #FFFFFF; - color: #000000; -} -#menuv4 { - /*font-size: 85%;*/ - width: 99.8%; - float: left; - /*border: 3px solid;*/ - background-color: #FFFFFF; - color: #000000; -} -#menuv4 a, #menuv4 h2, #menuv4 div.x { - font-size: 80%; - line-height: 120%; - display: block; - border: 0; - white-space: nowrap; - margin: 0; - padding: 0.3em 1em; -} -#menuv4 h2 { - background-color: #ffffff; - color: #000000; - /*padding: 2px 15px;*/ -/* Firefox */ - -moz-border-radius: 0.4em 0.4em 0; -/* Safari, Chrome */ - -webkit-border-radius: 0.4em 0.4em 0; -/* Konqueror */ - -khtml-border-radius: 0.4em 0.4em 0; -/* CSS3 */ - border-radius: 0.4em 0.4em 0 0; -/* behavior: url(border-radius.htc); */ -} -#menuv4 ul:hover h2 { - background-color:#DCDCDC; -} -#menuv4 a, #menuv4 a:visited, #menuv4 div.x, #menuv4 div.x:visited { - color: #000000; - text-decoration: none; - padding-right: 10px; -} -#menuv4 a { - background: #EBEBEB; -} -#menuv4 div.x, #menuv4 div.x:visited { - background-color: #EBEBEB; - border-right: 1em solid #FE5F14; -} -#menuv4 div.x:hover { - border-right: none; -} -#menuv4 a:hover, #menuv4 div.x:hover { - color: #FE5F14; - background-color: #EBEBEB; -} -#menuv4 a:active, #menuv4 div.x:active { - color: #FE5F14; - background-color: #EBEBEB; -} -#menuv4 ul { - list-style: none; - margin: 0; - padding: 0; - float: left; -} -#menuv4 li { - position: relative; - float: none; - border: 0; -} -li.sub { - position: relativ; - left: 0.2em; - top: 0px; - background-color: #FFFFFF; -} -/* IE6 spacing bug fix,
  • s without a bottom border get spaced to far * correction:the bug will change the height of the parent element! this will also cause the whole menu to grow * so the only method to get this pile of crap going is to add a bottom border to the
  • s, where the enclosing