Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision ee9f9f9a

Von Sven Schöling vor etwa 14 Jahren hinzugefügt

  • ID ee9f9f9aa4c3b9d5d20ab10a45c12bcaa6aa78d0
  • Vorgänger 198f860c
  • Nachfolger cfce8ceb

Rechungssuche - Department bei selectbox richtig suchen.

Applikation des Multibox Features von eben. Department wird im Suchpfad jetzt
getrennt von department_id behandelt, und die selectbox stellt rendert gleich
den korrekten Elementnamen.

Unterschiede anzeigen:

SL/AR.pm
435 435
    qq|LEFT JOIN employee e2 ON (a.salesman_id = e2.id) | .
436 436
    qq|LEFT JOIN project pr ON (a.globalproject_id = pr.id)| .
437 437
    qq|LEFT JOIN tax_zones tz ON (tz.id = c.taxzone_id)| .
438
    qq|LEFT JOIN payment_terms pt ON (pt.id = c.payment_id)|;
438
    qq|LEFT JOIN payment_terms pt ON (pt.id = c.payment_id)| .
439
    qq|LEFT JOIN department d ON (d.id = a.department_id)|;
439 440

  
440 441
  my $where = "1 = 1";
441 442
  if ($form->{customer_id}) {
......
445 446
    $where .= " AND c.name ILIKE ?";
446 447
    push(@values, $form->like($form->{customer}));
447 448
  }
448
  if ($form->{department}) {
449
    my ($null, $department_id) = split /--/, $form->{department};
449
  if ($form->{department_id}) {
450
    my $department_id = $form->{department_id};
450 451
    $where .= " AND a.department_id = ?";
451 452
    push(@values, $department_id);
452 453
  }
454
  if ($form->{department}) {
455
    my $department = "%" . $form->{department} . "%";
456
    $where .= " AND d.description ILIKE ?";
457
    push(@values, $department);
458
  }
453 459
  foreach my $column (qw(invnumber ordnumber notes transaction_description)) {
454 460
    if ($form->{$column}) {
455 461
      $where .= " AND a.$column ILIKE ?";

Auch abrufbar als: Unified diff