projects
/
kivitendo-erp.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
Im Lagerstandsbericht nach Warengruppe filtern können.
[kivitendo-erp.git]
/
SL
/
Controller
/
PhoneNumber.pm
diff --git
a/SL/Controller/PhoneNumber.pm
b/SL/Controller/PhoneNumber.pm
index
4bfbe3e
..
5b83a35
100644
(file)
--- a/
SL/Controller/PhoneNumber.pm
+++ b/
SL/Controller/PhoneNumber.pm
@@
-74,6
+74,8
@@
sub find_contact_for_number {
return {
full_name => join(' ', grep { $_ ne '' } map { $_ // '' } ($chosen->cp_title, $chosen->cp_givenname, $chosen->cp_name)),
return {
full_name => join(' ', grep { $_ ne '' } map { $_ // '' } ($chosen->cp_title, $chosen->cp_givenname, $chosen->cp_name)),
+ id => $chosen->cp_id,
+ type => 'contact',
map({ my $method = "cp_$_"; ($_ => $chosen->$method // '') } qw(title givenname name phone1 phone2 mobile1 mobile2 fax)),
};
}
map({ my $method = "cp_$_"; ($_ => $chosen->$method // '') } qw(title givenname name phone1 phone2 mobile1 mobile2 fax)),
};
}
@@
-111,6
+113,8
@@
sub find_customer_vendor_for_number {
full_name => $chosen->name // '',
phone1 => $chosen->phone // '',
fax => $chosen->fax // '',
full_name => $chosen->name // '',
phone1 => $chosen->phone // '',
fax => $chosen->fax // '',
+ id => $chosen->id,
+ type => ref($chosen) eq 'SL::DB::Customer' ? 'customer' : 'vendor',
map({ ($_ => '') } qw(title givenname name phone2 mobile1 mobile2)),
};
}
map({ ($_ => '') } qw(title givenname name phone2 mobile1 mobile2)),
};
}
@@
-178,6
+182,11
@@
fields are present:
=over 4
=over 4
+=item C<id> — the database ID of the corresponding record
+
+=item C<type> — describes the type of record returned; can be either
+C<contact>, C<customer> or C<vendor>
+
=item C<full_name> — for contacts this is the concatenation of the
title, given name and family name; for customers/vendors it's the
company name
=item C<full_name> — for contacts this is the concatenation of the
title, given name and family name; for customers/vendors it's the
company name