From: Sven Schöling Date: Wed, 29 Dec 2010 11:55:35 +0000 (+0100) Subject: Merge branch 'master' of ssh://lx-office/~/lx-office-erp X-Git-Tag: release-2.6.2beta1~48 X-Git-Url: http://wagnertech.de/git?a=commitdiff_plain;h=d5c0d18a11c012e287f99d74365f42758f7e6b3b;hp=eeff78958a0c9215921fddd86b94bdf15273bf81;p=kivitendo-erp.git Merge branch 'master' of ssh://lx-office/~/lx-office-erp --- diff --git a/SL/Auth.pm b/SL/Auth.pm index eb5a7805a..6bb7bfaa7 100644 --- a/SL/Auth.pm +++ b/SL/Auth.pm @@ -126,7 +126,9 @@ sub authenticate_root { $main::lxdebug->leave_sub(); - return $password eq $admin_password ? OK : ERR_PASSWORD; + return OK if $password eq $admin_password; + sleep 5; + return ERR_PASSWORD; } sub authenticate { @@ -136,7 +138,10 @@ sub authenticate { $main::lxdebug->leave_sub(); - return $self->{authenticator}->authenticate(@_); + my $result = $self->{authenticator}->authenticate(@_); + return OK if $result eq OK; + sleep 5; + return $result; } sub dbconnect { diff --git a/SL/OE.pm b/SL/OE.pm index b9aba5c03..63fcf1f06 100644 --- a/SL/OE.pm +++ b/SL/OE.pm @@ -1285,39 +1285,6 @@ sub project_description { return $value; } -########################## -# Get data for the submitted order id -# from database -# -sub get_order_data_by_ordnumber { - $main::lxdebug->enter_sub(); - - my $self = shift; - my %params = @_; - - Common::check_params(\%params, qw(ordnumber)); - - my $form = $main::form; - my %myconfig = %main::myconfig; - my $dbh = $form->get_standard_dbh(); - - my @values = ($params{ordnumber}); - - # We query the database for the fields we need using the submitted "ordnumber" - my $query = <leave_sub(); - - return $result; -} - 1; __END__ diff --git a/bin/mozilla/io.pl b/bin/mozilla/io.pl index b50fe4e14..6377fa6d9 100644 --- a/bin/mozilla/io.pl +++ b/bin/mozilla/io.pl @@ -1040,9 +1040,9 @@ sub edit_e_mail { $form->{email} = $form->{shiptoemail} if $form->{shiptoemail} && $form->{formname} =~ /(pick|packing|bin)_list/; - if ($form->{"cp_id"} && !$form->{"email"}) { + if ($form->{"cp_id"}) { CT->get_contact(\%myconfig, $form); - $form->{"email"} = $form->{"cp_email"}; + $form->{"email"} = $form->{"cp_email"} if $form->{"cp_email"}; } my $title = $locale->text('E-mail') . " " . $form->get_formname_translation(); diff --git a/bin/mozilla/is.pl b/bin/mozilla/is.pl index b5e0927fe..7ac9f4d49 100644 --- a/bin/mozilla/is.pl +++ b/bin/mozilla/is.pl @@ -155,14 +155,6 @@ sub invoice_links { $ref->{name} = $form->quote($ref->{name}); } - # Load data for a specific order and update form fields - my $order_data = OE->get_order_data_by_ordnumber(%$form) if $form->{ordnumber}; - - # Copy the fields we need to %form - for my $key (qw(payment_id salesman_id orddate taxzone_id quonumber)) { - $form->{$key} = $order_data->{$key}; - } - $form->restore_vars(qw(id)); IS->retrieve_invoice(\%myconfig, \%$form); diff --git a/doc/dokumentenvorlagen-und-variablen.html b/doc/dokumentenvorlagen-und-variablen.html index be7dd2001..77feeb3c9 100644 --- a/doc/dokumentenvorlagen-und-variablen.html +++ b/doc/dokumentenvorlagen-und-variablen.html @@ -477,6 +477,10 @@ td { taxnumber Steuernummer + ustid + Usatzsteuer-Identifikationsnummer + + vendoremail Email des Lieferanten; nur für Lieferanten diff --git a/modules/fallback/parent.pm b/modules/fallback/parent.pm new file mode 100644 index 000000000..435ff2554 --- /dev/null +++ b/modules/fallback/parent.pm @@ -0,0 +1,136 @@ +package parent; +use strict; +use vars qw($VERSION); +$VERSION = '0.221'; + +sub import { + my $class = shift; + + my $inheritor = caller(0); + + if ( @_ and $_[0] eq '-norequire' ) { + shift @_; + } else { + for ( my @filename = @_ ) { + if ( $_ eq $inheritor ) { + warn "Class '$inheritor' tried to inherit from itself\n"; + }; + + s{::|'}{/}g; + require "$_.pm"; # dies if the file is not found + } + } + + { + no strict 'refs'; + # This is more efficient than push for the new MRO + # at least until the new MRO is fixed + @{"$inheritor\::ISA"} = (@{"$inheritor\::ISA"} , @_); + }; +}; + +"All your base are belong to us" + +__END__ + +=head1 NAME + +parent - Establish an ISA relationship with base classes at compile time + +=head1 SYNOPSIS + + package Baz; + use parent qw(Foo Bar); + +=head1 DESCRIPTION + +Allows you to both load one or more modules, while setting up inheritance from +those modules at the same time. Mostly similar in effect to + + package Baz; + BEGIN { + require Foo; + require Bar; + push @ISA, qw(Foo Bar); + } + +By default, every base class needs to live in a file of its own. +If you want to have a subclass and its parent class in the same file, you +can tell C not to load any modules by using the C<-norequire> switch: + + package Foo; + sub exclaim { "I CAN HAS PERL" } + + package DoesNotLoadFooBar; + use parent -norequire, 'Foo', 'Bar'; + # will not go looking for Foo.pm or Bar.pm + +This is equivalent to the following code: + + package Foo; + sub exclaim { "I CAN HAS PERL" } + + package DoesNotLoadFooBar; + push @DoesNotLoadFooBar::ISA, 'Foo'; + +This is also helpful for the case where a package lives within +a differently named file: + + package MyHash; + use Tie::Hash; + use parent -norequire, 'Tie::StdHash'; + +This is equivalent to the following code: + + package MyHash; + require Tie::Hash; + push @ISA, 'Tie::StdHash'; + +If you want to load a subclass from a file that C would +not consider an eligible filename (that is, it does not end in +either C<.pm> or C<.pmc>), use the following code: + + package MySecondPlugin; + require './plugins/custom.plugin'; # contains Plugin::Custom + use parent -norequire, 'Plugin::Custom'; + +=head1 DIAGNOSTICS + +=over 4 + +=item Class 'Foo' tried to inherit from itself + +Attempting to inherit from yourself generates a warning. + + use Foo; + use parent 'Foo'; + +=back + +=head1 HISTORY + +This module was forked from L to remove the cruft +that had accumulated in it. + +=head1 CAVEATS + +=head1 SEE ALSO + +L + +=head1 AUTHORS AND CONTRIBUTORS + +Rafaël Garcia-Suarez, Bart Lateur, Max Maischein, Anno Siegel, Michael Schwern + +=head1 MAINTAINER + +Max Maischein C< corion@cpan.org > + +Copyright (c) 2007 Max Maischein C<< >> +Based on the idea of C, which was introduced with Perl 5.004_04. + +=head1 LICENSE + +This module is released under the same terms as Perl itself. + +=cut