Revision 1465da30
Von Sven Schöling vor fast 15 Jahren hinzugefügt
SL/IS.pm | ||
---|---|---|
1954 | 1954 |
$main::lxdebug->leave_sub(); |
1955 | 1955 |
} |
1956 | 1956 |
|
1957 |
########################## |
|
1958 |
# Get data for the submitted order id |
|
1959 |
# from database |
|
1960 |
# |
|
1961 |
sub get_order_data { |
|
1962 |
|
|
1963 |
$main::lxdebug->enter_sub(); |
|
1964 |
|
|
1965 |
my $self = shift; |
|
1966 |
my $form = $main::form; |
|
1967 |
my %myconfig = %main::myconfig; |
|
1968 |
my $dbh = $form->get_standard_dbh(); |
|
1969 |
|
|
1970 |
my @values = (conv_i($form->{ordnumber})); |
|
1971 |
|
|
1972 |
# We query the database for the fields we need using the submitted "ordnumber" |
|
1973 |
my $query = <<SQL; |
|
1974 |
SELECT o.payment_id, o.salesman_id, o.transdate AS orddate, o.taxzone_id, o.quonumber |
|
1975 |
FROM oe o |
|
1976 |
WHERE o.ordnumber = ?; |
|
1977 |
SQL |
|
1978 |
|
|
1979 |
# Do the actual query and return the results for later processing by our "frontend" |
|
1980 |
my ($result) = selectfirst_hashref_query($form, $dbh, $query, @values); |
|
1981 |
|
|
1982 |
$dbh->disconnect; |
|
1983 |
|
|
1984 |
$main::lxdebug->leave_sub(); |
|
1985 |
|
|
1986 |
return $result; |
|
1987 |
} |
|
1988 |
|
|
1989 | 1957 |
########################## |
1990 | 1958 |
# get pricegroups from database |
1991 | 1959 |
# build up selected pricegroup |
Auch abrufbar als: Unified diff
Änderungen zum vorherigen Commit, um die Funktionen rouster zu machen.