X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Felements%2Fsearch-cust_main.html;h=dbcc2ed0b589ac11765dd6579375b389a0835abf;hb=63a268637b2d51a8766412617724b9436439deb6;hp=f2b17eacb5e500e1ad4fdea298347f7e52a1626c;hpb=9509e5bfb7f9331303153cac24d7bfecbe2ea9f1;p=freeside.git
diff --git a/httemplate/elements/search-cust_main.html b/httemplate/elements/search-cust_main.html
index f2b17eacb..dbcc2ed0b 100644
--- a/httemplate/elements/search-cust_main.html
+++ b/httemplate/elements/search-cust_main.html
@@ -1,23 +1,24 @@
-%
-% my( %opt ) = @_;
-% $opt{'field_name'} ||= 'custnum';
-%
-% my $cust_main = '';
-% if ( $opt{'value'} ) {
-% $cust_main = qsearchs(
-% 'table' => 'cust_main',
-% 'hashref' => { 'custnum' => $opt{'value'} },
-% 'extra_sql' => " AND ". $FS::CurrentUser::CurrentUser->agentnums_sql,
-% );
-% }
-%
-
-
-
+
-
+
+
+% if ( $opt{'find_button'} ) {
+
+% }
@@ -161,4 +162,20 @@
}
+<%init>
+my( %opt ) = @_;
+$opt{'field_name'} ||= 'custnum';
+
+my $value = $opt{'curr_value'} || $opt{'value'};
+
+my $cust_main = '';
+if ( $value ) {
+ $cust_main = qsearchs({
+ 'table' => 'cust_main',
+ 'hashref' => { 'custnum' => $value },
+ 'extra_sql' => " AND ". $FS::CurrentUser::CurrentUser->agentnums_sql,
+ });
+}
+
+%init>