X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=httemplate%2Felements%2Fpopup_link-cust_main.html;h=541bb5837c3981950d72ae95e374238edc8ecbd2;hp=78e50e7824a9e5c5d11de5005046beb5ba7204c7;hb=7b0bbc4117a7959b9f7b7b2cf999b8188ba34160;hpb=0fb307c305e4bc2c9c27dc25a3308beae3a4d33c diff --git a/httemplate/elements/popup_link-cust_main.html b/httemplate/elements/popup_link-cust_main.html index 78e50e782..541bb5837 100644 --- a/httemplate/elements/popup_link-cust_main.html +++ b/httemplate/elements/popup_link-cust_main.html @@ -22,25 +22,38 @@ Example: ) -% if ( $params->{'cust_main'} ) { +% if ( $custnum || $prospectnum ) { <% include('/elements/popup_link.html', $params ) %>\ % } <%init> -my $params = { 'closetext' => 'Close' }; +my $params = { 'closetext' => emt('Close') }; if (ref($_[0]) eq 'HASH') { $params = { %$params, %{ $_[0] } }; } else { $params = { %$params, @_ }; } + +my $custnum = $params->{'cust_main'} + ? $params->{'cust_main'}->custnum + : $params->{'custnum'}; + +$params->{'action'} .= ( $params->{'action'} =~ /\?/ ? ';' : '?' ). + "custnum=$custnum" + if $custnum; + +#(maybe i should be called popup_link-cust_or_prospect_main.html now) +my $prospectnum = $params->{'prospect_main'} + ? $params->{'prospect_main'}->prospectnum + : $params->{'prospectnum'}; -$params->{'action'} .= - ( $params->{'action'} =~ /\?/ ? ';' : '?' ). - 'custnum='. $params->{'cust_main'}->custnum; +$params->{'action'} .= ( $params->{'action'} =~ /\?/ ? ';' : '?' ). + "prospectnum=$prospectnum" + if $prospectnum; -$params->{'action'} .= ';pkgpart='.$params->{'pkgpart'} if $params->{'pkgpart'}; -$params->{'action'} .= ';locationnum='.$params->{'locationnum'} if $params->{'locationnum'}; -$params->{'action'} .= ';svcpart='.$params->{'svcpart'} if $params->{'svcpart'}; +$params->{'action'} .= ";$_=".$params->{$_} + foreach grep $params->{$_}, + qw( lock_pkgpart lock_locationnum qualnum quotationnum svcpart );