Revision 1465da30
Von Sven Schöling vor fast 15 Jahren hinzugefügt
SL/OE.pm | ||
---|---|---|
1307 | 1307 |
return $value; |
1308 | 1308 |
} |
1309 | 1309 |
|
1310 |
########################## |
|
1311 |
# Get data for the submitted order id |
|
1312 |
# from database |
|
1313 |
# |
|
1314 |
sub get_order_data_by_ordnumber { |
|
1315 |
$main::lxdebug->enter_sub(); |
|
1316 |
|
|
1317 |
my $self = shift; |
|
1318 |
my %params = @_; |
|
1319 |
|
|
1320 |
Common::check_params(\%params, qw(ordnumber)); |
|
1321 |
|
|
1322 |
my $form = $main::form; |
|
1323 |
my %myconfig = %main::myconfig; |
|
1324 |
my $dbh = $form->get_standard_dbh(); |
|
1325 |
|
|
1326 |
my @values = ($params{ordnumber}); |
|
1327 |
|
|
1328 |
# We query the database for the fields we need using the submitted "ordnumber" |
|
1329 |
my $query = <<SQL; |
|
1330 |
SELECT o.payment_id, o.salesman_id, o.transdate AS orddate, o.taxzone_id, o.quonumber |
|
1331 |
FROM oe o |
|
1332 |
WHERE o.ordnumber = ?; |
|
1333 |
SQL |
|
1334 |
|
|
1335 |
# Do the actual query and return the results for later processing by our "frontend" |
|
1336 |
my $result = selectfirst_hashref_query($form, $dbh, $query, @values); |
|
1337 |
|
|
1338 |
$main::lxdebug->leave_sub(); |
|
1339 |
|
|
1340 |
return $result; |
|
1341 |
} |
|
1342 |
|
|
1310 | 1343 |
1; |
Auch abrufbar als: Unified diff
Änderungen zum vorherigen Commit, um die Funktionen rouster zu machen.