push @values, conv_date($form->{expected_billing_date_to});
}
+ if ($form->{parts_partnumber}) {
+ $query .= <<SQL;
+ AND EXISTS (
+ SELECT orderitems.trans_id
+ FROM orderitems
+ LEFT JOIN parts ON (orderitems.parts_id = parts.id)
+ WHERE (orderitems.trans_id = o.id)
+ AND (parts.partnumber ILIKE ?)
+ LIMIT 1
+ )
+SQL
+ push @values, like($form->{parts_partnumber});
+ }
+
+ if ($form->{parts_description}) {
+ $query .= <<SQL;
+ AND EXISTS (
+ SELECT orderitems.trans_id
+ FROM orderitems
+ WHERE (orderitems.trans_id = o.id)
+ AND (orderitems.description ILIKE ?)
+ LIMIT 1
+ )
+SQL
+ push @values, like($form->{parts_description});
+ }
+
if ($form->{all}) {
my @tokens = parse_line('\s+', 0, $form->{all});
# ordnumber quonumber customer.name vendor.name transaction_description
transaction_description transdatefrom transdateto type vc employee_id salesman_id
reqdatefrom reqdateto projectnumber project_id periodic_invoices_active periodic_invoices_inactive
business_id shippingpoint taxzone_id reqdate_unset_or_old insertdatefrom insertdateto
- order_probability_op order_probability_value expected_billing_date_from expected_billing_date_to);
+ order_probability_op order_probability_value expected_billing_date_from expected_billing_date_to
+ parts_partnumber parts_description);
push @hidden_variables, map { "cvar_$_->{name}" } @ct_searchable_custom_variables;
my @keys_for_url = grep { $form->{$_} } @hidden_variables;
push @options, $locale->text('Transaction description') . " : $form->{transaction_description}" if $form->{transaction_description};
push @options, $locale->text('Quick Search') . " : $form->{all}" if $form->{all};
push @options, $locale->text('Shipping Point') . " : $form->{shippingpoint}" if $form->{shippingpoint};
+ push @options, $locale->text('Part Description') . " : $form->{parts_description}" if $form->{parts_description};
+ push @options, $locale->text('Part Number') . " : $form->{parts_partnumber}" if $form->{parts_partnumber};
if ( $form->{transdatefrom} or $form->{transdateto} ) {
push @options, $locale->text('Order Date');
push @options, $locale->text('From') . " " . $locale->date(\%myconfig, $form->{transdatefrom}, 1) if $form->{transdatefrom};
</tr>
<tr>
<th align="right">[% 'Transaction description' | $T8 %]</th>
- <td colspan="3"><input name="transaction_description" style="width: 250px"></td>
+ <td><input name="transaction_description" style="width: 250px"></td>
+
+ <th align="right">[% 'Part Description' | $T8 %]</th>
+ <td><input name="parts_description" style="width: 250px"></td>
</tr>
<tr>
<th align="right">[% 'Project Number' | $T8 %]</th>
- <td colspan="3">
+ <td>
[%- INCLUDE 'generic/multibox.html'
name = MYCONFIG.vclimit < ALL_PROJECTS.size ? 'projectnumber' : 'project_id',
style = "width: 250px",
allow_textbox = 1,
-%]
</td>
+
+ <th align="right">[% 'Part Number' | $T8 %]</th>
+ <td><input name="parts_partnumber" style="width: 250px"></td>
</tr>
[%- UNLESS ALL_BUSINESS_TYPES.size == 0 %]
<tr>