From 9a578c8b55b857e41dffbaf844023efcbdd22ace Mon Sep 17 00:00:00 2001 From: =?utf8?q?Jan=20B=C3=BCren?= Date: Fri, 28 Jun 2013 11:57:49 +0200 Subject: [PATCH] Trac 2300 / 2301 zweiter Versuch ;-) --- SL/Common.pm | 168 +++++++++++++++++---- SL/DB/AuthClient.pm | 6 +- SL/DB/MetaSetup/Default.pm | 20 ++- SL/Form.pm | 13 +- SL/InstanceConfiguration.pm | 53 +++++++ bin/mozilla/ct.pl | 6 +- bin/mozilla/do.pl | 2 +- bin/mozilla/ir.pl | 2 +- bin/mozilla/is.pl | 2 +- bin/mozilla/oe.pl | 4 +- config/kivitendo.conf.default | 13 -- doc/changelog | 2 + locale/de/all | 16 ++ sql/Pg-upgrade2/defaults_feature.pl | 4 +- templates/webpages/client_config/form.html | 2 + 15 files changed, 247 insertions(+), 66 deletions(-) diff --git a/SL/Common.pm b/SL/Common.pm index e63b698a1..bcf68dc71 100644 --- a/SL/Common.pm +++ b/SL/Common.pm @@ -14,6 +14,9 @@ use strict; use Carp; use Time::HiRes qw(gettimeofday); use Data::Dumper; +use File::Copy; +use File::stat; +use File::Slurp; use SL::DBUtils; @@ -326,46 +329,27 @@ sub mkdir_with_parents { $main::lxdebug->leave_sub(); } +# +# Legt ein entsprechendes Webdav-Verzeichnis an, falls +# Webdav als Option konfiguriert ist. Falls schon ein +# Ordner vorhanden ist, werden alle Dateien alphabetisch +# sortiert ausgelesen und an der Oberfläche angezeigt +# sub webdav_folder { $main::lxdebug->enter_sub(); my ($form) = @_; return $main::lxdebug->leave_sub() - unless ($::lx_office_conf{features}->{webdav} && $form->{id}); + unless ($::instance_conf->get_webdav && $form->{id}); - croak "No client set in \$::auth" unless $::auth->client; - my ($path, $number); $form->{WEBDAV} = []; - if ($form->{type} eq "sales_quotation") { - ($path, $number) = ("angebote", $form->{quonumber}); - } elsif ($form->{type} eq "sales_order") { - ($path, $number) = ("bestellungen", $form->{ordnumber}); - } elsif ($form->{type} eq "request_quotation") { - ($path, $number) = ("anfragen", $form->{quonumber}); - } elsif ($form->{type} eq "purchase_order") { - ($path, $number) = ("lieferantenbestellungen", $form->{ordnumber}); - } elsif ($form->{type} eq "sales_delivery_order") { - ($path, $number) = ("verkaufslieferscheine", $form->{donumber}); - } elsif ($form->{type} eq "purchase_delivery_order") { - ($path, $number) = ("einkaufslieferscheine", $form->{donumber}); - } elsif ($form->{type} eq "credit_note") { - ($path, $number) = ("gutschriften", $form->{invnumber}); - } elsif ($form->{vc} eq "customer") { - ($path, $number) = ("rechnungen", $form->{invnumber}); - } else { - ($path, $number) = ("einkaufsrechnungen", $form->{invnumber}); - } - + my ($path, $number) = get_webdav_folder($form); # ausgelagert return $main::lxdebug->leave_sub() unless ($path && $number); - $number =~ s|[/\\]|_|g; - - $path = "webdav/" . $::auth->client->{id} . "/${path}/${number}"; - if (!-d $path) { mkdir_with_parents($path); @@ -373,6 +357,7 @@ sub webdav_folder { my $base_path = $ENV{'SCRIPT_NAME'}; $base_path =~ s|[^/]+$||; if (opendir my $dir, $path) { + # alphabetisch sortiert. foreach my $file (sort { lc $a cmp lc $b } readdir $dir) { next if (($file eq '.') || ($file eq '..')); @@ -574,6 +559,135 @@ sub check_params_x { } } +# +# Diese Routine baut aus dem Masken-Typ und der +# Beleg-Nummer, das entsprechende Webdav-Verzeichnis zusammen +# Nimmt leider noch die ganze Form entgegen und den if-elsif-Block +# sollte man schöner "dispatchen" +# Ergänzung 6.5.2011, den else-Zweig defensiver gestaltet und mit +# -1 als n.i.O. Rückgabewert versehen +# +sub get_webdav_folder { + $main::lxdebug->enter_sub(); + + my ($form) = @_; + + croak "No client set in \$::auth" unless $::auth->client; + + my ($path, $number); + + # dispatch table + if ($form->{type} eq "sales_quotation") { + ($path, $number) = ("angebote", $form->{quonumber}); + } elsif ($form->{type} eq "sales_order") { + ($path, $number) = ("bestellungen", $form->{ordnumber}); + } elsif ($form->{type} eq "request_quotation") { + ($path, $number) = ("anfragen", $form->{quonumber}); + } elsif ($form->{type} eq "purchase_order") { + ($path, $number) = ("lieferantenbestellungen", $form->{ordnumber}); + } elsif ($form->{type} eq "sales_delivery_order") { + ($path, $number) = ("verkaufslieferscheine", $form->{donumber}); + } elsif ($form->{type} eq "purchase_delivery_order") { + ($path, $number) = ("einkaufslieferscheine", $form->{donumber}); + } elsif ($form->{type} eq "credit_note") { + ($path, $number) = ("gutschriften", $form->{invnumber}); + } elsif ($form->{vc} eq "customer") { + ($path, $number) = ("rechnungen", $form->{invnumber}); + } elsif ($form->{vc} eq "vendor") { + ($path, $number) = ("einkaufsrechnungen", $form->{invnumber}); + } else { + # wir befinden uns nicht in einer belegmaske + # scheinbar wird diese routine auch bspw. bei waren + # aufgerufen - naja, steuerung über die $form halt ... + $main::lxdebug->leave_sub(); + return undef; + } + + $number =~ s|[/\\]|_|g; + + $path = "webdav/" . $::auth->client->{id} . "/${path}/${number}"; + + $main::lxdebug->leave_sub(); + + return ($path, $number); +} + +# +# Falls Webdav aktiviert ist, auch den generierten Beleg in das +# Webdav-Verzeichnis kopieren +# +# +sub copy_file_to_webdav_folder { + $main::lxdebug->enter_sub(); + + my ($form) = @_; + my ($last_mod_time, $latest_file_name, $complete_path); + + # checks + foreach my $item (qw(tmpdir tmpfile type)){ + if (!$form->{$item}){ + $main::lxdebug->message(0, 'Missing parameter'); + $main::form->error($main::locale->text("Missing parameter for webdav file copy")); + } + } + + # Den Webdav-Ordner ÜBER exakt denselben Mechanismus wie beim + # Anlegen des Ordners bestimmen + my ($webdav_folder, $document_name) = get_webdav_folder($form); + + if (! $webdav_folder){ + $main::lxdebug->leave_sub(); + $main::form->error($main::locale->text("Cannot check correct webdav folder")); + return undef; # s.o. erstmal so ... + } + # kompletter pfad + $complete_path = join('/', $form->{cwd}, $webdav_folder); + opendir my $dh, $complete_path or die "Could not open $complete_path: $!"; + + my ($newest_name, $newest_time); + while ( defined( my $file = readdir( $dh ) ) ) { + my $path = File::Spec->catfile( $complete_path, $file ); + next if -d $path; # skip directories, or anything else you like + ( $newest_name, $newest_time ) = ( $file, -M _ ) + if( ! defined $newest_time or -M $path < $newest_time ); + } + $latest_file_name = $complete_path .'/' . $newest_name; + my $filesize = stat($latest_file_name)->size; + + # prüfung auf identisch oder nicht + my ($ext) = $form->{tmpfile} =~ /(\.[^.]+)$/; + my $current_file = join('/', $form->{tmpdir}, $form->{tmpfile}); + my $current_filesize = stat($current_file)->size; + if ($current_filesize == $filesize) { # bei gleicher größe copy deaktivieren + $main::lxdebug->leave_sub(); + return; + } + # zeitstempel und dateinamen holen + my $timestamp = get_current_formatted_time(); + my $myfilename = $form->generate_attachment_filename(); + # entsprechend vor der endung hinzufügen + $myfilename =~ s/\./$timestamp\./; + + if (!copy(join('/', $form->{tmpdir}, $form->{tmpfile}), join('/', $form->{cwd}, $webdav_folder, $myfilename))) { + my $j = join('/', $form->{tmpdir}, $form->{tmpfile}); + my $k = join('/', $form->{cwd}, $webdav_folder); + $main::lxdebug->message(0, "Copy file from $j to $k failed"); + $main::form->error($main::locale->text("Copy file from #1 to #2 failed", $j, $k)); + } + + $main::lxdebug->leave_sub(); +} +sub get_current_formatted_time { + $main::lxdebug->enter_sub(); + + my ($sec,$min,$hour,$mday,$mon,$year,$wday,$yday,$isdst)=localtime(time); + my $formatted_current_time = sprintf ( "_%04d%02d%02d_%02d%02d%02d", + $year+1900,$mon+1,$mday,$hour,$min,$sec); + + $main::lxdebug->leave_sub(); + return $formatted_current_time; +} + 1; __END__ diff --git a/SL/DB/AuthClient.pm b/SL/DB/AuthClient.pm index 849fc30be..ad225de28 100644 --- a/SL/DB/AuthClient.pm +++ b/SL/DB/AuthClient.pm @@ -45,14 +45,14 @@ sub _before_save_remember_old_name { sub _after_save_ensure_webdav_symlink_correctness { my ($self) = @_; - $self->ensure_webdav_symlink_correctness($self->{__before_save_remember_old_name}) if $self->id && $::lx_office_conf{features}->{webdav}; + $self->ensure_webdav_symlink_correctness($self->{__before_save_remember_old_name}) if $self->id && $::instance_conf->get_webdav; return 1; } sub _after_delete_delete_webdav_symlink { my ($self) = @_; - return 1 if !$::lx_office_conf{features}->{webdav}; + return 1 if !$::instance_conf->get_webdav; my $name = $self->webdav_symlink_basename; unlink "webdav/links/${name}"; return 1; @@ -85,7 +85,7 @@ sub webdav_symlink_basename { sub ensure_webdav_symlink_correctness { my ($self, $old_name) = @_; - return unless $::lx_office_conf{features}->{webdav}; + return unless $::instance_conf->get_webdav; croak "Need object ID" unless $self->id; diff --git a/SL/DB/MetaSetup/Default.pm b/SL/DB/MetaSetup/Default.pm index c11777437..95ced883d 100644 --- a/SL/DB/MetaSetup/Default.pm +++ b/SL/DB/MetaSetup/Default.pm @@ -34,17 +34,17 @@ __PACKAGE__->meta->columns( mtime => { type => 'timestamp' }, rmanumber => { type => 'text' }, cnnumber => { type => 'text' }, + accounting_method => { type => 'text' }, + inventory_system => { type => 'text' }, + profit_determination => { type => 'text' }, dunning_ar_amount_fee => { type => 'integer' }, dunning_ar_amount_interest => { type => 'integer' }, dunning_ar => { type => 'integer' }, pdonumber => { type => 'text' }, sdonumber => { type => 'text' }, - id => { type => 'serial', not_null => 1 }, ar_paid_accno_id => { type => 'integer' }, + id => { type => 'serial', not_null => 1 }, language_id => { type => 'integer' }, - accounting_method => { type => 'text' }, - inventory_system => { type => 'text' }, - profit_determination => { type => 'text' }, datev_check_on_sales_invoice => { type => 'boolean', default => 'true' }, datev_check_on_purchase_invoice => { type => 'boolean', default => 'true' }, datev_check_on_ar_transaction => { type => 'boolean', default => 'true' }, @@ -65,16 +65,17 @@ __PACKAGE__->meta->columns( ir_show_mark_as_paid => { type => 'boolean', default => 'true' }, ar_show_mark_as_paid => { type => 'boolean', default => 'true' }, ap_show_mark_as_paid => { type => 'boolean', default => 'true' }, - assemblynumber => { type => 'text' }, - currency_id => { type => 'integer', not_null => 1 }, warehouse_id => { type => 'integer' }, bin_id => { type => 'integer' }, + max_future_booking_interval => { type => 'integer', default => 360 }, + assemblynumber => { type => 'text' }, show_weight => { type => 'boolean', default => 'false', not_null => 1 }, transfer_default => { type => 'boolean', default => 'true' }, transfer_default_use_master_default_bin => { type => 'boolean', default => 'false' }, transfer_default_ignore_onhand => { type => 'boolean', default => 'false' }, warehouse_id_ignore_onhand => { type => 'integer' }, bin_id_ignore_onhand => { type => 'integer' }, + currency_id => { type => 'integer', not_null => 1 }, company => { type => 'text' }, address => { type => 'text' }, taxnumber => { type => 'text' }, @@ -82,7 +83,12 @@ __PACKAGE__->meta->columns( duns => { type => 'text' }, sepa_creditor_id => { type => 'text' }, templates => { type => 'text' }, - max_future_booking_interval => { type => 'integer', default => 360 }, + webdav => { type => 'boolean', default => 'false' }, + webdav_documents => { type => 'boolean', default => 'false' }, + vertreter => { type => 'boolean', default => 'false' }, + parts_show_image => { type => 'boolean', default => 'true' }, + parts_listing_image => { type => 'boolean', default => 'true' }, + parts_image_css => { type => 'text', default => 'border:0;float:left;max-width:250px;margin-top:20px:margin-right:10px;margin-left:10px;' }, ); __PACKAGE__->meta->primary_key_columns([ 'id' ]); diff --git a/SL/Form.pm b/SL/Form.pm index d7e0cdae9..394142de3 100644 --- a/SL/Form.pm +++ b/SL/Form.pm @@ -614,13 +614,13 @@ sub _prepare_html_template { map { $additional_params->{"myconfig_${_}"} = $main::myconfig{$_}; } keys %::myconfig; } - $additional_params->{"conf_webdav"} = $::lx_office_conf{features}->{webdav}; + $additional_params->{"conf_webdav"} = $::instance_conf->get_webdav; $additional_params->{"conf_latex_templates"} = $::lx_office_conf{print_templates}->{latex}; $additional_params->{"conf_opendocument_templates"} = $::lx_office_conf{print_templates}->{opendocument}; - $additional_params->{"conf_vertreter"} = $::lx_office_conf{features}->{vertreter}; - $additional_params->{"conf_parts_image_css"} = $::lx_office_conf{features}->{parts_image_css}; - $additional_params->{"conf_parts_listing_images"} = $::lx_office_conf{features}->{parts_listing_images}; - $additional_params->{"conf_parts_show_image"} = $::lx_office_conf{features}->{parts_show_image}; + $additional_params->{"conf_vertreter"} = $::instance_conf->get_vertreter; + $additional_params->{"conf_parts_image_css"} = $::instance_conf->get_parts_image_css; + $additional_params->{"conf_parts_listing_images"} = $::instance_conf->get_parts_listing_images; + $additional_params->{"conf_parts_show_image"} = $::instance_conf->get_parts_show_image; $additional_params->{"INSTANCE_CONF"} = $::instance_conf; if (my $debug_options = $::lx_office_conf{debug}{options}) { @@ -1076,7 +1076,8 @@ sub parse_template { $self->cleanup(); $self->error("$self->{IN} : " . $template->get_error()); } - + Common::copy_file_to_webdav_folder($self) if ($::instance_conf->get_webdav + and $::instance_conf->get_webdav_documents and not $self->{preview}); close OUT if $self->{OUT}; if ($self->{media} eq 'file') { diff --git a/SL/InstanceConfiguration.pm b/SL/InstanceConfiguration.pm index d0b6b3a82..f8d818f14 100644 --- a/SL/InstanceConfiguration.pm +++ b/SL/InstanceConfiguration.pm @@ -184,6 +184,35 @@ sub get_max_future_booking_interval { return ($self->{data}->{max_future_booking_interval}); } +sub get_webdav { + my ($self) = @_; + return ($self->{data}->{webdav}); +} + +sub get_webdav_documents { + my ($self) = @_; + return ($self->{data}->{webdav_documents}); +} + +sub get_vertreter { + my ($self) = @_; + return ($self->{data}->{vertreter}); +} + +sub get_parts_show_image { + my ($self) = @_; + return ($self->{data}->{parts_show_image}); +} + +sub get_parts_listing_images{ + my ($self) = @_; + return ($self->{data}->{parts_listing_image}); +} + +sub get_parts_image_css { + my ($self) = @_; + return ($self->{data}->{parts_image_css}); +} 1; @@ -330,6 +359,30 @@ Returns the default behavior for the transfer out default feature (true or false Returns the maximum interval value for future bookings +=item C + +Returns the configuration for webdav + +=item C + +Returns the configuration for storing documents in the corresponding webdav folder + +=item C + +Returns the configuration for "vertreter" + +=item C + +Returns the configuarion for show image in parts + +=item C + +Returns the css format string for images shown in parts + +=item C + +Returns the configuartion for showing the picture in the results when you search for parts + =back =head1 BUGS diff --git a/bin/mozilla/ct.pl b/bin/mozilla/ct.pl index 797ee393e..1ce1c2f8b 100644 --- a/bin/mozilla/ct.pl +++ b/bin/mozilla/ct.pl @@ -174,7 +174,7 @@ sub list_names { my @columns = ( 'id', 'name', "$form->{db}number", 'contact', 'phone', 'fax', 'email', 'taxnumber', 'street', 'zipcode' , 'city', - 'business', 'invnumber', 'ordnumber', 'quonumber', 'salesman', 'country' + 'business', 'invnumber', 'ordnumber', 'quonumber', 'salesman', 'country' ); my @includeable_custom_variables = grep { $_->{includeable} } @{ $cvar_configs }; @@ -465,7 +465,7 @@ sub form_header { currencies => "ALL_CURRENCIES"); $form->get_pricegroup(\%myconfig, { all => 1 }); - $form->get_lists(customers => { key => "ALL_SALESMAN_CUSTOMERS", business_is_salesman => 1 }) if $::lx_office_conf{features}->{vertreter}; + $form->get_lists(customers => { key => "ALL_SALESMAN_CUSTOMERS", business_is_salesman => 1 }) if $::instance_conf->get_vertreter; $form->{ALL_EMPLOYEES} = SL::DB::Manager::Employee->get_all(query => [ or => [ id => $::form->{FU_created_for_user}, deleted => 0 ] ]); $form->{ALL_SALESMEN} = SL::DB::Manager::Employee->get_all(query => [ or => [ id => $::form->{salesman_id}, deleted => 0 ] ]); $form->{USER} = SL::DB::Manager::Employee->current; @@ -536,7 +536,7 @@ sub _do_save { $::form->isblank("name", $::locale->text("Name missing!")); - if ($::form->{new_salesman_id} && $::lx_office_conf{features}->{vertreter}) { + if ($::form->{new_salesman_id} && $::instance_conf->get_vertreter) { $::form->{salesman_id} = $::form->{new_salesman_id}; delete $::form->{new_salesman_id}; } diff --git a/bin/mozilla/do.pl b/bin/mozilla/do.pl index b8b169f97..3e0c7e0fe 100644 --- a/bin/mozilla/do.pl +++ b/bin/mozilla/do.pl @@ -165,7 +165,7 @@ sub order_links { $form->all_vc(\%myconfig, $form->{vc}, ($form->{vc} eq 'customer') ? "AR" : "AP"); # retrieve order/quotation - $form->{webdav} = $::lx_office_conf{features}->{webdav}; + $form->{webdav} = $::instance_conf->get_webdav; $form->{jsscript} = 1; my $editing = $form->{id}; diff --git a/bin/mozilla/ir.pl b/bin/mozilla/ir.pl index b226bb011..3d498856c 100644 --- a/bin/mozilla/ir.pl +++ b/bin/mozilla/ir.pl @@ -101,7 +101,7 @@ sub invoice_links { $form->{vc} = 'vendor'; # create links - $form->{webdav} = $::lx_office_conf{features}->{webdav}; + $form->{webdav} = $::instance_conf->get_webdav; $form->{jsscript} = 1; $form->create_links("AP", \%myconfig, "vendor"); diff --git a/bin/mozilla/is.pl b/bin/mozilla/is.pl index 220c993aa..fe387d14c 100644 --- a/bin/mozilla/is.pl +++ b/bin/mozilla/is.pl @@ -138,7 +138,7 @@ sub invoice_links { $form->{vc} = 'customer'; # create links - $form->{webdav} = $::lx_office_conf{features}->{webdav}; + $form->{webdav} = $::instance_conf->get_webdav; $form->create_links("AR", \%myconfig, "customer"); diff --git a/bin/mozilla/oe.pl b/bin/mozilla/oe.pl index ba4b7b456..8b2b79a19 100644 --- a/bin/mozilla/oe.pl +++ b/bin/mozilla/oe.pl @@ -229,7 +229,7 @@ sub order_links { $form->all_vc(\%myconfig, $form->{vc}, ($form->{vc} eq 'customer') ? "AR" : "AP"); # retrieve order/quotation - $form->{webdav} = $::lx_office_conf{features}->{webdav}; + $form->{webdav} = $::instance_conf->get_webdav; $form->{jsscript} = 1; my $editing = $form->{id}; @@ -528,7 +528,7 @@ sub form_footer { print $form->parse_html_template("oe/form_footer", { %TMPL_VAR, - webdav => $::lx_office_conf{features}->{webdav}, + webdav => $::instance_conf->get_webdav, print_options => print_options(inline => 1), label_edit => $locale->text("Edit the $form->{type}"), label_workflow => $locale->text("Workflow $form->{type}"), diff --git a/config/kivitendo.conf.default b/config/kivitendo.conf.default index c729c6bde..fcc3c49ac 100644 --- a/config/kivitendo.conf.default +++ b/config/kivitendo.conf.default @@ -65,19 +65,6 @@ bind_password = # and "en" (English, not perfect) are available. language = de -[features] -# Activate certain optional features and modules. -webdav = 0 -vertreter = 0 - -## Pictures for parts -# Show the picture in the part form -parts_show_image = 1 -# Style the picture with the following CSS code: -parts_image_css = border:0;float:left;max-width:250px;margin-top:20px:margin-right:10px;margin-left:10px; -# Show the picture in the results when you search for parts -parts_listing_images = 0 - [paths] # path to temporary files (must be writeable by the web server) userspath = users diff --git a/doc/changelog b/doc/changelog index 684aa3972..e5e43e8d5 100644 --- a/doc/changelog +++ b/doc/changelog @@ -57,6 +57,8 @@ Kleinere neue Features und Detailverbesserungen: - #1897 implementiert. Zukunfts-Buchungen verhindern, durch einen konfigurierbaren maximalen Zeitraum in dem in die Zukunft gebucht werden darf (default 360 Tage) +- #2300 Alle Feature-Konfigurationen sind jetzt in der Mandantenkonfiguration eingestellt +- #2301 Dokumentenbelege optional in webdav-Ordner speichern Wichtige Änderungen: diff --git a/locale/de/all b/locale/de/all index 9fd78e1b5..29fe6debf 100755 --- a/locale/de/all +++ b/locale/de/all @@ -352,6 +352,7 @@ $self->{texts} = { 'CRM status' => 'Admin Status', 'CRM termin' => 'Termine', 'CRM user' => 'Admin Benutzer', + 'CSS style for pictures' => 'CSS Style für Bilder', 'CSV export -- options' => 'CSV-Export -- Optionen', 'CSV import: contacts' => 'CSV-Import: Ansprechpersonen', 'CSV import: customers and vendors' => 'CSV-Import: Kunden und Lieferanten', @@ -363,6 +364,7 @@ $self->{texts} = { 'Cancel' => 'Abbrechen', 'Cancel Accounts Payables Transaction' => 'Kreditorenbuchung stornieren', 'Cancel Accounts Receivables Transaction' => 'Debitorenbuchung stornieren', + 'Cannot check correct webdav folder' => 'Kann nicht den richtigen webdav Pfad überprüfen', 'Cannot delete account!' => 'Konto kann nicht gelöscht werden!', 'Cannot delete customer!' => 'Kunde kann nicht gelöscht werden!', 'Cannot delete default account!' => 'Das Standard-Konto kann nicht gelöscht werden!', @@ -474,6 +476,7 @@ $self->{texts} = { 'Contra' => 'gegen', 'Conversion of "birthday" contact person attribute' => 'Umstellung des Kontaktpersonenfeldes "Geburtstag"', 'Copies' => 'Kopien', + 'Copy file from #1 to #2 failed' => 'Datei von #1 nach #2 kopieren fehlgeschlagen', 'Correct taxkey' => 'Richtiger Steuerschlüssel', 'Costs' => 'Kosten', 'Could not load class #1 (#2): "#3"' => 'Konnte Klasse #1 (#2) nicht laden: "#3"', @@ -904,6 +907,7 @@ $self->{texts} = { 'Factor missing!' => 'Der Faktor fehlt.', 'Falsches Datumsformat!' => 'Falsches Datumsformat!', 'Fax' => 'Fax', + 'Features' => 'Features', 'Feb' => 'Feb', 'February' => 'Februar', 'Fee' => 'Gebühr', @@ -1246,6 +1250,7 @@ $self->{texts} = { 'Missing amount' => 'Fehlbetrag', 'Missing parameter #1 in call to sub #2.' => 'Fehlender Parameter \'#1\' in Funktionsaufruf \'#2\'.', 'Missing parameter (at least one of #1) in call to sub #2.' => 'Fehlernder Parameter (mindestens einer aus \'#1\') in Funktionsaufruf \'#2\'.', + 'Missing parameter for webdav file copy' => 'Fehlender Parameter für webdav Datei kopieren', 'Missing taxkeys in invoices with taxes.' => 'Fehlende Steuerschlüssel in Rechnungen mit Steuern', 'Mitarbeiter' => 'Mitarbeiter', 'Mixed (requires column "type")' => 'Gemischt (erfordert Spalte "type")', @@ -1468,6 +1473,8 @@ $self->{texts} = { 'Phone1' => 'Telefon 1 ', 'Phone2' => 'Telefon 2', 'Pick List' => 'Sammelliste', + 'Pictures for parts' => 'Bilder für Waren', + 'Pictures for search parts' => 'Bilder für Warensuche', 'Please Check the bank information for each customer:' => 'Bitte überprüfen Sie die Bankinformationen der Kunden:', 'Please Check the bank information for each vendor:' => 'Bitte überprüfen Sie die Kontoinformationen der Lieferanten:', 'Please ask your administrator to create warehouses and bins.' => 'Bitten Sie Ihren Administrator, dass er Lager und Lagerplätze anlegt.', @@ -1646,6 +1653,7 @@ $self->{texts} = { 'Report for' => 'Bericht für', 'Reports' => 'Berichte', 'Representative' => 'Vertreter', + 'Representative for Customer' => 'Vertreter für Kunden', 'Reqdate' => 'Liefertermin', 'Request Quotations' => 'Preisanfragen', 'Request for Quotation' => 'Anfrage', @@ -1720,6 +1728,7 @@ $self->{texts} = { 'Save and close' => 'Speichern und schließen', 'Save and execute' => 'Speichern und ausführen', 'Save as new' => 'als neu speichern', + 'Save document in webdav repository' => 'Dokument in webdav-Ablage speichern', 'Save draft' => 'Entwurf speichern', 'Save profile' => 'Profil speichern', 'Save settings as' => 'Einstellungen speichern unter', @@ -1820,6 +1829,8 @@ $self->{texts} = { 'Show overdue sales quotations and requests for quotations...' => 'Überfällige Angebote und Preisanfragen anzeigen...', 'Show parts' => 'Artikel anzeigen', 'Show settings' => 'Einstellungen anzeigen', + 'Show the picture in the part form' => 'Bild in Warenmaske anzeigen', + 'Show the pictures in the result for search parts' => 'Bilder in Suchergebnis für Stammdaten -> Berichte -> Waren anzeigen', 'Show the weights of articles and the total weight in orders, invoices and delivery notes?' => 'Sollen Warengewichte und Gesamtgewicht in Aufträgen, Rechnungen und Lieferscheinen angezeigt werden?', 'Show weights' => 'Gewichte anzeigen', 'Show your TODO list after loggin in' => 'Aufgabenliste nach dem Anmelden anzeigen', @@ -1870,6 +1881,7 @@ $self->{texts} = { 'Storno (one letter abbreviation)' => 'S', 'Storno Invoice' => 'Stornorechnung', 'Street' => 'Straße', + 'Style the picture with the following CSS code' => 'Bildeigenschaft mit folgendem CSS-Style versehen', 'Stylesheet' => 'Stilvorlage', 'Subject' => 'Betreff', 'Subject:' => 'Betreff:', @@ -2288,6 +2300,7 @@ $self->{texts} = { 'Updating the client fields in the database "#1" on host "#2:#3" failed.' => 'Die Aktualisierung der Mandantenfelder in der Datenbank "#1" auf Host "#2:#3" schlug fehl.', 'Uploaded on #1, size #2 kB' => 'Am #1 hochgeladen, Größe #2 kB', 'Use As New' => 'Als neu verwenden', + 'Use Webdav Repository' => 'Webdav-Ablage verwenden', 'Use existing templates' => 'Vorhandene Druckvorlagen verwenden', 'Use master default bin for Default Transfer, if no default bin for the part is configured' => 'Standardlagerplatz für Ein- / Auslagern über Standard-Lagerplatz, falls für die Ware kein expliziter Lagerplatz konfiguriert ist', 'User' => 'Benutzer', @@ -2328,6 +2341,7 @@ $self->{texts} = { 'Vendors' => 'Lieferanten', 'Verrechnungseinheit' => 'Verrechnungseinheit', 'Version' => 'Version', + 'Vertreter' => 'Vertreter', 'View SEPA export' => 'SEPA-Export-Details ansehen', 'View background job execution result' => 'Verlauf der Hintergrund-Job-Ausführungen anzeigen', 'View background job history' => 'Hintergrund-Job-Verlauf anzeigen', @@ -2348,6 +2362,8 @@ $self->{texts} = { 'Warning' => 'Warnung', 'WebDAV' => 'WebDAV', 'WebDAV link' => 'WebDAV-Link', + 'Webdav' => 'Webdav', + 'Webdav save documents' => 'Belege in Webdav-Ablage speichern', 'Webserver interface' => 'Webserverschnittstelle', 'Weight' => 'Gewicht', 'Weight unit' => 'Gewichtseinheit', diff --git a/sql/Pg-upgrade2/defaults_feature.pl b/sql/Pg-upgrade2/defaults_feature.pl index c46ff3ac3..2e1398213 100644 --- a/sql/Pg-upgrade2/defaults_feature.pl +++ b/sql/Pg-upgrade2/defaults_feature.pl @@ -21,10 +21,10 @@ sub run { # check current configuration and set default variables accordingly, so that # kivitendo's behaviour isn't changed by this update - # if checks are not set in config set it to true + # if checks are not set in config leave it to the default value foreach my $check (qw(webdav vertreter parts_show_image parts_listing_image)) { my $check_set = $::lx_office_conf{features}->{$check} ? 1 : 0; - $self->db_query("UPDATE defaults SET $check = ?", bind => [ $check_set ]); + $self->db_query("UPDATE defaults SET $check = ?", bind => [ $check_set ]) if $check_set; } my $update_column = "UPDATE defaults SET parts_image_css = ?"; diff --git a/templates/webpages/client_config/form.html b/templates/webpages/client_config/form.html index 5a2a9ba26..58d2789a0 100644 --- a/templates/webpages/client_config/form.html +++ b/templates/webpages/client_config/form.html @@ -62,6 +62,7 @@ $(function() {
  • [% LxERP.t8('DATEV check configuration') %]
  • [% LxERP.t8('Orders / Delivery Orders deleteable') %]
  • [% LxERP.t8('Warehouse') %]
  • +
  • [% LxERP.t8('Features') %]
  • [% PROCESS 'client_config/_ranges_of_numbers.html' %] @@ -70,6 +71,7 @@ $(function() { [% PROCESS 'client_config/_datev_check_configuration.html' %] [% PROCESS 'client_config/_orders_deleteable.html' %] [% PROCESS 'client_config/_warehouse.html' %] +[% PROCESS 'client_config/_features.html' %] [% PROCESS 'client_config/_miscellaneous.html' %]
    -- 2.20.1