Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 4493d1eb

Von Moritz Bunkus vor mehr als 8 Jahren hinzugefügt

  • ID 4493d1eb7845b7eba868f0a16ec2e623dcf1d591
  • Vorgänger 6e1a7a2e
  • Nachfolger c7241bf7

CVars: Lieferadressen-CVars bei Ein-/Verkaufsbelegen benutzen können

Unterschiede anzeigen:

SL/DO.pm
263 263
  if ($form->{id}) {
264 264

  
265 265
    # only delete shipto complete
266
    $query = qq|DELETE FROM custom_variables
267
                WHERE (config_id IN (SELECT id        FROM custom_variable_configs WHERE (module = 'ShipTo')))
268
                  AND (trans_id  IN (SELECT shipto_id FROM shipto                  WHERE (module = 'DO') AND (trans_id = ?)))|;
269
    do_query($form, $dbh, $query, $form->{id});
270

  
266 271
    $query = qq|DELETE FROM shipto WHERE trans_id = ? AND module = 'DO'|;
267 272
    do_query($form, $dbh, $query, conv_i($form->{id}));
268 273

  
......
748 753
    map { $form->{$_} = $ref->{$_} } keys %$ref;
749 754
    $sth->finish();
750 755

  
756
    if ($form->{shipto_id}) {
757
      my $cvars = CVar->get_custom_variables(
758
        dbh      => $dbh,
759
        module   => 'ShipTo',
760
        trans_id => $form->{shipto_id},
761
      );
762
      $form->{"shiptocvar_$_->{name}"} = $_->{value} for @{ $cvars };
763
    }
764

  
751 765
    # get printed, emailed and queued
752 766
    $query = qq|SELECT s.printed, s.emailed, s.spoolfile, s.formname FROM status s WHERE s.trans_id = ?|;
753 767
    $sth   = prepare_execute_query($form, $dbh, $query, conv_i($form->{id}));

Auch abrufbar als: Unified diff