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 ?";
bin/mozilla/ar.pl
1398 1398
    my ($department) = split /--/, $form->{department};
1399 1399
    push @options, $locale->text('Department') . " : $department";
1400 1400
  }
1401
  if ($form->{department_id}) {
1402
    push @options, $locale->text('Department Id') . " : $form->{department_id}";
1403
  }
1401 1404
  if ($form->{invnumber}) {
1402 1405
    push @options, $locale->text('Invoice Number') . " : $form->{invnumber}";
1403 1406
  }
templates/webpages/ar/search.html
31 31
      <td>
32 32
            [%- INCLUDE 'generic/multibox.html'
33 33
                 name          = 'department',
34
                 select_name   = 'department_id',
34 35
                 style         = 'width: 250px',
35 36
                 DATA          = ALL_DEPARTMENTS,
36 37
                 id_key        = 'id',

Auch abrufbar als: Unified diff