Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 54ea08cd

Von Moritz Bunkus vor mehr als 14 Jahren hinzugefügt

  • ID 54ea08cdb34a06dec0cb5575dc96f3d652637cc9
  • Vorgänger b2d704ee
  • Nachfolger 94466d5c

Flag "Vertreter" bei Kunden-/Lieferantentypen bearbeitbar gemacht

Aber nur, wenn $::vertreter aktiv ist. Fix für Bug 1278.

Unterschiede anzeigen:

SL/AM.pm
647 647
  # connect to database
648 648
  my $dbh = $form->dbconnect($myconfig);
649 649

  
650
  my $query = qq|SELECT id, description, discount, customernumberinit
650
  my $query = qq|SELECT id, description, discount, customernumberinit, salesman
651 651
                 FROM business
652 652
                 ORDER BY 2|;
653 653

  
......
673 673
  my $dbh = $form->dbconnect($myconfig);
674 674

  
675 675
  my $query =
676
    qq|SELECT b.description, b.discount, b.customernumberinit
676
    qq|SELECT b.description, b.discount, b.customernumberinit, b.salesman
677 677
       FROM business b
678 678
       WHERE b.id = ?|;
679 679
  my $sth = $dbh->prepare($query);
......
699 699
  # connect to database
700 700
  my $dbh = $form->dbconnect($myconfig);
701 701

  
702
  my @values = ($form->{description}, $form->{discount},
703
                $form->{customernumberinit});
702
  my @values = ($form->{description}, $form->{discount}, $form->{customernumberinit}, $form->{salesman} ? 't' : 'f');
704 703
  # id is the old record
705 704
  if ($form->{id}) {
706 705
    $query = qq|UPDATE business SET
707 706
                description = ?,
708 707
                discount = ?,
709
                customernumberinit = ?
708
                customernumberinit = ?,
709
                salesman = ?
710 710
                WHERE id = ?|;
711 711
    push(@values, $form->{id});
712 712
  } else {
713 713
    $query = qq|INSERT INTO business
714
                (description, discount, customernumberinit)
715
                VALUES (?, ?, ?)|;
714
                (description, discount, customernumberinit, salesman)
715
                VALUES (?, ?, ?, ?)|;
716 716
  }
717 717
  do_query($form, $dbh, $query, @values);
718 718

  

Auch abrufbar als: Unified diff