my $project_id = "${project}_id";
my $description = $self->link_type_desc->{description};
my $filter = $self->link_type_desc->{filter};
+ my $number = $self->link_type_desc->{number};
my @where = $filter && $manager->can($filter) ? $manager->$filter($self->link_type) : ();
push @where, ("${vc}.${vc}number" => { ilike => like($::form->{vc_number}) }) if $::form->{vc_number};
push @where, ($description => { ilike => like($::form->{transaction_description}) }) if $::form->{transaction_description};
push @where, ($project_id => $::form->{globalproject_id}) if $::form->{globalproject_id} && $manager->can($project_id);
+ if ($::form->{number}) {
+ my $class = 'SL::DB::' . $self->link_type_desc->{model};
+ my $col_type = ref $class->meta->column($number);
+ if ($col_type =~ /^Rose::DB::Object::Metadata::Column::(?:Integer|Serial)$/) {
+ push @where, ($number => $::form->{number});
+ } elsif ($col_type =~ /^Rose::DB::Object::Metadata::Column::Text$/) {
+ push @where, ($number => { ilike => like($::form->{number}) });
+ }
+ }
+
my @with_objects = ($vc);
push @with_objects, $project if $manager->can($project_id);
style=style) %]</td>
</tr>
+ <tr>
+ <td>[%- LxERP.t8("Record number") %]:</td>
+ <td>[% L.input_tag('number', '', style=style) %]</td>
+ </tr>
+
<tr>
<td>[%- LxERP.t8("Customer/Vendor Number") %]:</td>
<td>[% L.input_tag('vc_number', is_sales ? SELF.object.customer.customernumber : SELF.object.vendor.vendornumber, style=style) %]</td>