push @where, ($form->{delivered} ? "" : "NOT ") . "COALESCE(dord.delivered, FALSE)";
}
+ if ($form->{serialnumber}) {
+ push @where, 'dord.id IN (SELECT doi.delivery_order_id FROM delivery_order_items doi WHERE doi.serialnumber LIKE ?)';
+ push @values, '%' . $form->{serialnumber} . '%';
+ }
+
if($form->{transdatefrom}) {
push @where, qq|dord.transdate >= ?|;
push @values, conv_date($form->{transdatefrom});
my $report = SL::ReportGenerator->new(\%myconfig, $form);
my @hidden_variables = map { "l_${_}" } @columns;
- push @hidden_variables, $form->{vc}, qw(l_closed l_notdelivered open closed delivered notdelivered donumber ordnumber
+ push @hidden_variables, $form->{vc}, qw(l_closed l_notdelivered open closed delivered notdelivered donumber ordnumber chargenumber
transaction_description transdatefrom transdateto type vc employee_id salesman_id project_id);
my $href = build_std_url('action=orders', grep { $form->{$_} } @hidden_variables);
if ($form->{ordnumber}) {
push @options, $locale->text('Order Number') . " : $form->{ordnumber}";
}
+ push @options, $locale->text('Serial Number') . " : $form->{serialnumber}" if $form->{serialnumber};
if ($form->{transaction_description}) {
push @options, $locale->text('Transaction description') . " : $form->{transaction_description}";
}