Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision e059f9cf

Von Tamino Steinert vor 12 Monaten hinzugefügt

  • ID e059f9cf786f9c2a8a04d5e589e86775d6185f4d
  • Vorgänger 65f7a07e

Angebots-/Auftragsbericht: Lieferadresse anzeigen und filtern

Unterschiede anzeigen:

SL/OE.pm
148 148
    qq|  e.name AS employee, s.name AS salesman, | .
149 149
    qq|  ct.${vc}number AS vcnumber, ct.country, ct.ustid, ct.business_id,  | .
150 150
    qq|  tz.description AS taxzone, | .
151
    qq|  shipto.shiptoname, shipto.shiptodepartment_1, shipto.shiptodepartment_2, | .
152
    qq|  shipto.shiptostreet, shipto.shiptozipcode, shipto.shiptocity, shipto.shiptocountry, | .
151 153
    qq|  order_statuses.name AS order_status | .
152 154
    $periodic_invoices_columns .
153 155
    $phone_notes_columns .
......
164 166
    qq|LEFT JOIN tax_zones tz ON (o.taxzone_id = tz.id) | .
165 167
    qq|LEFT JOIN department   ON (o.department_id = department.id) | .
166 168
    qq|LEFT JOIN order_statuses ON (o.order_status_id = order_statuses.id) | .
169
    qq|LEFT JOIN shipto ON (
170
        (o.shipto_id = shipto.shipto_id) or
171
        (o.id = shipto.trans_id and shipto.module = 'OE')
172
       )| .
167 173
    qq|$periodic_invoices_joins | .
168 174
    $phone_notes_join .
169 175
    qq|WHERE (o.quotation = ?) | .
......
406 412
    push @values, like($form->{parts_description});
407 413
  }
408 414

  
415
  if ($form->{shiptoname}) {
416
    $query .= " AND shipto.shiptoname ILIKE ?";
417
    push(@values, like($form->{shiptoname}));
418
  }
419
  if ($form->{shiptodepartment_1}) {
420
    $query .= " AND shipto.shiptodepartment_1 ILIKE ?";
421
    push(@values, like($form->{shiptodepartment_1}));
422
  }
423
  if ($form->{shiptodepartment_2}) {
424
    $query .= " AND shipto.shiptodepartment_2 ILIKE ?";
425
    push(@values, like($form->{shiptodepartment_2}));
426
  }
427
  if ($form->{shiptostreet}) {
428
    $query .= " AND shipto.shiptostreet ILIKE ?";
429
    push(@values, like($form->{shiptostreet}));
430
  }
431
  if ($form->{shiptozipcode}) {
432
    $query .= " AND shipto.shiptozipcode ILIKE ?";
433
    push(@values, like($form->{shiptozipcode}));
434
  }
435
  if ($form->{shiptocity}) {
436
    $query .= " AND shipto.shiptocity ILIKE ?";
437
    push(@values, like($form->{shiptocity}));
438
  }
439
  if ($form->{shiptocountry}) {
440
    $query .= " AND shipto.shiptocountry ILIKE ?";
441
    push(@values, like($form->{shiptocountry}));
442
  }
443

  
409 444
  if ($form->{all}) {
410 445
    my @tokens = parse_line('\s+', 0, $form->{all});
411 446
    # ordnumber quonumber customer.name vendor.name transaction_description

Auch abrufbar als: Unified diff