X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2FClientAPI%2FMyAccount.pm;h=8098803a5bd72bd0b39114ece89d9787942e003f;hb=096a664594b50f9ffcf09147a2369d4448293ced;hp=be87e594e702c5885120738bc129abb2f7957679;hpb=d5c51ff8d85f1f9ad64961878dcba6adb7968523;p=freeside.git diff --git a/FS/FS/ClientAPI/MyAccount.pm b/FS/FS/ClientAPI/MyAccount.pm index be87e594e..8098803a5 100644 --- a/FS/FS/ClientAPI/MyAccount.pm +++ b/FS/FS/ClientAPI/MyAccount.pm @@ -704,6 +704,14 @@ sub edit_info { $new->set( $_ => $p->{$_} ) foreach grep { exists $p->{$_} } @cust_main_editable_fields; + if ( $new->ship_address1 eq '' ) { + # then the ship address is being set to null + $new->set($_ => '') + foreach qw(ship_longitude ship_latitude ship_coord_auto ship_mobile); + } + + + my $payby = ''; if (exists($p->{'payby'})) { $p->{'payby'} =~ /^([A-Z]{4})$/ @@ -991,7 +999,7 @@ sub validate_payment { { 'cust_main' => $cust_main, #XXX or just custnum?? - 'amount' => $amount, + 'amount' => sprintf('%.2f', $amount), 'payby' => $payby, 'payinfo' => $payinfo, 'paymask' => $cust_main->mask_payinfo( $payby, $payinfo ),