Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision a75836ca

Von Bernd Bleßmann vor etwa 2 Jahren hinzugefügt

  • ID a75836caeb9c66517fa287b01d6400fa65deb214
  • Vorgänger 1dc42a5f
  • Nachfolger 2128d3c4

Verkaufsbelege: Modul bei Lieferadressenauswahl und Detail-Anzeige beachten

Da Ids für Belege und Kunden gleich sein können, muss bei der Listung der
Lieferadresse zum Kunden darauf geachtet werden, dass das Modul auch 'CT'
ist.

Unterschiede anzeigen:

SL/Common.pm
340 340

  
341 341
  map { $form->{$_} = $form->format_amount($myconfig, $form->{$_} * 1) } qw(discount creditlimit);
342 342

  
343
  $query = qq|SELECT * FROM shipto WHERE (trans_id = ?)|;
343
  $query = qq|SELECT * FROM shipto WHERE (trans_id = ?) AND module LIKE 'CT'|;
344 344
  $form->{SHIPTO} = selectall_hashref_query($form, $dbh, $query, $vc_id);
345 345

  
346 346
  if ($vc eq 'customer') {
bin/mozilla/do.pl
519 519
  $::form->{ALL_EMPLOYEES}         = SL::DB::Manager::Employee->get_all_sorted(query => [ or => [ id => $::form->{employee_id},  deleted => 0 ] ]);
520 520
  $::form->{ALL_SALESMEN}          = SL::DB::Manager::Employee->get_all_sorted(query => [ or => [ id => $::form->{salesman_id},  deleted => 0 ] ]);
521 521
  $::form->{ALL_SHIPTO}            = SL::DB::Manager::Shipto->get_all_sorted(query => [
522
    or => [ trans_id  => $::form->{"$::form->{vc}_id"} * 1, and => [ shipto_id => $::form->{shipto_id} * 1, trans_id => undef ] ]
522
    or => [ and => [ trans_id  => $::form->{"$::form->{vc}_id"} * 1, module => 'CT' ], and => [ shipto_id => $::form->{shipto_id} * 1, trans_id => undef ] ]
523 523
  ]);
524 524
  $::form->{ALL_CONTACTS}          = SL::DB::Manager::Contact->get_all_sorted(query => [
525 525
    or => [
bin/mozilla/is.pl
605 605
  $TMPL_VAR{ALL_EMPLOYEES}         = SL::DB::Manager::Employee->get_all_sorted(query => [ or => [ id => $::form->{employee_id},  deleted => 0 ] ]);
606 606
  $TMPL_VAR{ALL_SALESMEN}          = SL::DB::Manager::Employee->get_all_sorted(query => [ or => [ id => $::form->{salesman_id},  deleted => 0 ] ]);
607 607
  $TMPL_VAR{ALL_SHIPTO}            = SL::DB::Manager::Shipto->get_all_sorted(query => [
608
    or => [ trans_id  => $::form->{"$::form->{vc}_id"} * 1, and => [ shipto_id => $::form->{shipto_id} * 1, trans_id => undef ] ]
608
    or => [ and => [ trans_id  => $::form->{"$::form->{vc}_id"} * 1, module => 'CT' ], and => [ shipto_id => $::form->{shipto_id} * 1, trans_id => undef ] ]
609 609
  ]);
610 610
  $TMPL_VAR{ALL_CONTACTS}          = SL::DB::Manager::Contact->get_all_sorted(query => [
611 611
    or => [
bin/mozilla/oe.pl
571 571
  $TMPL_VAR->{ALL_EMPLOYEES}         = SL::DB::Manager::Employee->get_all_sorted(query => $employee_list_query_gen->('employee_id'));
572 572
  $TMPL_VAR->{ALL_SALESMEN}          = SL::DB::Manager::Employee->get_all_sorted(query => $employee_list_query_gen->('salesman_id'));
573 573
  $TMPL_VAR->{ALL_SHIPTO}            = SL::DB::Manager::Shipto->get_all_sorted(query => [
574
    or => [ trans_id  => $::form->{"$::form->{vc}_id"} * 1, and => [ shipto_id => $::form->{shipto_id} * 1, trans_id => undef ] ]
574
    or => [ and => [ trans_id  => $::form->{"$::form->{vc}_id"} * 1, module => 'CT' ], and => [ shipto_id => $::form->{shipto_id} * 1, trans_id => undef ] ]
575 575
  ]);
576 576
  $TMPL_VAR->{ALL_CONTACTS}          = SL::DB::Manager::Contact->get_all_sorted(query => [
577 577
    or => [

Auch abrufbar als: Unified diff