projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
fix nit
[freeside.git]
/
httemplate
/
edit
/
cust_main.cgi
diff --git
a/httemplate/edit/cust_main.cgi
b/httemplate/edit/cust_main.cgi
index
7343a9d
..
d84679d
100755
(executable)
--- a/
httemplate/edit/cust_main.cgi
+++ b/
httemplate/edit/cust_main.cgi
@@
-84,13
+84,12
@@
&>
% unless ($conf->exists('invoice-ship_address')) { #it's always on, so hide per-cust config
<TR>
&>
% unless ($conf->exists('invoice-ship_address')) { #it's always on, so hide per-cust config
<TR>
- <TD> </TD>
- <TD COLSPAN="7">
+ <TD COLSPAN="8">
<% include('/elements/checkbox.html',
'field' => 'invoice_ship_address',
'value' => 'Y',
'curr_value' => $cust_main->invoice_ship_address,
<% include('/elements/checkbox.html',
'field' => 'invoice_ship_address',
'value' => 'Y',
'curr_value' => $cust_main->invoice_ship_address,
- 'postfix' => emt('
included
on invoices'),
+ 'postfix' => emt('
Include service address
on invoices'),
) %>
</TD>
</TR>
) %>
</TD>
</TR>
@@
-113,7
+112,7
@@
function samechanged(what) {
t1.style.visibility = 'visible'
}
}
t1.style.visibility = 'visible'
}
}
-
//
samechanged(document.getElementById('same'));
+samechanged(document.getElementById('same'));
</SCRIPT>
<BR>
</SCRIPT>
<BR>
@@
-226,12
+225,19
@@
if ( $cgi->param('error') ) {
my %locations;
for my $pre (qw(bill ship)) {
my %hash;
my %locations;
for my $pre (qw(bill ship)) {
my %hash;
- foreach ( FS::cust_main->location_fields ) {
- $hash{$_} = scalar($cgi->param($pre.'_'.$_));
+ foreach my $locfield ( FS::cust_main->location_fields ) {
+ # don't search on lat/long, string values can cause qsearchs to die
+ next if grep {$_ eq $locfield} qw(latitude longitude);
+ $hash{$locfield} = scalar($cgi->param($pre.'_'.$locfield));
}
$hash{'custnum'} = $cgi->param('custnum');
$locations{$pre} = qsearchs('cust_location', \%hash)
|| FS::cust_location->new( \%hash );
}
$hash{'custnum'} = $cgi->param('custnum');
$locations{$pre} = qsearchs('cust_location', \%hash)
|| FS::cust_location->new( \%hash );
+ # now set lat/long, for redisplay of entered values
+ foreach my $locfield ( qw(latitude longitude) ) {
+ my $locvalue = scalar($cgi->param($pre.'_'.$locfield));
+ $locations{$pre}->set($locfield,$locvalue);
+ }
}
if ( $same ) {
$locations{ship} = $locations{bill};
}
if ( $same ) {
$locations{ship} = $locations{bill};
@@
-253,7
+259,8
@@
if ( $cgi->param('error') ) {
unless $curuser->access_right($custnum ? 'Edit customer' : 'New customer');
@invoicing_list = split( /\s*,\s*/, $cgi->param('invoicing_list') );
unless $curuser->access_right($custnum ? 'Edit customer' : 'New customer');
@invoicing_list = split( /\s*,\s*/, $cgi->param('invoicing_list') );
- $cust_main->setfield('paid' => $cgi->param('paid')) if $cgi->param('paid');
+ $cust_main->setfield( 'paid' => scalar($cgi->param('paid')) )
+ if $cgi->param('paid');
$ss = $cust_main->ss; # don't mask an entered value on errors
$stateid = $cust_main->stateid; # don't mask an entered value on errors
$payinfo = $cust_main->payinfo; # don't mask an entered value on errors
$ss = $cust_main->ss; # don't mask an entered value on errors
$stateid = $cust_main->stateid; # don't mask an entered value on errors
$payinfo = $cust_main->payinfo; # don't mask an entered value on errors