Revision 56ed6467
Von Moritz Bunkus vor mehr als 16 Jahren hinzugefügt
SL/Form.pm | ||
---|---|---|
1897 | 1897 |
|
1898 | 1898 |
$key = "all_contacts" unless ($key); |
1899 | 1899 |
|
1900 |
if (!$id) { |
|
1901 |
$self->{$key} = []; |
|
1902 |
$main::lxdebug->leave_sub(); |
|
1903 |
return; |
|
1904 |
} |
|
1905 |
|
|
1900 | 1906 |
my $query = |
1901 | 1907 |
qq|SELECT cp_id, cp_cv_id, cp_name, cp_givenname, cp_abteilung | . |
1902 | 1908 |
qq|FROM contacts | . |
... | ... | |
1965 | 1971 |
|
1966 | 1972 |
$key = "all_shipto" unless ($key); |
1967 | 1973 |
|
1968 |
# get shipping addresses |
|
1969 |
my $query = qq|SELECT * FROM shipto WHERE trans_id = ?|; |
|
1974 |
if ($vc_id) { |
|
1975 |
# get shipping addresses |
|
1976 |
my $query = qq|SELECT * FROM shipto WHERE trans_id = ?|; |
|
1970 | 1977 |
|
1971 |
$self->{$key} = selectall_hashref_query($self, $dbh, $query, $vc_id); |
|
1978 |
$self->{$key} = selectall_hashref_query($self, $dbh, $query, $vc_id); |
|
1979 |
|
|
1980 |
} else { |
|
1981 |
$self->{$key} = []; |
|
1982 |
} |
|
1972 | 1983 |
|
1973 | 1984 |
$main::lxdebug->leave_sub(); |
1974 | 1985 |
} |
Auch abrufbar als: Unified diff
Vermeiden, dass SQL-Fehlermeldungen angezeigt werden, wenn noch kein Kunde/Lieferant ausgewählt wurden.