Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 0acf0e35

Von Moritz Bunkus vor fast 18 Jahren hinzugefügt

  • ID 0acf0e35540578a0802d660ede4f338afc0a6aa5
  • Vorgänger 4671a79f
  • Nachfolger 615121a5

Bei Kunden-/Lieferantentypen das Feld "Vertreter" ausblenden.

Unterschiede anzeigen:

SL/AM.pm
506 506
  # connect to database
507 507
  my $dbh = $form->dbconnect($myconfig);
508 508

  
509
  my $query = qq|SELECT id, description, discount, customernumberinit, salesman
509
  my $query = qq|SELECT id, description, discount, customernumberinit
510 510
                 FROM business
511 511
                 ORDER BY 2|;
512 512

  
......
533 533
  my $dbh = $form->dbconnect($myconfig);
534 534

  
535 535
  my $query =
536
    qq|SELECT b.description, b.discount, b.customernumberinit, b.salesman
536
    qq|SELECT b.description, b.discount, b.customernumberinit
537 537
       FROM business b
538 538
       WHERE b.id = ?|;
539 539
  my $sth = $dbh->prepare($query);
......
559 559
  my $dbh = $form->dbconnect($myconfig);
560 560

  
561 561
  my @values = ($form->{description}, $form->{discount},
562
                $form->{customernumberinit}, $form->{salesman} ? 't' : 'f');
562
                $form->{customernumberinit});
563 563
  # id is the old record
564 564
  if ($form->{id}) {
565 565
    $query = qq|UPDATE business SET
566 566
                description = ?,
567 567
                discount = ?,
568
                customernumberinit = ?,
569
                salesman = ?
568
                customernumberinit = ?
570 569
                WHERE id = ?|;
571 570
    push(@values, $form->{id});
572 571
  } else {
573 572
    $query = qq|INSERT INTO business
574
                (description, discount, customernumberinit, salesman)
575
                VALUES (?, ?, ?, ?)|;
573
                (description, discount, customernumberinit)
574
                VALUES (?, ?, ?)|;
576 575
  }
577 576
  do_query($form, $dbh, $query, @values);
578 577

  

Auch abrufbar als: Unified diff