projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
time to resolve in ticket search, RT#9327
[freeside.git]
/
httemplate
/
elements
/
tr-select-cust_location.html
diff --git
a/httemplate/elements/tr-select-cust_location.html
b/httemplate/elements/tr-select-cust_location.html
index
5e938b5
..
f06ea0f
100644
(file)
--- a/
httemplate/elements/tr-select-cust_location.html
+++ b/
httemplate/elements/tr-select-cust_location.html
@@
-143,7
+143,7
@@
Example:
</SCRIPT>
<TR>
</SCRIPT>
<TR>
- <
TH ALIGN="right">Service location</TH
>
+ <
<%$th%> ALIGN="right"><% $opt{'label'} || 'Service location' %></<%$th%>
>
<TD COLSPAN=7>
<SELECT NAME="locationnum" onChange="locationnum_changed(this);">
<OPTION VALUE=""><% $opt{'empty_label'} || '(default service address)' |h %>
<TD COLSPAN=7>
<SELECT NAME="locationnum" onChange="locationnum_changed(this);">
<OPTION VALUE=""><% $opt{'empty_label'} || '(default service address)' |h %>
@@
-169,6
+169,7
@@
Example:
#'onchange' ? probably not
'disabled' => $disabled,
'no_asterisks' => 1,
#'onchange' ? probably not
'disabled' => $disabled,
'no_asterisks' => 1,
+ 'no_bold' => $opt{'no_bold'},
)
%>
)
%>
@@
-186,6
+187,7
@@
my $statedefault = $conf->config('statedefault')
my %opt = @_;
my $cgi = $opt{'cgi'};
my %opt = @_;
my $cgi = $opt{'cgi'};
+my $cust_pkg = $opt{'cust_pkg'};
my $cust_main = $opt{'cust_main'};
my $prospect_main = $opt{'prospect_main'};
my $cust_main = $opt{'cust_main'};
my $prospect_main = $opt{'prospect_main'};
@@
-212,6
+214,10
@@
if ( $locationnum && $locationnum != -1 ) {
$cust_location = new FS::cust_location;
if ( $locationnum == -1 ) {
$cust_location->$_( $cgi->param($_) ) foreach @location_fields;
$cust_location = new FS::cust_location;
if ( $locationnum == -1 ) {
$cust_location->$_( $cgi->param($_) ) foreach @location_fields;
+ } elsif ( $cust_pkg && $cust_pkg->locationnum ) {
+ my $pkg_location = $cust_pkg->cust_location;
+ $cust_location->$_( $pkg_location->$_ ) foreach @location_fields;
+ $opt{'empty_label'} ||= 'package address: '.$pkg_location->line;
} elsif ( $cust_main ) {
$cust_location->$_( $cust_main->get($prefix.$_) ) foreach @location_fields;
}
} elsif ( $cust_main ) {
$cust_location->$_( $cust_main->get($prefix.$_) ) foreach @location_fields;
}
@@
-221,4
+227,6
@@
my $disabled = ( $locationnum == -1 || ($editable && $locationnum) )
? ''
: 'DISABLED';
? ''
: 'DISABLED';
+my $th = $opt{'no_bold'} ? 'TD' : 'TH';
+
</%init>
</%init>