From: Moritz Bunkus Date: Wed, 3 Mar 2010 16:11:55 +0000 (+0100) Subject: Merge branch 'master' of ssh://git-mbunkus@lx-office.linet-services.de/~/lx-office-erp X-Git-Tag: release-2.6.1beta1~38^2~3 X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/commitdiff_plain/2b7ababfda8164a78a45e80fc2ec74672e6628d4?ds=inline;hp=-c Merge branch 'master' of ssh://git-mbunkus@lx-office.linet-services.de/~/lx-office-erp --- 2b7ababfda8164a78a45e80fc2ec74672e6628d4 diff --combined SL/Form.pm index 7e5a443fe,f32802ca0..e0207243f --- a/SL/Form.pm +++ b/SL/Form.pm @@@ -765,7 -765,6 +765,7 @@@ sub _prepare_html_template $additional_params->{"conf_lizenzen"} = $main::lizenzen; $additional_params->{"conf_latex_templates"} = $main::latex; $additional_params->{"conf_opendocument_templates"} = $main::opendocument_templates; + $additional_params->{"conf_vertreter"} = $main::vertreter; if (%main::debug_options) { map { $additional_params->{'DEBUG_' . uc($_)} = $main::debug_options{$_} } keys %main::debug_options; @@@ -2221,15 -2220,9 +2221,15 @@@ sub _get_business_types my ($self, $dbh, $key) = @_; - $key = "all_business_types" unless ($key); - $self->{$key} = - selectall_hashref_query($self, $dbh, qq|SELECT * FROM business|); + my $options = ref $key eq 'HASH' ? $key : { key => $key }; + $options->{key} ||= "all_business_types"; + my $where = ''; + + if (exists $options->{salesman}) { + $where = 'WHERE ' . ($options->{salesman} ? '' : 'NOT ') . 'COALESCE(salesman)'; + } + + $self->{ $options->{key} } = selectall_hashref_query($self, $dbh, qq|SELECT * FROM business $where ORDER BY lower(description)|); $main::lxdebug->leave_sub(); } @@@ -2973,7 -2966,9 +2973,9 @@@ sub lastname_used sub current_date { $main::lxdebug->enter_sub(); - my ($self, $myconfig, $thisdate, $days) = @_; + my $self = shift; + my $myconfig = shift || \%::myconfig; + my ($thisdate, $days) = @_; my $dbh = $self->get_standard_dbh($myconfig); my $query;