X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Felements%2Ftr-select-did.html;h=2aa712f794e3c121d9188774c1e239f89bdc6be3;hb=a284ef4c8d9d43db336a77db4c34996344cd5717;hp=c8a653e5736890549a91a9c3780973e9f1474b66;hpb=b153693eaaf58e5af5f454e40f9ec169128f6d92;p=freeside.git
diff --git a/httemplate/elements/tr-select-did.html b/httemplate/elements/tr-select-did.html
index c8a653e57..2aa712f79 100644
--- a/httemplate/elements/tr-select-did.html
+++ b/httemplate/elements/tr-select-did.html
@@ -1,6 +1,6 @@
<% include('tr-td-label.html', @_ ) %>
-% if ( $opt{'curr_value'} ne '' && $use_selector ) {
+% if ( $use_selector && $opt{'curr_value'} ne '' && ! $can_edit ) {
><% $opt{'formatted_value'} || $opt{'curr_value'} || $opt{'value'} |h %> |
@@ -19,12 +19,14 @@
<%init>
my %opt = @_;
-
+#warn Dumper(\%opt); if $DEBUG;
my $cell_style = $opt{'cell_style'} ? 'STYLE="'. $opt{'cell_style'}. '"' : '';
#false laziness w/select-did.html
#XXX make sure this comes through on errors too
-my $svcpart = $opt{'svcpart'} || $opt{'object'}->svcpart;
+my $svcpart = $opt{'svcpart'}
+ || $opt{'object'}->svcpart
+ || $opt{'object'}->cust_svc->svcpart;
my $part_svc = qsearchs('part_svc', { 'svcpart'=>$svcpart } );
die "unknown svcpart $svcpart" unless $part_svc;
@@ -36,4 +38,6 @@ if ( scalar(@exports) > 1 ) {
my $use_selector = scalar(@exports) ? 1 : 0;
+my $can_edit = scalar(@exports) && $exports[0]->get_dids_can_edit;
+
%init>