summaryrefslogtreecommitdiff
path: root/httemplate/edit
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2015-07-26 15:41:26 -0700
committerIvan Kohler <ivan@freeside.biz>2015-07-26 15:41:26 -0700
commit9aee669886202be7035e6c6049fc71bc99dd3013 (patch)
tree2fd5bf6de74f3d99270587ffb1833e4188a6373d /httemplate/edit
parentac20214d38d9af00430423f147b5a0e50751b050 (diff)
parent1add633372bdca3cc7163c2ce48363fed3984437 (diff)
Merge branch 'master' of git.freeside.biz:/home/git/freeside
Diffstat (limited to 'httemplate/edit')
-rwxr-xr-xhttemplate/edit/cust_main.cgi35
-rw-r--r--httemplate/edit/cust_main/basics.html58
-rw-r--r--httemplate/edit/cust_main/billing.html40
-rw-r--r--httemplate/edit/cust_main/company.html9
-rw-r--r--httemplate/edit/cust_main/contacts_new.html16
-rw-r--r--httemplate/edit/cust_main/cust_payby.html17
-rw-r--r--httemplate/edit/cust_main/fax.html2
-rw-r--r--httemplate/edit/cust_main/first_pkg.html2
-rw-r--r--httemplate/edit/cust_main/first_pkg/svc_acct.html14
-rw-r--r--httemplate/edit/cust_main/first_pkg/svc_dsl.html16
-rw-r--r--httemplate/edit/cust_main/first_pkg/svc_phone.html12
-rw-r--r--httemplate/edit/cust_main/name.html10
-rw-r--r--httemplate/edit/cust_main/phones.html4
-rwxr-xr-xhttemplate/edit/cust_main_note.cgi8
-rwxr-xr-xhttemplate/edit/cust_pay.cgi10
-rw-r--r--httemplate/edit/elements/edit.html10
-rw-r--r--httemplate/edit/invoice_conf.html5
-rwxr-xr-xhttemplate/edit/part_pkg.cgi53
-rw-r--r--httemplate/edit/process/change-cust_pkg.html59
-rw-r--r--httemplate/edit/process/cust_pay-no_auto_apply.cgi48
-rwxr-xr-xhttemplate/edit/process/cust_pay.cgi1
-rw-r--r--httemplate/edit/prospect_main.html9
-rw-r--r--httemplate/edit/svc_circuit.html (renamed from httemplate/edit/svc_circuit.cgi)0
23 files changed, 293 insertions, 145 deletions
diff --git a/httemplate/edit/cust_main.cgi b/httemplate/edit/cust_main.cgi
index b6f6b0dea..effe84b96 100755
--- a/httemplate/edit/cust_main.cgi
+++ b/httemplate/edit/cust_main.cgi
@@ -40,7 +40,7 @@
% }
<BR>
<TABLE> <TR>
- <TD STYLE="width:650px">
+ <TD>
%#; padding-right:2px; vertical-align:top">
<FONT CLASS="fsinnerbox-title"><% mt('Billing address') |h %></FONT>
<TABLE CLASS="fsinnerbox" WIDTH="100%">
@@ -58,7 +58,7 @@
</TR>
<TR><TD STYLE="height:14px"></TD></TR>
<TR>
- <TD STYLE="width:650px">
+ <TD>
<FONT CLASS="fsinnerbox-title"><% mt('Service address') |h %></FONT>
<INPUT TYPE="checkbox"
NAME="same"
@@ -68,8 +68,8 @@
VALUE="Y"
<% $has_ship_address ? '' : 'CHECKED' %>
><% mt('same as billing address') |h %>
- <DIV CLASS="fsinnerbox">
- <TABLE ID="table_ship_location" WIDTH="100%">
+ <DIV ID="div_ship_location">
+ <TABLE WIDTH="100%" CLASS="fsinnerbox">
<& cust_main/before_ship_location.html, $cust_main &>
<& /elements/location.html,
object => $cust_main->ship_location,
@@ -80,13 +80,12 @@
&>
% unless ($conf->exists('invoice-ship_address')) { #it's always on, so hide per-cust config
<TR>
- <TD>&nbsp;</TD>
- <TD COLSPAN="7">
+ <TD COLSPAN="8">
<% 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>
@@ -96,23 +95,21 @@
</TD>
</TR></TABLE>
-<SCRIPT>
+<SCRIPT TYPE="text/javascript">
+
function samechanged(what) {
-%# not display = 'none', because we still want it to take up space
-%# document.getElementById('table_ship_location').style.visibility =
-%# what.checked ? 'hidden' : 'visible';
- var t1 = document.getElementById('table_ship_location');
if ( what.checked ) {
- t1.style.visibility = 'hidden';
- }
- else {
- t1.style.visibility = 'visible'
+ $('#div_ship_location').slideUp();
+ } else {
+ $('#div_ship_location').slideDown();
}
}
-//samechanged(document.getElementById('same'));
-</SCRIPT>
-<BR>
+% if ( ! $has_ship_address ) {
+ $('#div_ship_location').hide();
+% }
+
+</SCRIPT>
<& cust_main/contacts_new.html, 'cust_main'=>$cust_main, &>
diff --git a/httemplate/edit/cust_main/basics.html b/httemplate/edit/cust_main/basics.html
index 1c5023de9..32a03bbe6 100644
--- a/httemplate/edit/cust_main/basics.html
+++ b/httemplate/edit/cust_main/basics.html
@@ -25,22 +25,28 @@
function rescom_changed(what) {
if ( what.checked == (what.value == 'Commercial' ) ) {
- document.getElementById('company_row').style.display = '';
- document.getElementById('contacts_div').style.display = '';
- document.getElementById('spouse_row').style.display = 'none';
+ $('#company_label').slideDown();
+ $('#company_input').slideDown();
+ $('#contacts_div').slideDown();
+ $('#spouse_label').slideUp();
+ $('#spouse_last_input').slideUp();
+ $('#spouse_first_input').slideUp();
} else {
if ( document.getElementById('company').value.length == 0 ) {
- document.getElementById('company_row').style.display = 'none';
+ $('#company_label').slideUp();
+ $('#company_input').slideUp();
}
- document.getElementById('contacts_div').style.display = 'none';
- document.getElementById('spouse_row').style.display = '';
+ $('#contacts_div').slideUp();
+ $('#spouse_label').slideDown();
+ $('#spouse_last_input').slideDown();
+ $('#spouse_first_input').slideDown();
}
}
var ship_locked_agents = <% encode_json(\%ship_locked_agents) %>;
var ship_fields = [
- 'locationname', 'address1', 'city', 'state', 'zip', 'country',
+ 'locationname', 'address1',<% $conf->exists('cust_main-no_city_in_address') ? '' : q( 'city',) %> 'state', 'zip', 'country',
'latitude', 'longitude', 'district'
];
@@ -50,6 +56,7 @@
% # unlock/lock service location
var f = what.form;
+ var was_same = f['same'].checked;
if ( ship_locked_agents[agentnum] ) {
% # For this agent, the service location (except address2)
% # should be locked to the agent's location.
@@ -66,16 +73,25 @@
% # disabled, then they contain some agent's address, which is
% # no longer meaningful. So set them back to the customer's
% # current location.
+ var is_same = true;
for(var i=0; i<ship_fields.length; i++) {
x = ship_fields[i];
if ( f['ship_'+x].disabled ) {
f['ship_'+x].value = f['old_ship_'+x].value;
}
f['ship_'+x].disabled = false;
+ if ( f['bill_'+x].value != f['ship_'+x].value ) {
+ is_same = false;
+ }
}
+% # if the customer's current location has the same bill and ship
+% # address, then check the box
+ f['same'].checked = is_same;
f['same'].disabled = false;
}
- samechanged(f['same']);
+ if (f['same'].checked != was_same) {
+ samechanged(f['same']);
+ }
% # update sales dropdown
salesnum_agentnum_changed(what);
@@ -85,7 +101,13 @@
<&| /elements/onload.js &>
rescom_changed(document.getElementById('residential_commercial_Residential'));
agent_changed(document.getElementById('agentnum'));
- samechanged(document.getElementById('same'));
+
+ if ( $('#same').prop('checked') ) {
+ $('#div_ship_location').hide();
+ } else {
+ $('#div_ship_location').show();
+ }
+
</&>
</SCRIPT>
@@ -110,7 +132,7 @@
<INPUT TYPE="hidden" NAME="agentnum" ID="agentnum"
VALUE="<% $agentnum %>">
<TR>
- <TD ALIGN="right"><% mt('Agent') |h %></TD>
+ <TH ALIGN="right"><% mt('Agent') |h %></TD>
<TD CLASS="fsdisabled"><% $cust_main->agent->agent |h %></TD>
</TR>
@@ -118,7 +140,7 @@
<& /elements/tr-select-agent.html,
'curr_value' => $cust_main->agentnum,
- 'label' => "<B>${r}".emt('Agent')."</B>",
+ 'label' => $r. emt('Agent'),
'empty_label' => emt('Select agent'),
'disable_empty' => ( $cust_main->agentnum ? 1 : 0 ),
'viewall_right' => emt('None'),
@@ -131,7 +153,7 @@
% if ( $conf->exists('cust_main-edit_agent_custid') ) {
<TR>
- <TD ALIGN="right"><% mt('Customer identifier') |h %></TD>
+ <TH ALIGN="right"><% mt('Customer identifier') |h %></TD>
<TD><INPUT TYPE="text" NAME="agent_custid" VALUE="<% $cust_main->agent_custid %>"></TD>
</TR>
@@ -157,6 +179,7 @@
%#sales person
<& /elements/tr-select-sales.html,
'curr_value' => $cust_main->salesnum,
+ 'th' => 1,
&>
%# referral (advertising source)
@@ -169,7 +192,7 @@
<& /elements/tr-select-part_referral.html,
'curr_value' => $refnum,
- 'label' => "<B>${r}".emt('Advertising source')."</B>"
+ 'label' => $r. emt('Advertising source'),
&>
% }
@@ -183,7 +206,7 @@
%) {
<TR>
- <TD ALIGN="right"><% mt('Referring customer') |h %></TD>
+ <TH ALIGN="right"><% mt('Referring customer') |h %></TD>
<TD>
<A HREF="<% popurl(1) %>/cust_main.cgi?<% $cust_main->referral_custnum %>"><% $cust_main->referral_custnum %>: <% $referring_cust_main->name |h %></A>
</TD>
@@ -193,7 +216,7 @@
% } elsif ( ! $conf->exists('disable_customer_referrals') ) {
<TR>
- <TD ALIGN="right"><% mt('Referring customer') |h %></TD>
+ <TH ALIGN="right"><% mt('Referring customer') |h %></TD>
<TD>
<& /elements/search-cust_main.html,
'field_name' => 'referral_custnum',
@@ -284,7 +307,10 @@ foreach (qsearch('agent',{})) {
my $agent_ship_location = $cust_main->ship_location;
$ship_locked_agents{$agentnum} = +{
map { $_ => $agent_ship_location->$_ }
- qw(locationname address1 city state zip country latitude longitude district)
+ (
+ qw(locationname address1 state zip country latitude longitude district),
+ ($conf->exists('cust_main-no_city_in_address') ? () : 'city')
+ )
};
}
diff --git a/httemplate/edit/cust_main/billing.html b/httemplate/edit/cust_main/billing.html
index d25e88712..6f716c1be 100644
--- a/httemplate/edit/cust_main/billing.html
+++ b/httemplate/edit/cust_main/billing.html
@@ -15,7 +15,7 @@
<BR><FONT CLASS="fsinnerbox-title"><% mt('Billing information') |h %></FONT>
- <% &ntable("#cccccc") %>
+ <TABLE CLASS="fsinnerbox">
% my $curuser = $FS::CurrentUser::CurrentUser;
@@ -63,7 +63,7 @@
% #escape $exempt_group for NAME etc.
% my $checked = ($cust_main_exemption || $cgi->param("tax_$exempt_group"));
<TR>
- <TD>&nbsp;&nbsp;<INPUT TYPE="checkbox" NAME="tax_<% $exempt_group %>" ID="tax_<% $exempt_group %>" VALUE="Y" <% $checked ? 'CHECKED' : '' %> onChange="tax_changed(this)"> Tax Exempt (<% $exempt_group %> taxes)</TD>
+ <TD STYLE="white-space:nowrap">&nbsp;&nbsp;<INPUT TYPE="checkbox" NAME="tax_<% $exempt_group %>" ID="tax_<% $exempt_group %>" VALUE="Y" <% $checked ? 'CHECKED' : '' %> onChange="tax_changed(this)"> Tax Exempt (<% $exempt_group %> taxes)</TD>
<TD> - Exemption number <INPUT TYPE="text" NAME="tax_<% $exempt_group %>_num" ID="tax_<% $exempt_group %>_num" VALUE="<% $cgi->param("tax_$exempt_group".'_num') || ( $cust_main_exemption ? $cust_main_exemption->exempt_number : '' ) |h %>" <% $checked ? '' : 'DISABLED' %>></TD>
</TR>
% }
@@ -108,7 +108,7 @@
% unless ( $conf->exists('cust-email-high-visibility')) {
<TR>
- <TD ALIGN="right" WIDTH="200">
+ <TH ALIGN="right" WIDTH="200">
<% $conf->exists('cust_main-require_invoicing_list_email', $agentnum)
? $r : '' %>Email address(es)
</TD>
@@ -117,7 +117,7 @@
( $cust_main->message_noemail eq 'Y' )
? 'CHECKED'
: ''
- %>> <% emt('Do not send notices') %>
+ %>> <FONT SIZE="-1"><% emt('Do not send notices') %></FONT>
</TD>
</TR>
% }
@@ -128,11 +128,25 @@
% if ( $conf->exists('cust_main-select-prorate_day') ) {
<TR>
- <TD ALIGN="right" WIDTH="200"><% mt('Prorate day (1-28)') |h %> </TD>
+ <TH ALIGN="right" WIDTH="200"><% mt('Prorate day') |h %> </TD>
<TD>
- <INPUT TYPE="text" NAME="prorate_day" VALUE="<% $cust_main->prorate_day %>" SIZE=3 MAXLENGTH=2>
+ <SELECT NAME="prorate_day">
+ <% prorate_day_options($cust_main->prorate_day) %>
+ </SELECT>
</TD>
</TR>
+
+% sub prorate_day_options {
+% my $curr_value = shift;
+% my $ret = '';
+% for my $prorate_day ( 1 .. 28 ) {
+% my $sel = '';
+% $sel = "SELECTED='SELECTED'" if $curr_value == $prorate_day;
+% $ret .= "<OPTION VALUE='$prorate_day' $sel>$prorate_day</OPTION>";
+% }
+% $ret;
+% }
+
% } else {
<INPUT TYPE="hidden" NAME="prorate_day" VALUE="<% $cust_main->prorate_day %>">
% }
@@ -142,7 +156,7 @@
% ###
<TR>
- <TD ALIGN="right" WIDTH="200"><% mt('Charge card/e-check on this day of the month') |h %> </TD>
+ <TH ALIGN="right" WIDTH="200"><% mt('Charge card/e-check on this day of the month') |h %> </TD>
<TD>
<SELECT NAME="billday">
<% billday_options($cust_main->billday) %>
@@ -166,7 +180,7 @@
% ###
<TR>
- <TD ALIGN="right" WIDTH="200"><% mt('Invoice terms') |h %> </TD>
+ <TH ALIGN="right" WIDTH="200"><% mt('Invoice terms') |h %> </TD>
<TD WIDTH="408">
<& /elements/select-terms.html,
'curr_value' => $cust_main->invoice_terms,
@@ -180,7 +194,7 @@
% ###
<TR>
- <TD ALIGN="right" WIDTH="200"><% mt('Credit limit') |h %> </TD>
+ <TH ALIGN="right" WIDTH="200"><% mt('Credit limit') |h %> </TD>
<TD WIDTH="408">
<SCRIPT TYPE="text/javascript">
function toggle(obj) {
@@ -198,12 +212,14 @@ function toggle(obj) {
VALUE = 1
onClick="toggle(this)"
<% length($cust_main->credit_limit) ? '' : ' CHECKED'%>
- > <% $default_credit_limit
+ > <FONT SIZE="-1" COLOR="#333333">
+ <% $default_credit_limit
? "Default ($money_char". sprintf("%.2f", $default_credit_limit).
")"
: mt('Unlimited')
|h
- %>
+ %>
+ </FONT>
</TD>
</TR>
@@ -250,7 +266,7 @@ function toggle(obj) {
% if ( $show_term || $cust_main->cdr_termination_percentage ) {
<TR>
- <TD ALIGN="right"><% mt('CDR termination settlement') |h %></TD>
+ <TH ALIGN="right"><% mt('CDR termination settlement') |h %></TD>
<TD><INPUT TYPE = "text"
NAME = "cdr_termination_percentage"
SIZE = 6
diff --git a/httemplate/edit/cust_main/company.html b/httemplate/edit/cust_main/company.html
index 8a6ed0bbf..3341d8011 100644
--- a/httemplate/edit/cust_main/company.html
+++ b/httemplate/edit/cust_main/company.html
@@ -1,7 +1,8 @@
% my $cust_main = shift;
-<TR ID="company_row" <% $cust_main->company ? '' : 'STYLE="display:none"' %>>
- <TD ALIGN="right"><% mt('Company') |h %></TD>
- <TD COLSPAN=6><INPUT TYPE="text" NAME="company" ID="company" SIZE=60
+% my $style = $cust_main->company ? '' : 'STYLE="display:none"';
+<TR ID="company_row">
+ <TH ALIGN="right"><DIV ID="company_label" <%$style%>><% mt('Company') |h %></DIV></TD>
+ <TD COLSPAN=6><DIV ID="company_input" <%$style%>><INPUT TYPE="text" NAME="company" ID="company" SIZE=60
VALUE="<% $cust_main->company |h %>">
- </TD>
+ </DIV></TD>
</TR>
diff --git a/httemplate/edit/cust_main/contacts_new.html b/httemplate/edit/cust_main/contacts_new.html
index 9ccb45f6a..1171e7df4 100644
--- a/httemplate/edit/cust_main/contacts_new.html
+++ b/httemplate/edit/cust_main/contacts_new.html
@@ -1,12 +1,15 @@
<DIV ID="contacts_div" STYLE="display:<% $display %>">
+<BR>
<FONT CLASS="fsinnerbox-title">Contacts</FONT>
<% include('/edit/elements/edit.html',
- 'embed' => $opt{cust_main},
- 'table' => 'cust_main',
- 'labels' => { 'contactnum' => '', #'Contact',
- #'locationnum' => '&nbsp;',
- },
- 'fields' => [
+ 'embed' => $opt{cust_main},
+ 'table' => 'cust_main',
+ 'agent_virt' => 1,
+ 'html_table_class' => 'fsinnerbox',
+ 'labels' => { 'contactnum' => '', #'Contact',
+ #'locationnum' => '&nbsp;',
+ },
+ 'fields' => [
{ 'field' => 'contactnum',
'type' => 'contact',
'colspan' => 6,
@@ -17,7 +20,6 @@
'm2_error_callback' => $m2_error_callback,
},
],
- 'agent_virt' => 1,
)
%>
</DIV>
diff --git a/httemplate/edit/cust_main/cust_payby.html b/httemplate/edit/cust_main/cust_payby.html
index cf0ada982..589c6a77b 100644
--- a/httemplate/edit/cust_main/cust_payby.html
+++ b/httemplate/edit/cust_main/cust_payby.html
@@ -1,11 +1,13 @@
<% include('/edit/elements/edit.html',
- 'embed' => $opt{cust_main},
- 'tablenum' => 1,
- 'table' => 'cust_main',
- 'labels' => { 'custpaybynum' => '',
- #'locationnum' => '&nbsp;',
- },
- 'fields' => [
+ 'embed' => $opt{cust_main},
+ 'tablenum' => 1,
+ 'table' => 'cust_main',
+ 'agent_virt' => 1,
+ 'html_table_class' => 'fsinnerbox',
+ 'labels' => { 'custpaybynum' => '',
+ #'locationnum' => '&nbsp;',
+ },
+ 'fields' => [
{ 'field' => 'custpaybynum',
'type' => 'cust_payby',
'colspan' => 6,
@@ -16,7 +18,6 @@
'm2_error_callback' => $m2_error_callback,
},
],
- 'agent_virt' => 1,
)
%>
</DIV>
diff --git a/httemplate/edit/cust_main/fax.html b/httemplate/edit/cust_main/fax.html
index 237d4be44..c3e9917f4 100644
--- a/httemplate/edit/cust_main/fax.html
+++ b/httemplate/edit/cust_main/fax.html
@@ -1,5 +1,5 @@
% my $cust_main = shift;
<TR>
- <TD ALIGN="right"><% mt('Fax') |h %></TD>
+ <TH ALIGN="right"><% mt('Fax') |h %></TD>
<TD><INPUT TYPE="text" NAME="fax" VALUE="<% $cust_main->fax %>" SIZE=18></TD>
</TR>
diff --git a/httemplate/edit/cust_main/first_pkg.html b/httemplate/edit/cust_main/first_pkg.html
index ad118b4a9..6845b2c90 100644
--- a/httemplate/edit/cust_main/first_pkg.html
+++ b/httemplate/edit/cust_main/first_pkg.html
@@ -8,7 +8,7 @@
<BR>
<FONT CLASS="fsinnerbox-title"><% mt('First package') |h %></FONT>
- <% ntable("#cccccc") %>
+ <TABLE BORDER=0 CELLSPACING=0>
<TR>
<TD COLSPAN=2>
diff --git a/httemplate/edit/cust_main/first_pkg/svc_acct.html b/httemplate/edit/cust_main/first_pkg/svc_acct.html
index 717bf5025..8308af431 100644
--- a/httemplate/edit/cust_main/first_pkg/svc_acct.html
+++ b/httemplate/edit/cust_main/first_pkg/svc_acct.html
@@ -1,7 +1,7 @@
-<% ntable("#cccccc") %>
+<TABLE CLASS="fsinnerbox">
<TR>
- <TD ALIGN="right"><% mt('Username') |h %></TD>
+ <TH ALIGN="right"><% mt('Username') |h %></TD>
<TD>
<INPUT TYPE = "text"
NAME = "username"
@@ -13,7 +13,7 @@
</TR>
<TR>
- <TD ALIGN="right"><% mt('Domain') |h %></TD>
+ <TH ALIGN="right"><% mt('Domain') |h %></TD>
<TD>
<SELECT NAME="domsvc">
<OPTION>(<% mt('none') |h %>)</OPTION>
@@ -22,7 +22,7 @@
</TR>
<TR>
- <TD ALIGN="right"><% mt('Password') |h %></TD>
+ <TH ALIGN="right"><% mt('Password') |h %></TD>
<TD>
<INPUT TYPE = "text"
NAME = "_password"
@@ -37,7 +37,7 @@
% if ( $opt{'password_verify'} ) {
<TR>
- <TD ALIGN="right"><% mt('Re-enter Password') |h %></TD>
+ <TH ALIGN="right"><% mt('Re-enter Password') |h %></TD>
<TD>
<INPUT TYPE = "text"
NAME = "_password2"
@@ -50,7 +50,7 @@
% if ( $conf->exists('security_phrase') ) {
<TR>
- <TD ALIGN="right"><% mt('Security Phrase') |h %></TD>
+ <TH ALIGN="right"><% mt('Security Phrase') |h %></TD>
<TD><INPUT TYPE="text" NAME="sec_phrase" VALUE="<% $opt{'sec_phrase'} |h %>">
</TD>
</TR>
@@ -62,7 +62,7 @@
<INPUT TYPE="hidden" NAME="popnum" VALUE="">
% } else {
<TR>
- <TD ALIGN="right"><% mt('Access number') |h %></TD>
+ <TH ALIGN="right"><% mt('Access number') |h %></TD>
%# XXX should gain "area code" selection and labels on the dropdowns
<TD><% FS::svc_acct_pop::popselector($opt{'popnum'}) %></TD>
</TR>
diff --git a/httemplate/edit/cust_main/first_pkg/svc_dsl.html b/httemplate/edit/cust_main/first_pkg/svc_dsl.html
index 971f4be33..31f4b5c63 100644
--- a/httemplate/edit/cust_main/first_pkg/svc_dsl.html
+++ b/httemplate/edit/cust_main/first_pkg/svc_dsl.html
@@ -1,4 +1,4 @@
-<% ntable("#cccccc") %>
+<TABLE CLASS="fsinnerbox">
% if ( $opt{'phonenum'} ) {
@@ -6,12 +6,12 @@
<INPUT TYPE="hidden" NAME="phonenum" VALUE="<% $opt{'phonenum'} %>">
<TR>
- <TD ALIGN="right">Loop Type</TD>
+ <TH ALIGN="right">Loop Type</TD>
<TD BGCOLOR="#eeeeee">Line-share</TD>
</TR>
<TR>
- <TD ALIGN="right">Phone Number</TD>
+ <TH ALIGN="right">Phone Number</TD>
<TD BGCOLOR="#eeeeee"><% $opt{'phonenum'} %></TD>
</TR>
@@ -21,14 +21,14 @@
<INPUT TYPE="hidden" NAME="phonenum" VALUE="">
<TR>
- <TD ALIGN="right">Loop Type</TD>
+ <TH ALIGN="right">Loop Type</TD>
<TD BGCOLOR="#eeeeee">Standalone</TD>
</TR>
% }
<TR>
- <TD ALIGN="right">PPPoE password</TD>
+ <TH ALIGN="right">PPPoE password</TD>
<TD>
<INPUT TYPE = "text"
NAME = "password"
@@ -38,7 +38,7 @@
</TR>
<TR>
- <TD ALIGN="right">ISP Changing?</TD>
+ <TH ALIGN="right">ISP Changing?</TD>
<TD>
<INPUT TYPE = "checkbox"
NAME = "isp_chg"
@@ -49,7 +49,7 @@
</TR>
<TR>
- <TD ALIGN="right">Current or Previous ISP</TD>
+ <TH ALIGN="right">Current or Previous ISP</TD>
<TD>
<INPUT TYPE = "text"
NAME = "isp_prev"
@@ -60,7 +60,7 @@
<INPUT TYPE="hidden" NAME="vendor_qual_id" VALUE="<% $opt{'vendor_qual_id'} %>">
<TR>
- <TD ALIGN="right">Vendor Qualification ID</TD>
+ <TH ALIGN="right">Vendor Qualification ID</TD>
<TD BGCOLOR="#eeeeee"><% $opt{'vendor_qual_id'} %></TD>
</TR>
diff --git a/httemplate/edit/cust_main/first_pkg/svc_phone.html b/httemplate/edit/cust_main/first_pkg/svc_phone.html
index 70e013ece..65c677847 100644
--- a/httemplate/edit/cust_main/first_pkg/svc_phone.html
+++ b/httemplate/edit/cust_main/first_pkg/svc_phone.html
@@ -1,8 +1,8 @@
-<% ntable("#cccccc") %>
+<TABLE CLASS="fsinnerbox">
%#XXX this should be hidden or something in most/all cases
<TR>
- <TD ALIGN="right" ID="countrycode_label_td">Country code</TD>
+ <TH ALIGN="right" ID="countrycode_label_td">Country code</TD>
<TD ID="countrycode_td">
<INPUT TYPE = "text"
NAME = "countrycode"
@@ -21,7 +21,7 @@
%# )
%#%>
<TR>
- <TD ALIGN="right" ID="phonenum_label_td">Phone Number</TD>
+ <TH ALIGN="right" ID="phonenum_label_td">Phone Number</TD>
<TD ID="phonenum_td">
<INPUT TYPE = "text"
NAME = "phonenum"
@@ -34,7 +34,7 @@
</TR>
<TR>
- <TD ALIGN="right" ID="sip_password_label_td">SIP password</TD>
+ <TH ALIGN="right" ID="sip_password_label_td">SIP password</TD>
<TD ID="sip_password_td">
<INPUT TYPE = "text"
NAME = "sip_password"
@@ -46,7 +46,7 @@
</TR>
<TR>
- <TD ALIGN="right" ID="pin_label_td">Voicemail PIN</TD>
+ <TH ALIGN="right" ID="pin_label_td">Voicemail PIN</TD>
<TD ID="pin_td">
<INPUT TYPE = "text"
NAME = "pin"
@@ -60,7 +60,7 @@
%#XXX this should be hidden or something in most/all cases
<TR>
- <TD ALIGN="right" ID="phone_name_label_td">Name</TD>
+ <TH ALIGN="right" ID="phone_name_label_td">Name</TD>
<TD ID="phone_name_td">
<INPUT TYPE = "text"
NAME = "phone_name"
diff --git a/httemplate/edit/cust_main/name.html b/httemplate/edit/cust_main/name.html
index 74b2a7b5b..13bd09764 100644
--- a/httemplate/edit/cust_main/name.html
+++ b/httemplate/edit/cust_main/name.html
@@ -1,13 +1,13 @@
<%def .namepart>
% my ($field, $value, $label, $extra) = @_;
-<DIV STYLE="display: inline-block">
+<DIV STYLE="display: inline-block" ID="<% $field %>_input">
<INPUT TYPE="text" NAME="<% $field %>" VALUE="<% $value |h %>" <%$extra%>>
- <BR><FONT SIZE=-1><% mt($label) %></FONT>
+ <BR><FONT SIZE="-1" COLOR="#333333"><% mt($label) %></FONT>
</DIV>
</%def>
<TR>
- <TD CLASS="required label"><% mt('Contact name') |h %></TD>
+ <TH CLASS="required label" ALIGN="right"><% mt('Contact name') |h %></TD>
<TD COLSPAN=6 STYLE="vertical-align:top">
<& .namepart, 'last', $cust_main->last, 'Last', ',' &>
<& .namepart, 'first', $cust_main->first, 'First' &>
@@ -21,7 +21,7 @@
</TR>
% if ( $conf->exists('cust_main-enable_spouse') ) {
<TR ID="spouse_row">
- <TD CLASS="label"><% mt('Spouse\'s name') |h %></TD>
+ <TH CLASS="label" ALIGN="right"><DIV ID="spouse_label"><% mt('Spouse\'s name') |h %></DIV></TD>
<TD COLSPAN=6>
<& .namepart, 'spouse_last', $cust_main->spouse_last, 'Last', ',' &>
<& .namepart, 'spouse_first', $cust_main->spouse_first, 'First' &>
@@ -31,7 +31,7 @@
% if ( $conf->exists('cust-email-high-visibility') ) {
<TR>
- <TD ALIGN="right" CLASS="
+ <TH ALIGN="right" CLASS="
<% $conf->exists('cust_main-require_invoicing_list_email', $agentnum)
? 'required label'
: 'label' %>">Email address(es)
diff --git a/httemplate/edit/cust_main/phones.html b/httemplate/edit/cust_main/phones.html
index 9b23e0716..fa915f540 100644
--- a/httemplate/edit/cust_main/phones.html
+++ b/httemplate/edit/cust_main/phones.html
@@ -1,5 +1,5 @@
<TR>
- <TD VALIGN="top" ALIGN="right"><% mt('Phones') |h %></TD>
+ <TH VALIGN="top" ALIGN="right"><% mt('Phones') |h %></TD>
<TD COLSPAN=6>
<TABLE CELLSPACING=0 CELLPADDING=0>
<TR>
@@ -10,7 +10,7 @@
VALUE="<% $cust_main->get($phone) %>"
SIZE=18
>
- <BR><FONT SIZE=-1><% mt($phone_label{$phone}) |h %></FONT>
+ <BR><FONT SIZE=-1 COLOR="#333333"><% mt($phone_label{$phone}) |h %></FONT>
</TD>
<TD>&nbsp;</TD>
% }
diff --git a/httemplate/edit/cust_main_note.cgi b/httemplate/edit/cust_main_note.cgi
index a089db2d1..9ae29c2f1 100755
--- a/httemplate/edit/cust_main_note.cgi
+++ b/httemplate/edit/cust_main_note.cgi
@@ -23,8 +23,12 @@
join '', split /<br \/>|&nbsp;/, $comment
%></TEXTAREA>
% } else {
- <& /elements/htmlarea.html, 'field' => 'comment_html',
- 'curr_value' => $comment
+ <& /elements/htmlarea.html,
+ 'field' => 'comment_html',
+ 'curr_value' => $comment,
+ 'config' => { toolbarStartupExpanded => JSON::false,
+ height => 315,
+ },
&>
% }
diff --git a/httemplate/edit/cust_pay.cgi b/httemplate/edit/cust_pay.cgi
index 888335fbb..5d74365e7 100755
--- a/httemplate/edit/cust_pay.cgi
+++ b/httemplate/edit/cust_pay.cgi
@@ -87,15 +87,17 @@
<TD ALIGN="right"><% mt('Auto-apply to invoices') |h %></TD>
<TD COLSPAN=2>
<SELECT NAME="apply">
- <OPTION VALUE="yes" SELECTED><% mt('yes') |h %>
- <OPTION><% mt('no') |h %></SELECT>
- </TD>
+ <OPTION VALUE="yes" SELECTED><% mt('yes') |h %></OPTION>
+ <OPTION VALUE=""><% mt('not now') |h %></OPTION>
+ <OPTION VALUE="never"><% mt('never') |h %></OPTION>
+ </SELECT>
+ </TD>
% } elsif ( $link eq 'invnum' ) {
<TD ALIGN="right"><% mt('Apply to') |h %></TD>
<TD COLSPAN=2 BGCOLOR="#ffffff">Invoice #<B><% $linknum %></B> only</TD>
- <INPUT TYPE="hidden" NAME="apply" VALUE="no">
+ <INPUT TYPE="hidden" NAME="apply" VALUE="">
% }
</TR>
diff --git a/httemplate/edit/elements/edit.html b/httemplate/edit/elements/edit.html
index 7b02994d1..c6d45531e 100644
--- a/httemplate/edit/elements/edit.html
+++ b/httemplate/edit/elements/edit.html
@@ -7,7 +7,7 @@ Example:
# (preferred, will be pluralized automatically)
'name' => #name for the record
# (deprecated, will be pluralized simplistically)
- 'table' =>
+ 'table' => #database table
#? 'primary_key' => #required when the dbdef doesn't know...???
'labels' => {
@@ -135,6 +135,8 @@ Example:
'form_init' => '', #after html_init, error and the opening <FORM>, but
#before any other form contents
+ 'html_table_class' => '', #HTML <TABLE CLASS=
+
#string or coderef of additional HTML to add before </TABLE>
'html_table_bottom' => '',
@@ -270,7 +272,11 @@ Example:
% }
% my $tablenum = $opt{'tablenum'} || 0;
-<TABLE ID="TableNumber<% $tablenum++ %>" BGCOLOR="#cccccc" BORDER=0 CELLSPACING=0>
+<TABLE ID="TableNumber<% $tablenum++ %>"
+ <% $opt{html_table_class} ? 'CLASS="'. $opt{html_table_class}. '"'
+ : 'BGCOLOR="#cccccc" BORDER=0 CELLSPACING=0'
+ %>
+>
% my $g_row = 0;
% my @g_row_stack = ();
diff --git a/httemplate/edit/invoice_conf.html b/httemplate/edit/invoice_conf.html
index 7122653f2..861114b1c 100644
--- a/httemplate/edit/invoice_conf.html
+++ b/httemplate/edit/invoice_conf.html
@@ -49,6 +49,7 @@ my @fields = (
'Footer',
'Summary header',
'Return address',
+ 'Watermark',
'Small footer',
'Enable coupon',
),
@@ -59,6 +60,7 @@ my @fields = (
{ field => 'latexfooter', %textarea },
{ field => 'latexsummary', %textarea },
{ field => 'latexreturnaddress', %textarea },
+ { field => 'latexwatermark', %textarea },
{ field => 'latexsmallfooter', %textarea },
{ field => 'with_latexcoupon', type => 'checkbox', value => 'Y' },
@@ -68,6 +70,7 @@ my @fields = (
{ field => 'htmlfooter', %textarea },
{ field => 'htmlsummary', %textarea },
{ field => 'htmlreturnaddress', %textarea },
+ { field => 'htmlwatermark', %textarea },
# logo
{ type => 'columnend' },
@@ -87,12 +90,14 @@ my %labels = (
latexfooter
latexsummary
latexreturnaddress
+ latexwatermark
with_latexcoupon
latexsmallfooter
htmlnotes
htmlfooter
htmlsummary
htmlreturnaddress
+ htmlwatermark
) ),
);
diff --git a/httemplate/edit/part_pkg.cgi b/httemplate/edit/part_pkg.cgi
index bfa5d50ea..9f5510d65 100755
--- a/httemplate/edit/part_pkg.cgi
+++ b/httemplate/edit/part_pkg.cgi
@@ -28,7 +28,7 @@
'onsubmit' => 'confirm_submit',
- 'labels' => {
+ 'labels' => {
'pkgpart' => 'Package Definition',
'pkg' => 'Package',
%locale_field_labels,
@@ -69,6 +69,10 @@
'supp_dst_pkgpart' => 'When ordering package, also order',
'report_option' => 'Report classes',
'delay_start' => 'Default delay (days)',
+ 'adjourn_months' => 'Suspend the package after ',
+ 'contract_end_months' => 'Contract ends after ',
+ 'expire_months' => 'Cancel the package after ',
+ 'change_to_pkgpart'=> 'and replace it with ',
},
'fields' => [
@@ -164,6 +168,37 @@
sort $conf->config('currencies')
),
+ ( $conf->exists('part_pkg-delay_start')
+ ? ( { type => 'tablebreak-tr-title',
+ value => 'Delayed start',
+ },
+ { field => 'delay_start',
+ type => 'text', size => 6 },
+ )
+ : ()
+ ),
+
+ { type => 'tablebreak-tr-title',
+ value => 'Limited duration',
+ },
+ { field => 'adjourn_months',
+ type => 'select-months',
+ },
+ { field => 'contract_end_months',
+ type => 'select-months',
+ },
+ { field => 'expire_months',
+ type => 'select-expire_months',
+ },
+ { field => 'change_to_pkgpart',
+ type => 'select-part_pkg',
+ extra_sql => sub { $pkgpart
+ ? "AND pkgpart != $pkgpart"
+ : ''
+ },
+ empty_label => 'no package',
+ },
+
#price plan
#setup fee
#recurring frequency
@@ -200,7 +235,6 @@
include_opt_callback =>
sub { pkgpart => $_[0]->pkgpart },
},
-
{ type => 'tablebreak-tr-title',
value => 'Promotions', #better name?
@@ -220,16 +254,6 @@
)
),
- ( $conf->exists('part_pkg-delay_start')
- ? ( { type => 'tablebreak-tr-title',
- value => 'Delayed start',
- },
- { field => 'delay_start',
- type => 'text', size => 6 },
- )
- : ()
- ),
-
{ type => 'columnnext' },
{type=>'justtitle', value=>'Agent (reseller) types' },
@@ -1219,6 +1243,11 @@ my $field_callback = sub {
};
$fieldref->{layer_fields} = \%taxproduct_fields;
$fieldref->{layer_values_callback} = $taxproduct_values;
+ } elsif ($field eq 'taxproductnum') { # part_pkg-taxproduct, new style
+ if ( !$taxproducts ) {
+ # then make the widget go away
+ $fieldref->{type} = 'hidden';
+ }
}
};
diff --git a/httemplate/edit/process/change-cust_pkg.html b/httemplate/edit/process/change-cust_pkg.html
index 96175e1e4..046a9795c 100644
--- a/httemplate/edit/process/change-cust_pkg.html
+++ b/httemplate/edit/process/change-cust_pkg.html
@@ -41,34 +41,43 @@ if ( $cgi->param('locationnum') == -1 ) {
}
my $error;
-if ( $cgi->param('delay') ) {
- my $date = parse_datetime($cgi->param('start_date'));
- if (!$date) {
- $error = "Invalid change date '".$cgi->param('start_date')."'.";
- } elsif ( $date < time ) {
- $error = "Change date ".$cgi->param('start_date')." is in the past.";
- } else {
- # schedule the change
- $change{'start_date'} = $date;
- $error = $cust_pkg->change_later(\%change);
- }
-} else {
- # special case: if there's a package change scheduled, and it matches
- # the parameters the user requested this time, then change to the existing
- # future package.
- if ( $cust_pkg->change_to_pkgnum ) {
- my $change_to = FS::cust_pkg->by_key($cust_pkg->change_to_pkgnum);
- if ( $change_to->pkgpart == $change{'pkgpart'} and
- $change_to->locationnum == $change{'locationnum'} ) {
-
- %change = ( 'cust_pkg' => $change_to );
+my $now = time;
+if (defined($cgi->param('contract_end'))) {
+ $change{'contract_end'} = parse_datetime($cgi->param('contract_end'));
+}
+unless ($error) {
+ if ( $cgi->param('delay') ) {
+ my $date = parse_datetime($cgi->param('start_date'));
+ if (!$date) {
+ $error = "Invalid change date '".$cgi->param('start_date')."'.";
+ } elsif ( $date < $now ) {
+ $error = "Change date ".$cgi->param('start_date')." is in the past.";
+ } else {
+ # schedule the change
+ $change{'start_date'} = $date;
+ $error = $cust_pkg->change_later(\%change);
+ }
+ } else {
+ # special case: if there's a package change scheduled, and it matches
+ # the parameters the user requested this time, then change to the existing
+ # future package.
+ if ( $cust_pkg->change_to_pkgnum ) {
+ my $change_to = FS::cust_pkg->by_key($cust_pkg->change_to_pkgnum);
+ if (
+ $change_to->pkgpart == $change{'pkgpart'} and
+ $change_to->locationnum == $change{'locationnum'} and
+ $change_to->quantity == $change{'quantity'} and
+ $change_to->contract_end == $change{'contract_end'}
+ ) {
+ %change = ( 'cust_pkg' => $change_to );
+ }
}
- }
- # do a package change right now
- my $pkg_or_error = $cust_pkg->change( \%change );
- $error = ref($pkg_or_error) ? '' : $pkg_or_error;
+ # do a package change right now
+ my $pkg_or_error = $cust_pkg->change( \%change );
+ $error = ref($pkg_or_error) ? '' : $pkg_or_error;
+ }
}
</%init>
diff --git a/httemplate/edit/process/cust_pay-no_auto_apply.cgi b/httemplate/edit/process/cust_pay-no_auto_apply.cgi
new file mode 100644
index 000000000..ccbd2d7b5
--- /dev/null
+++ b/httemplate/edit/process/cust_pay-no_auto_apply.cgi
@@ -0,0 +1,48 @@
+<%doc>
+Quick process for toggling no_auto_apply field in cust_pay.
+
+Requires paynum and no_auto_apply ('Y' or '') in cgi.
+
+Requires 'Apply payment' acl.
+</%doc>
+
+% if ($error) {
+
+<P STYLE="color: #FF0000"><% emt($error) %></P>
+
+% } else {
+
+<P STYLE="font-weight: bold;"><% emt($message) %></P>
+<P><% emt('Please wait while the page reloads.') %></P>
+<SCRIPT TYPE="text/javascript">
+window.top.location.reload();
+</SCRIPT>
+
+% }
+
+<%init>
+die "access denied"
+ unless $FS::CurrentUser::CurrentUser->access_right('Apply payment');
+
+my $paynum = $cgi->param('paynum');
+my $noauto = $cgi->param('no_auto_apply');
+
+my $error = '';
+my $message = '';
+my $cust_pay = qsearchs('cust_pay',{ paynum => $paynum });
+if ($cust_pay) {
+ if (($noauto eq 'Y') || (defined($noauto) && (length($noauto) == 0))) {
+ $cust_pay->no_auto_apply($noauto);
+ $error = $cust_pay->replace;
+ $message = $noauto ?
+ q(Payment will not be automatically applied to open invoices, must be applied manually) :
+ q(Payment will be automatically applied to open invoices the next time this customer's payments are processed);
+ } else {
+ $error = 'no_auto_apply not specified';
+ }
+} else {
+ $error .= 'Payment could not be found in database';
+}
+
+
+</%init>
diff --git a/httemplate/edit/process/cust_pay.cgi b/httemplate/edit/process/cust_pay.cgi
index a002fa181..56d3f2ff1 100755
--- a/httemplate/edit/process/cust_pay.cgi
+++ b/httemplate/edit/process/cust_pay.cgi
@@ -50,6 +50,7 @@ else {
my $new = new FS::cust_pay ( {
$field => $linknum,
_date => $_date,
+ no_auto_apply => ($cgi->param('apply') eq 'never') ? 'Y' : '',
map {
$_, scalar($cgi->param($_));
} qw( paid payby payinfo paybatch
diff --git a/httemplate/edit/prospect_main.html b/httemplate/edit/prospect_main.html
index 1269a84ed..fb6751532 100644
--- a/httemplate/edit/prospect_main.html
+++ b/httemplate/edit/prospect_main.html
@@ -1,6 +1,7 @@
<% include('elements/edit.html',
'name_singular' => 'prospect',
'table' => 'prospect_main',
+ 'html_table_class'=> 'fsinnerbox',
'labels' => { 'prospectnum' => 'Prospect',
'agentnum' => 'Agent',
'refnum' => 'Advertising source',
@@ -13,12 +14,12 @@
{ 'field' => 'agentnum',
'type' => 'select-agent',
'empty_label' => 'Select agent',
- 'colspan' => 6,
+ 'colspan' => 7,
},
{ 'field' => 'refnum',
'type' => 'select-part_referral',
'empty_label' => 'Select advertising source',
- 'colspan' => 6,
+ 'colspan' => 7,
},
{ 'field' => 'residential_commercial',
'type' => 'radio',
@@ -28,11 +29,11 @@
{ 'field' => 'company',
'type' => 'text',
'size' => 50,
- 'colspan' => 6,
+ 'colspan' => 7,
},
{ 'field' => 'contactnum',
'type' => 'contact',
- 'colspan' => 6,
+ 'colspan' => 7,
'o2m_table' => 'contact',
'm2_label' => 'Contact',
'm2_error_callback' => $m2_error_callback,
diff --git a/httemplate/edit/svc_circuit.cgi b/httemplate/edit/svc_circuit.html
index 3f9bad5b1..3f9bad5b1 100644
--- a/httemplate/edit/svc_circuit.cgi
+++ b/httemplate/edit/svc_circuit.html