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
if ($config_obj) {
my $config = { map { $_ => $config_obj->$_ } qw(active terminated periodicity order_value_periodicity start_date_as_date end_date_as_date first_billing_date_as_date extend_automatically_by ar_chart_id
- print printer_id copies direct_debit) };
+ print printer_id copies direct_debit send_email email_recipient_contact_id email_recipient_address email_sender email_subject email_body) };
$form->{periodic_invoices_config} = YAML::Dump($config);
}
}