Revision 4493d1eb
Von Moritz Bunkus vor mehr als 8 Jahren hinzugefügt
SL/OE.pm | ||
---|---|---|
421 | 421 |
$form->{$number_field} ||= $trans_number->create_unique; # set $form->{ordnumber} or $form->{quonumber} |
422 | 422 |
|
423 | 423 |
if ($form->{id}) { |
424 |
$query = qq|DELETE FROM custom_variables |
|
425 |
WHERE (config_id IN (SELECT id FROM custom_variable_configs WHERE (module = 'ShipTo'))) |
|
426 |
AND (trans_id IN (SELECT shipto_id FROM shipto WHERE (module = 'OE') AND (trans_id = ?)))|; |
|
427 |
do_query($form, $dbh, $query, $form->{id}); |
|
428 |
|
|
424 | 429 |
$query = qq|DELETE FROM shipto | . |
425 | 430 |
qq|WHERE trans_id = ? AND module = 'OE'|; |
426 | 431 |
do_query($form, $dbh, $query, $form->{id}); |
... | ... | |
1011 | 1016 |
map { $form->{$_} = $ref->{$_} } keys %$ref; |
1012 | 1017 |
$sth->finish; |
1013 | 1018 |
|
1019 |
if ($form->{shipto_id}) { |
|
1020 |
my $cvars = CVar->get_custom_variables( |
|
1021 |
dbh => $dbh, |
|
1022 |
module => 'ShipTo', |
|
1023 |
trans_id => $form->{shipto_id}, |
|
1024 |
); |
|
1025 |
$form->{"shiptocvar_$_->{name}"} = $_->{value} for @{ $cvars }; |
|
1026 |
} |
|
1027 |
|
|
1014 | 1028 |
# get printed, emailed and queued |
1015 | 1029 |
$query = qq|SELECT s.printed, s.emailed, s.spoolfile, s.formname FROM status s WHERE s.trans_id = ?|; |
1016 | 1030 |
$sth = prepare_execute_query($form, $dbh, $query, $form->{id}); |
Auch abrufbar als: Unified diff
CVars: Lieferadressen-CVars bei Ein-/Verkaufsbelegen benutzen können