use utf8;
use strict;
+use Carp;
use Time::HiRes qw(gettimeofday);
use Data::Dumper;
}
if ($form->{no_services}) {
- $filter .= qq| AND (inventory_accno_id is not NULL or assembly=TRUE)|; # @mb hier nochmal optimieren ... nach kurzer ruecksprache alles i.o.
+ $filter .= qq| AND (inventory_accno_id is not NULL or assembly=TRUE)|;
}
substr($filter, 1, 3) = "WHERE" if ($filter);
$order_dir = $order_dir ? "ASC" : "DESC";
my $query =
- qq|SELECT id, partnumber, description, ean | .
+ qq|SELECT id, partnumber, description, ean, | .
+ qq| warehouse_id, bin_id | .
qq|FROM parts $filter | .
qq|ORDER BY $order_by $order_dir|;
my $sth = $dbh->prepare($query);
return $main::lxdebug->leave_sub()
unless ($::lx_office_conf{features}->{webdav} && $form->{id});
+ croak "No client set in \$::auth" unless $::auth->client;
+
my ($path, $number);
$form->{WEBDAV} = [];
$number =~ s|[/\\]|_|g;
- $path = "webdav/${path}/${number}";
+ $path = "webdav/" . $::auth->client->{id} . "/${path}/${number}";
if (!-d $path) {
mkdir_with_parents($path);
} else {
my $base_path = $ENV{'SCRIPT_NAME'};
$base_path =~ s|[^/]+$||;
- # wo kommt der wert für dir her? es wird doch gar nichts übergeben? fix für strict my $dir jb 21.2.
if (opendir my $dir, $path) {
foreach my $file (sort { lc $a cmp lc $b } readdir $dir) {
next if (($file eq '.') || ($file eq '..'));
} elsif ($form->{script} eq 'ir.pl') {
$table = 'ap';
+ } elsif ($form->{script} eq 'do.pl') {
+ $table = 'delivery_orders';
}
return $main::lxdebug->leave_sub() if (!$form->{id} || !$table || !$form->{formname});