]> wagnertech.de Git - kivitendo-erp.git/commitdiff
Merge branch 'master' of ssh://git-mbunkus@lx-office.linet-services.de/~/lx-office-erp
authorMoritz Bunkus <m.bunkus@linet-services.de>
Wed, 3 Mar 2010 16:11:55 +0000 (17:11 +0100)
committerMoritz Bunkus <m.bunkus@linet-services.de>
Wed, 3 Mar 2010 16:11:55 +0000 (17:11 +0100)
1  2 
SL/Form.pm

diff --combined SL/Form.pm
index 7e5a443fec4a28815bae06b1863303b1195e5526,f32802ca0dee059702f3551af22e9cbb1c4f9997..e0207243ff409bce4610b60d60f16b8a02327d4f
@@@ -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;