X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Fcust_main.cgi;h=516423860fff0c37251121a1bef9d13c6a1958f9;hb=fb8915cce4be9520c00cc53c659e34abfb6172e1;hp=d10b21a4a7b7423e9d026c524f8dbfc1b60ba7a4;hpb=9e342300c380e29af1b9678f1a9604609e0061b6;p=freeside.git
diff --git a/httemplate/edit/cust_main.cgi b/httemplate/edit/cust_main.cgi
index d10b21a4a..516423860 100755
--- a/httemplate/edit/cust_main.cgi
+++ b/httemplate/edit/cust_main.cgi
@@ -1,427 +1,376 @@
-<%
+<& /elements/header.html,
+ $title,
+ '',
+ ' onUnload="myclose()"' #hmm, in billing.html
+&>
+
+<& /elements/error.html &>
+
+
-
-Billing address
-<%= include('cust_main/contact.html', $cust_main, '', 'bill_changed(this)', '' ) %>
+<& /elements/footer.html &>
-
+<%init>
-<% if ( defined $cust_main->dbdef_table->column('ship_last') ) { %>
+my $curuser = $FS::CurrentUser::CurrentUser;
-
+#get record
-<%
- my $checked = '';
- my $disabled = '';
- my $disabledselect = '';
- unless ( $cust_main->ship_last && $same ne 'Y' ) {
- $checked = 'CHECKED';
- $disabled = 'DISABLED style="background-color: #dddddd"';
- foreach (
- qw( last first company address1 address2 city county state zip country
- daytime night fax )
- ) {
- $cust_main->set("ship_$_", $cust_main->get($_) );
- }
- }
-%>
+my($custnum, $cust_main, $ss, $stateid, $payinfo, @invoicing_list);
+my $same = '';
+my $pkgpart_svcpart = ''; #first_pkg
+my($username, $password, $popnum, $saved_domsvc) = ( '', '', 0, 0 ); #svc_acct
+my %svc_phone = ();
+my %svc_dsl = ();
+my $prospectnum = '';
+my $locationnum = '';
-
-Service address
-(>same as billing address)
-<%= include('cust_main/contact.html', $cust_main, 'ship_', '', $disabled ) %>
+if ( $cgi->param('error') ) {
-<% } %>
+ $cust_main = new FS::cust_main ( {
+ map { $_, scalar($cgi->param($_)) } fields('cust_main')
+ } );
-
+ $custnum = $cust_main->custnum;
-<%= include('cust_main/billing.html', $cust_main ) %>
+ die "access denied"
+ unless $curuser->access_right($custnum ? 'Edit customer' : 'New customer');
-
+ #svc_phone
+ $svc_phone{$_} = $cgi->param($_)
+ foreach qw( countrycode phonenum sip_password pin phone_name );
-