projects
/
kivitendo-erp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Merge branch 'master' of ssh://lx-office/~/lx-office-erp
[kivitendo-erp.git]
/
SL
/
Common.pm
diff --git
a/SL/Common.pm
b/SL/Common.pm
index
b710125
..
bdc4c5d
100644
(file)
--- a/
SL/Common.pm
+++ b/
SL/Common.pm
@@
-51,7
+51,7
@@
sub retrieve_parts {
my (@filter_values, $filter);
my (@filter_values, $filter);
- foreach (qw(partnumber description)) {
+ foreach (qw(partnumber description
ean
)) {
next unless $form->{$_};
$filter .= qq| AND ($_ ILIKE ?)|;
next unless $form->{$_};
$filter .= qq| AND ($_ ILIKE ?)|;
@@
-59,11
+59,14
@@
sub retrieve_parts {
}
if ($form->{no_assemblies}) {
}
if ($form->{no_assemblies}) {
- $filter .= qq| AND (NOT COALESCE(assembly, 'f'))|;
+ $filter .= qq| AND (NOT COALESCE(assembly, FALSE))|;
+ }
+ if ($form->{assemblies}) {
+ $filter .= qq| AND assembly=TRUE|;
}
if ($form->{no_services}) {
}
if ($form->{no_services}) {
- $filter .= qq| AND (
COALESCE(inventory_accno_id, 0) > 0)|;
+ $filter .= qq| AND (
inventory_accno_id is not NULL or assembly=TRUE)|; # @mb hier nochmal optimieren ... nach kurzer ruecksprache alles i.o.
}
substr($filter, 1, 3) = "WHERE" if ($filter);
}
substr($filter, 1, 3) = "WHERE" if ($filter);
@@
-72,7
+75,7
@@
sub retrieve_parts {
$order_dir = $order_dir ? "ASC" : "DESC";
my $query =
$order_dir = $order_dir ? "ASC" : "DESC";
my $query =
- qq|SELECT id, partnumber, description | .
+ qq|SELECT id, partnumber, description
, ean
| .
qq|FROM parts $filter | .
qq|ORDER BY $order_by $order_dir|;
my $sth = $dbh->prepare($query);
qq|FROM parts $filter | .
qq|ORDER BY $order_by $order_dir|;
my $sth = $dbh->prepare($query);
@@
-191,7
+194,7
@@
sub retrieve_customers_or_vendors {
push(@queries, qq|SELECT
c.id, c.name, 0 AS customer_is_vendor,
c.street, c.zipcode, c.city,
push(@queries, qq|SELECT
c.id, c.name, 0 AS customer_is_vendor,
c.street, c.zipcode, c.city,
- ct.cp_g
reeting
, ct.cp_title, ct.cp_givenname, ct.cp_name
+ ct.cp_g
ender
, ct.cp_title, ct.cp_givenname, ct.cp_name
FROM customer c
LEFT JOIN contacts ct ON (c.id = ct.cp_cv_id)
$c_filter|);
FROM customer c
LEFT JOIN contacts ct ON (c.id = ct.cp_cv_id)
$c_filter|);
@@
-204,7
+207,7
@@
sub retrieve_customers_or_vendors {
push(@queries, qq|SELECT
v.id, v.name, 1 AS customer_is_vendor,
v.street, v.zipcode, v.city,
push(@queries, qq|SELECT
v.id, v.name, 1 AS customer_is_vendor,
v.street, v.zipcode, v.city,
- ct.cp_g
reeting
, ct.cp_title, ct.cp_givenname, ct.cp_name
+ ct.cp_g
ender
, ct.cp_title, ct.cp_givenname, ct.cp_name
FROM vendor v
LEFT JOIN contacts ct ON (v.id = ct.cp_cv_id)
$v_filter|);
FROM vendor v
LEFT JOIN contacts ct ON (v.id = ct.cp_cv_id)
$v_filter|);
@@
-363,8
+366,8
@@
sub webdav_folder {
my $base_path = substr($ENV{'SCRIPT_NAME'}, 1);
$base_path =~ s|[^/]+$||;
$base_path =~ s|/$||;
my $base_path = substr($ENV{'SCRIPT_NAME'}, 1);
$base_path =~ s|[^/]+$||;
$base_path =~ s|/$||;
-
- if (opendir $dir, $path) {
+ # 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 '..'));
foreach my $file (sort { lc $a cmp lc $b } readdir $dir) {
next if (($file eq '.') || ($file eq '..'));
@@
-517,7
+520,7
@@
sub check_params {
} elsif (ref $key eq 'ARRAY') {
my $found = 0;
} elsif (ref $key eq 'ARRAY') {
my $found = 0;
- foreach $subkey (@{ $key }) {
+ foreach
my
$subkey (@{ $key }) {
if (defined $params->{$subkey}) {
$found = 1;
last;
if (defined $params->{$subkey}) {
$found = 1;
last;
@@
-542,7
+545,7
@@
sub check_params_x {
} elsif (ref $key eq 'ARRAY') {
my $found = 0;
} elsif (ref $key eq 'ARRAY') {
my $found = 0;
- foreach $subkey (@{ $key }) {
+ foreach
my
$subkey (@{ $key }) {
if (exists $params->{$subkey}) {
$found = 1;
last;
if (exists $params->{$subkey}) {
$found = 1;
last;