[freeside-commits] freeside/httemplate/view qual.cgi,1.8,1.9

Ivan,,, ivan at wavetail.420.am
Mon Mar 21 23:00:56 PDT 2011


Update of /home/cvs/cvsroot/freeside/httemplate/view
In directory wavetail.420.am:/tmp/cvs-serv24450/httemplate/view

Modified Files:
	qual.cgi 
Log Message:
new customer from prospect qualification, RT#7111

Index: qual.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/view/qual.cgi,v
retrieving revision 1.8
retrieving revision 1.9
diff -u -w -d -r1.8 -r1.9
--- qual.cgi	21 Mar 2011 02:18:52 -0000	1.8
+++ qual.cgi	22 Mar 2011 06:00:54 -0000	1.9
@@ -1,14 +1,17 @@
 <% include("/elements/header.html","View Qualification") %>
 
-% if ( $cust_or_prospect->get('custnum') ) {
+% if ( $cust_or_prospect->custnum ) {
 
-  <% include( '/elements/small_custview.html', $cust_or_prospect->custnum, '', 1,
-     "${p}view/cust_main.cgi") %>
+    <% include( '/elements/small_custview.html', $cust_or_prospect,
+                  '',                        #countrydefault override
+                  1,                         #no balance
+                  "${p}view/cust_main.cgi"), #url
+    %>
+
+% } elsif ( $cust_or_prospect->prospectnum ) {
+
+    <% include( '/elements/small_prospect_view.html', $cust_or_prospect) %>
 
-% } elsif ( $cust_or_prospect->get('prospectnum') ) {
-%  	my $prospectnum = $cust_or_prospect->get('prospectnum');
-% 	my $link = "${p}view/prospect_main.html?$prospectnum";
-	<A HREF="<%$link%>">Prospect #<%$prospectnum%></A>
 % }
 
 <BR><BR>
@@ -29,35 +32,41 @@
 
 % if ( $export ) {
 %  my $qual_result = $export->qual_result($qual);
-%  if ($qual_result->{'header'}) {
-	<B><% $qual_result->{'header'} %></B>
-%  }
-%  if ($qual_result->{'pkglist'}) { # one of the possible formats
+%   if ($qual_result->{'pkglist'}) { # one of the possible formats (?)
+      <B>Qualifying Packages</B> - click to order
 %   my $svcpart = '';
 %   my $pkglist = $qual_result->{'pkglist'};
 %   my $cust_or_prospect = $qual->cust_or_prospect;
 %   my $locationnum = '';
 %   my %location = $qual->location_hash;
-%   if (%location && $location{'locationnum'}) { 
-%      $locationnum = $location{'locationnum'};
-%   }
+%     my $locationnum = $location{'locationnum'};
     <UL>
 %       foreach my $pkgpart ( keys %$pkglist ) { 
+          <LI>
+
+%           if($cust_or_prospect->custnum) {
+
 %           my %opt = ( 'label' => $pkglist->{$pkgpart},
 %                          'pkgpart' => $pkgpart,
-%                          'locationnum' => $locationnum, );
+%                         'locationnum' => $location{'locationnum'},
+%                       );
 %           if ( $export->exporttype eq 'ikano' ) {
 % 		my $pkg_svc = qsearchs('pkg_svc', { 'pkgpart' => $pkgpart,
 %                                                 'primary_svc' => 'Y',
-%                                               } );
-%		$opt{'svcpart'} = $pkg_svc->svcpart if $pkg_svc;
 %           }
-	    <LI>
-%		if($cust_or_prospect && $cust_or_prospect->custnum) {
-		   <% include('/view/cust_main/order_pkg_link.html', $qual->cust_or_prospect, %opt) %>
+%                                     );
+%               $opt{'svcpart'} = $pkg_svc->svcpart if $pkg_svc;
 %		}
-%		else {
-		    <% $opt{label} %>
+
+              <% include('/view/cust_main/order_pkg_link.html',
+                           $cust_or_prospect, %opt) %>
+
+%           } elsif ($cust_or_prospect->prospectnum) {
+
+%             my $link = "${p}edit/cust_main.cgi?qualnum=". $qual->qualnum.
+%                                              ";lock_pkgpart=$pkgpart";
+              <A HREF="<% $link %>"><% $pkglist->{$pkgpart} |h %></A>
+
 %		}
 	    </LI>
 %       }
@@ -101,7 +110,7 @@
 $location_kind = "Residential" if $cust_location->get('location_kind') eq 'R';
 $location_kind = "Business" if $cust_location->get('location_kind') eq 'B';
 
-my $cust_or_prospect = $qual->cust_or_prospect;
+my $cust_or_prospect = $qual->cust_or_prospect; #or die?  qual without this?
 my $export = $qual->part_export;
 
 </%init>



More information about the freeside-commits mailing list