X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Fcust_main.cgi;h=fac7ef27c0db5a692aa7210d160a5c9a5f6de12d;hb=7b125e587a4d1ee0aca692e23ea7897f671855ae;hp=a8f202fbb937504b13b46b02daccd4d95f037442;hpb=f1da1afefb2501e1514d267612fafa87f0ac8108;p=freeside.git
diff --git a/httemplate/edit/cust_main.cgi b/httemplate/edit/cust_main.cgi
index a8f202fbb..fac7ef27c 100755
--- a/httemplate/edit/cust_main.cgi
+++ b/httemplate/edit/cust_main.cgi
@@ -1,421 +1,321 @@
-<%
+<% include('/elements/header.html',
+ "Customer $action",
+ '',
+ ' onUnload="myclose()"' #hmm, in billing.html
+) %>
+
+<% include('/elements/error.html') %>
+
+
-
+<% include('/elements/footer.html') %>
-<% if ( defined $cust_main->dbdef_table->column('ship_last') ) { %>
+<%init>
-
+my $curuser = $FS::CurrentUser::CurrentUser;
-<%
- 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($_) );
- }
- }
-%>
+#probably redundant given the checks below...
+die "access denied"
+ unless $curuser->access_right('New customer')
+ || $curuser->access_right('Edit customer');
-
-Service address
-(>same as billing address)
-<%= include('cust_main/contact.html', $cust_main, 'ship_', '', $disabled ) %>
+my $conf = new FS::Conf;
-<% } %>
+#get record
-
+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 = ();
-<%= include('cust_main/billing.html', $cust_main ) %>
+if ( $cgi->param('error') ) {
-
+ #svc_phone
+ $svc_phone{$_} = $cgi->param($_)
+ foreach qw( countrycode phonenum sip_password pin phone_name );
-