Revision 3d967be3
Von Sven Schöling vor etwa 15 Jahren hinzugefügt
SL/PE.pm | ||
---|---|---|
38 | 38 |
|
39 | 39 |
use SL::DBUtils; |
40 | 40 |
|
41 |
use strict; |
|
42 |
|
|
41 | 43 |
sub partsgroups { |
42 | 44 |
$main::lxdebug->enter_sub(); |
43 | 45 |
|
... | ... | |
90 | 92 |
$form->{discount} /= 100; |
91 | 93 |
|
92 | 94 |
my @values = ($form->{partsgroup}); |
95 |
my $query; |
|
93 | 96 |
|
94 | 97 |
if ($form->{id}) { |
95 | 98 |
$query = qq|UPDATE partsgroup SET partsgroup = ? WHERE id = ?|; |
... | ... | |
119 | 122 |
qq|WHERE pg.id = ?|; |
120 | 123 |
my $sth = prepare_execute_query($form, $dbh, $query, $form->{id}, |
121 | 124 |
$form->{id}); |
122 |
my $ref = $sth->fetchrow_hashref(NAME_lc);
|
|
125 |
my $ref = $sth->fetchrow_hashref("NAME_lc");
|
|
123 | 126 |
|
124 | 127 |
map({ $form->{$_} = $ref->{$_} } keys(%{$ref})); |
125 | 128 |
$sth->finish; |
... | ... | |
139 | 142 |
|
140 | 143 |
my $table = $form->{type} eq "pricegroup" ? "pricegroup" : "partsgroup"; |
141 | 144 |
|
142 |
$query = qq|DELETE FROM $table WHERE id = ?|; |
|
145 |
my $query = qq|DELETE FROM $table WHERE id = ?|;
|
|
143 | 146 |
do_query($form, $dbh, $query, $form->{id}); |
144 | 147 |
|
145 | 148 |
$dbh->disconnect; |
... | ... | |
240 | 243 |
|
241 | 244 |
my $query = qq|SELECT id, pricegroup FROM pricegroup WHERE id = ?|; |
242 | 245 |
my $sth = prepare_execute_query($form, $dbh, $query, $form->{id}); |
243 |
my $ref = $sth->fetchrow_hashref(NAME_lc);
|
|
246 |
my $ref = $sth->fetchrow_hashref("NAME_lc");
|
|
244 | 247 |
|
245 | 248 |
map({ $form->{$_} = $ref->{$_} } keys(%{$ref})); |
246 | 249 |
|
Auch abrufbar als: Unified diff
weitere stricts