X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/b49779f0e34edf56c8f1f22e5a68ba24452da400..a5d5620d468d74e593ee31ece1d7dc3612d14faa:/SL/Form.pm diff --git a/SL/Form.pm b/SL/Form.pm index cbc4df1b7..9ba3f43bc 100644 --- a/SL/Form.pm +++ b/SL/Form.pm @@ -1588,6 +1588,34 @@ sub _get_dunning_configs { $main::lxdebug->leave_sub(); } +sub _get_currencies { +$main::lxdebug->enter_sub(); + + my ($self, $dbh, $key) = @_; + + $key = "all_currencies" unless ($key); + + my $query = qq|SELECT curr AS currency FROM defaults|; + + $self->{$key} = [split(/\:/ , selectfirst_hashref_query($self, $dbh, $query)->{currency})]; + + $main::lxdebug->leave_sub(); +} + +sub _get_customers { + $main::lxdebug->enter_sub(); + + my ($self, $dbh, $key) = @_; + + $key = "all_customers" unless ($key); + + my $query = qq|SELECT * FROM customer LIMIT $main::myconfig{vclimit}|; + + $self->{$key} = selectall_hashref_query($self, $dbh, $query); + + $main::lxdebug->leave_sub(); +} + sub get_lists { $main::lxdebug->enter_sub(); @@ -1645,6 +1673,14 @@ sub get_lists { if ($params{"dunning_configs"}) { $self->_get_dunning_configs($dbh, $params{"dunning_configs"}); } + + if($params{"currencies"}) { + $self->_get_currencies($dbh, $params{"currencies"}); + } + + if($params{"customers"}) { + $self->_get_customers($dbh, $params{"customers"}); + } $dbh->disconnect();