Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision b98b8e3f

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

  • ID b98b8e3f73a399d2d4df7be4962b56bd4ad8c82b
  • Vorgänger fb742b35
  • Nachfolger ba802064

Belege: Filtern nach Ansprechpartner

Unterschiede anzeigen:

SL/OE.pm
118 118
    qq|  , o.order_probability, o.expected_billing_date, (o.netamount * o.order_probability / 100) AS expected_netamount | .
119 119
    qq|FROM oe o | .
120 120
    qq|JOIN $vc ct ON (o.${vc}_id = ct.id) | .
121
    qq|LEFT JOIN contacts cp ON (o.cp_id = cp.cp_id) | .
121 122
    qq|LEFT JOIN employee e ON (o.employee_id = e.id) | .
122 123
    qq|LEFT JOIN employee s ON (o.salesman_id = s.id) | .
123 124
    qq|LEFT JOIN exchangerate ex ON (ex.currency_id = o.currency_id | .
......
168 169
    push(@values, '%' . $form->{$vc} . '%');
169 170
  }
170 171

  
172
  if ($form->{"cp_name"}) {
173
    $query .= " AND (cp.cp_name ILIKE ? OR cp.cp_givenname ILIKE ?)";
174
    push(@values, ('%' . $form->{"cp_name"} . '%')x2);
175
  }
176

  
171 177
  if (!$main::auth->assert('sales_all_edit', 1)) {
172 178
    $query .= " AND o.employee_id = (select id from employee where login= ?)";
173 179
    push @values, $form->{login};

Auch abrufbar als: Unified diff