X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=httemplate%2Fedit%2Fcust_main.cgi;h=bb2a8618eb2b0861f44b938ed231f772299efac2;hb=2c757d7db4cb6a7b9655de13206fcc84fb7ce61f;hp=d10b21a4a7b7423e9d026c524f8dbfc1b60ba7a4;hpb=9e342300c380e29af1b9678f1a9604609e0061b6;p=freeside.git
diff --git a/httemplate/edit/cust_main.cgi b/httemplate/edit/cust_main.cgi
index d10b21a4a..bb2a8618e 100755
--- a/httemplate/edit/cust_main.cgi
+++ b/httemplate/edit/cust_main.cgi
@@ -35,6 +35,7 @@ if ( $cgi->param('error') ) {
$popnum = $cgi->param('popnum');
@invoicing_list = split( /\s*,\s*/, $cgi->param('invoicing_list') );
$same = $cgi->param('same');
+ $cust_main->setfield('paid' => $cgi->param('paid')) if $cgi->param('paid');
} elsif ( $cgi->keywords ) { #editing
my( $query ) = $cgi->keywords;
$query =~ /^(\d+)$/;
@@ -69,7 +70,11 @@ my $action = $custnum ? 'Edit' : 'Add';
-<%= header("Customer $action", '', ' onUnload="myclose()"') %>
+<%= include('/elements/header.html',
+ "Customer $action",
+ '',
+ ' onUnload="myclose()"'
+) %>
<% if ( $error ) { %>
Error: <%= $error %>
@@ -104,59 +109,65 @@ my $agentnum = $cust_main->agentnum || $agents[0]->agentnum; #default to first
<% } %>
+
+
<%
+my $refnum = $cust_main->refnum || $conf->config('referraldefault') || 0;
+if ( $custnum && ! $conf->exists('editreferrals') ) {
+%>
-# (referral and referring customer still need to be "template"ized)
+
-#referral
+<%
+ } else {
-my $refnum = $cust_main->refnum || $conf->config('referraldefault') || 0;
-if ( $custnum && ! $conf->exists('editreferrals') ) {
- print qq!!;
-} else {
- my(@referrals) = qsearch('part_referral',{});
- if ( scalar(@referrals) == 0 ) {
- eidiot "You have not created any advertising sources. You must create at least one advertising source before adding a customer. Go to ". popurl(2). "browse/part_referral.cgi and create one or more advertising sources.";
- } elsif ( scalar(@referrals) == 1 ) {
- $refnum ||= $referrals[0]->refnum;
- print qq!!;
- } else {
- print qq!
${r}Advertising source ";
- }
-}
+ my(@referrals) = qsearch('part_referral',{});
+ if ( scalar(@referrals) == 0 ) {
+ eidiot "You have not created any advertising sources. You must create at least one advertising source before adding a customer. Go to ". popurl(2). "browse/part_referral.cgi and create one or more advertising sources.";
+ } elsif ( scalar(@referrals) == 1 ) {
+ $refnum ||= $referrals[0]->refnum;
+%>
+
+
+
+<% } else { %>
-#referring customer
+
<%=$r%>Advertising source
+
+<% } %>
+
+<% } %>
-#print qq!
Referring Customer: !;
+
+
+<%
my $referring_cust_main = '';
if ( $cust_main->referral_custnum
and $referring_cust_main =
qsearchs('cust_main', { custnum => $cust_main->referral_custnum } )
) {
- print '
Referring Customer: '.
- $cust_main->referral_custnum. ': '.
- ( $referring_cust_main->company
- || $referring_cust_main->last. ', '. $referring_cust_main->first ).
- '';
-} elsif ( ! $conf->exists('disable_customer_referrals') ) {
- print '
Referring customer number: ';
-} else {
- print '';
-}
-
%>
+
Referring Customer:
+ <%= $cust_main->referral_custnum %>: <%= $referring_cust_main->name %>
+
+
+<% } elsif ( ! $conf->exists('disable_customer_referrals') ) { %>
+
+
Referring customer number:
+
+
+<% } else { %>
+
+
+
+<% } %>
+
@@ -227,7 +238,10 @@ Service address
-<%= include('cust_main/billing.html', $cust_main ) %>
+<%= include( 'cust_main/billing.html', $cust_main,
+ 'invoicing_list' => \@invoicing_list,
+ )
+%>
@@ -334,9 +350,11 @@ function copyelement(from, to) {
'payname', 'exp_month', 'exp_year', 'paycvv',
'paystart_month', 'paystart_year', 'payissue',
'payip',
+ 'paid',
'tax',
- 'invoicing_list', 'invoicing_list_POST', 'invoicing_list_FAX'
+ 'invoicing_list', 'invoicing_list_POST', 'invoicing_list_FAX',
+ 'spool_cdr'
) {
%>
@@ -379,49 +397,66 @@ unless ( $custnum ) {
if ( @part_pkg ) {
-# print "
First package", &itable("#cccccc", "0 ALIGN=LEFT"),
-#apiabuse & undesirable wrapping
- print "
First package", &ntable("#cccccc"),
- qq!