X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/mfinanz.git/blobdiff_plain/fb4d2ffa6aae03b36e4db77be10c3d9dce4413f8..ad70fca34bfc6104c1c6e086eebe8d65d9d65637:/SL/Common.pm diff --git a/SL/Common.pm b/SL/Common.pm index 4cd1d35ed..9c83c7d17 100644 --- a/SL/Common.pm +++ b/SL/Common.pm @@ -280,6 +280,8 @@ sub webdav_folder { return $main::lxdebug->leave_sub() unless ($path && $number); + $number =~ s|[/\\]|_|g; + $path = "webdav/${path}/${number}"; if (!-d $path) { @@ -348,4 +350,23 @@ sub get_vc_details { return 1; } +sub get_shipto_by_id { + $main::lxdebug->enter_sub(); + + my ($self, $myconfig, $form, $shipto_id, $prefix) = @_; + + $prefix ||= ""; + + my $dbh = $form->dbconnect($myconfig); + + my $query = qq|SELECT * FROM shipto WHERE shipto_id = ?|; + my $ref = selectfirst_hashref_query($form, $dbh, $query, $shipto_id); + + map { $form->{"${prefix}${_}"} = $ref->{$_} } keys %{ $ref } if $ref; + + $dbh->disconnect(); + + $main::lxdebug->leave_sub(); +} + 1;