Projekt

Allgemein

Profil

« Zurück | Weiter » 

Revision 2d51ec2e

Von Bernd Bleßmann vor mehr als 2 Jahren hinzugefügt

  • ID 2d51ec2e72f4b8cc59be91ee77e6568758f28ee9
  • Vorgänger 332b5ec7
  • Nachfolger 75f7cc1d

Telefonnotizen: in Berichten Angebot/Auftrag filtern können.

Durchsucht werden Betreff und Text.

Unterschiede anzeigen:

SL/OE.pm
116 116
    }
117 117
  }
118 118

  
119
  my ($phone_notes_columns, $phone_notes_join);
120
  $form->{phone_notes} = trim($form->{phone_notes});
121
  if ($form->{phone_notes}) {
122
    $phone_notes_columns = qq| , phone_notes.subject AS phone_notes_subject, phone_notes.body AS phone_notes_body |;
123
    $phone_notes_join    = qq| JOIN notes phone_notes ON (o.id = phone_notes.trans_id AND phone_notes.trans_module LIKE 'oe') |;
124
  }
125

  
119 126
  $query =
120 127
    qq|SELECT o.id, o.ordnumber, o.transdate, o.reqdate, | .
121 128
    qq|  o.amount, ct.${vc}number, ct.name, o.netamount, o.${vc}_id, o.globalproject_id, | .
......
133 140
    qq|  ct.${vc}number AS vcnumber, ct.country, ct.ustid, ct.business_id,  | .
134 141
    qq|  tz.description AS taxzone | .
135 142
    $periodic_invoices_columns .
143
    $phone_notes_columns .
136 144
    qq|  , o.order_probability, o.expected_billing_date, (o.netamount * o.order_probability / 100) AS expected_netamount | .
137 145
    qq|FROM oe o | .
138 146
    qq|JOIN $vc ct ON (o.${vc}_id = ct.id) | .
......
146 154
    qq|LEFT JOIN tax_zones tz ON (o.taxzone_id = tz.id) | .
147 155
    qq|LEFT JOIN department   ON (o.department_id = department.id) | .
148 156
    qq|$periodic_invoices_joins | .
157
    $phone_notes_join .
149 158
    qq|WHERE (o.quotation = ?) |;
150 159
  push(@values, $quotation);
151 160

  
......
304 313
    push(@values, like($form->{intnotes}));
305 314
  }
306 315

  
316
  if ($form->{phone_notes}) {
317
    $query .= qq| AND (phone_notes.subject ILIKE ? OR phone_notes.body ILIKE ?)|;
318
    push(@values, like($form->{phone_notes}), like($form->{phone_notes}));
319
  }
320

  
307 321
  if ($form->{parts_partnumber}) {
308 322
    $query .= <<SQL;
309 323
      AND EXISTS (
bin/mozilla/oe.pl
1102 1102
                                                        reqdatefrom reqdateto projectnumber project_id periodic_invoices_active periodic_invoices_inactive
1103 1103
                                                        business_id shippingpoint taxzone_id reqdate_unset_or_old insertdatefrom insertdateto
1104 1104
                                                        order_probability_op order_probability_value expected_billing_date_from expected_billing_date_to
1105
                                                        parts_partnumber parts_description all department_id intnotes);
1105
                                                        parts_partnumber parts_description all department_id intnotes phone_notes);
1106 1106
  push @hidden_variables, map { "cvar_$_->{name}" } @ct_searchable_custom_variables;
1107 1107

  
1108 1108
  my   @keys_for_url = grep { $form->{$_} } @hidden_variables;
......
1188 1188
  push @options, $locale->text('Shipping Point')          . " : $form->{shippingpoint}"                   if $form->{shippingpoint};
1189 1189
  push @options, $locale->text('Part Description')        . " : $form->{parts_description}"               if $form->{parts_description};
1190 1190
  push @options, $locale->text('Part Number')             . " : $form->{parts_partnumber}"                if $form->{parts_partnumber};
1191
  push @options, $locale->text('Phone Notes')             . " : $form->{phone_notes}"                     if $form->{phone_notes};
1191 1192
  if ( $form->{transdatefrom} or $form->{transdateto} ) {
1192 1193
    push @options, $locale->text('Order Date');
1193 1194
    push @options, $locale->text('From') . " " . $locale->date(\%myconfig, $form->{transdatefrom}, 1)     if $form->{transdatefrom};
templates/webpages/oe/search.html
80 80
     <th align="right">[% 'Internal Notes' | $T8 %]</th>
81 81
     <td>[% L.input_tag('intnotes', '', style=style) %]</td>
82 82
    </tr>
83
    <tr>
84
     <th align="right">[% 'Phone Notes' | $T8 %]</th>
85
     <td>[% L.input_tag('phone_notes', '', style=style) %]</td>
86
    </tr>
83 87
    <tr>
84 88
     <th align="right">[% IF is_order %][% 'Order Date' | $T8 %][% ELSE %][% 'Quotation Date' | $T8 %][% END %] [% 'From' | $T8 %]</th>
85 89
     <td>

Auch abrufbar als: Unified diff