Revision f83b4aff
Von Moritz Bunkus vor etwa 18 Jahren hinzugefügt
SL/IR.pm | ||
---|---|---|
1222 | 1222 |
sub vendor_details { |
1223 | 1223 |
$main::lxdebug->enter_sub(); |
1224 | 1224 |
|
1225 |
my ($self, $myconfig, $form) = @_; |
|
1225 |
my ($self, $myconfig, $form, @wanted_vars) = @_;
|
|
1226 | 1226 |
|
1227 | 1227 |
# connect to database |
1228 | 1228 |
my $dbh = $form->dbconnect($myconfig); |
... | ... | |
1249 | 1249 |
|
1250 | 1250 |
# remove id and taxincluded before copy back |
1251 | 1251 |
delete @$ref{qw(id taxincluded)}; |
1252 |
|
|
1253 |
if (scalar(@wanted_vars) > 0) { |
|
1254 |
my %h_wanted_vars; |
|
1255 |
map({ $h_wanted_vars{$_} = 1; } @wanted_vars); |
|
1256 |
map({ delete($ref->{$_}) unless ($h_wanted_vars{$_}); } keys(%{$ref})); |
|
1257 |
} |
|
1258 |
|
|
1252 | 1259 |
map { $form->{$_} = $ref->{$_} } keys %$ref; |
1253 | 1260 |
|
1254 | 1261 |
$sth->finish; |
SL/IS.pm | ||
---|---|---|
391 | 391 |
sub customer_details { |
392 | 392 |
$main::lxdebug->enter_sub(); |
393 | 393 |
|
394 |
my ($self, $myconfig, $form) = @_; |
|
394 |
my ($self, $myconfig, $form, @wanted_vars) = @_;
|
|
395 | 395 |
|
396 | 396 |
# connect to database |
397 | 397 |
my $dbh = $form->dbconnect($myconfig); |
... | ... | |
416 | 416 |
|
417 | 417 |
# remove id and taxincluded before copy back |
418 | 418 |
delete @$ref{qw(id taxincluded)}; |
419 |
|
|
420 |
if (scalar(@wanted_vars) > 0) { |
|
421 |
my %h_wanted_vars; |
|
422 |
map({ $h_wanted_vars{$_} = 1; } @wanted_vars); |
|
423 |
map({ delete($ref->{$_}) unless ($h_wanted_vars{$_}); } keys(%{$ref})); |
|
424 |
} |
|
425 |
|
|
419 | 426 |
map { $form->{$_} = $ref->{$_} } keys %$ref; |
420 | 427 |
$sth->finish; |
421 | 428 |
|
bin/mozilla/io.pl | ||
---|---|---|
2016 | 2016 |
|
2017 | 2017 |
sub customer_details { |
2018 | 2018 |
$lxdebug->enter_sub(); |
2019 |
IS->customer_details(\%myconfig, \%$form); |
|
2019 |
IS->customer_details(\%myconfig, \%$form, @_);
|
|
2020 | 2020 |
$lxdebug->leave_sub(); |
2021 | 2021 |
} |
2022 | 2022 |
|
2023 | 2023 |
sub vendor_details { |
2024 | 2024 |
$lxdebug->enter_sub(); |
2025 | 2025 |
|
2026 |
IR->vendor_details(\%myconfig, \%$form); |
|
2026 |
IR->vendor_details(\%myconfig, \%$form, @_);
|
|
2027 | 2027 |
|
2028 | 2028 |
$lxdebug->leave_sub(); |
2029 | 2029 |
} |
... | ... | |
2051 | 2051 |
map { $form->{$_} = $form->parse_amount(\%myconfig, $form->{$_}) } |
2052 | 2052 |
qw(exchangerate creditlimit creditremaining); |
2053 | 2053 |
|
2054 |
my @shipto_vars = |
|
2055 |
qw(shiptoname shiptostreet shiptozipcode shiptocity shiptocountry |
|
2056 |
shiptocontact shiptophone shiptofax shiptoemail |
|
2057 |
shiptodepartment_1 shiptodepartment_2); |
|
2058 |
|
|
2054 | 2059 |
# get details for name |
2055 |
&{"$form->{vc}_details"}; |
|
2060 |
&{"$form->{vc}_details"}(@shipto_vars);
|
|
2056 | 2061 |
|
2057 | 2062 |
$number = |
2058 | 2063 |
($form->{vc} eq 'customer') |
... | ... | |
2155 | 2160 |
|; |
2156 | 2161 |
|
2157 | 2162 |
# delete shipto |
2158 |
map { delete $form->{$_} } |
|
2159 |
qw(shiptoname shiptostreet shiptozipcode shiptocity shiptocountry shiptocontact shiptophone shiptofax shiptoemail shiptodepartment_1 shiptodepartment_2 header); |
|
2163 |
map({ delete $form->{$_} } (@shipto_vars, qw(header))); |
|
2160 | 2164 |
$form->{title} = $title; |
2161 | 2165 |
|
2162 | 2166 |
foreach $key (keys %$form) { |
Auch abrufbar als: Unified diff
Einkaufs-/Verkausfmasken: Wenn man auf "Liefeadresse" drückt, dann werden jetzt nur noch die Lieferadressdaten vom Kunden/Lieferanten aus der Datenbank geholt. Damit werden die bisher eingegebenen Bemerkungen in der Maske nicht mehr überschrieben, und die internen Bemerkungen werden nicht mehr in die normalen Bemerkungen kopiert. Fix für Bug 507.