diff options
Diffstat (limited to 'httemplate/edit')
-rw-r--r-- | httemplate/edit/log_email.html | 11 | ||||
-rw-r--r-- | httemplate/edit/msgcat.html | 2 | ||||
-rwxr-xr-x | httemplate/edit/process/cust_main.cgi | 9 | ||||
-rw-r--r-- | httemplate/edit/process/prospect_main.html | 11 | ||||
-rw-r--r-- | httemplate/edit/process/quick-charge.cgi | 21 | ||||
-rw-r--r-- | httemplate/edit/prospect_main.html | 1 | ||||
-rw-r--r-- | httemplate/edit/quick-charge.html | 28 |
7 files changed, 68 insertions, 15 deletions
diff --git a/httemplate/edit/log_email.html b/httemplate/edit/log_email.html index 709a24069..0c98046d3 100644 --- a/httemplate/edit/log_email.html +++ b/httemplate/edit/log_email.html @@ -8,6 +8,12 @@ 'labels' => { '' => '(all)', map { $_ => $_ } @contexts }, 'curr_value' => scalar($cgi->param('context')), }, + { 'field' => 'context_height', + 'type' => 'checkbox', + 'postfix' => 'Only match most specific context', + 'value' => 1, + 'curr_value' => scalar($cgi->param('context_height')), + }, { 'field' => 'min_level', 'type' => 'select', 'options' => [ 0..7 ], @@ -24,6 +30,7 @@ ], 'labels' => { 'context' => 'Context', + 'context_height' => '', 'min_level' => 'Min. Level', 'to_addr' => 'To', 'msgnum' => 'Message', @@ -44,6 +51,10 @@ die "access denied" unless $FS::CurrentUser::CurrentUser->access_right([ 'View system logs', 'Configuration' ]); my $msgnum = $cgi->param('msgnum'); + +# XXX This attempt to set a default message isn't working, not sure why +# $msgnum gets set correctly, but isn't selected in the popup window...fix later + unless ($msgnum) { my ($msg_template) = qsearch('msg_template',{ msgname => 'System log' }); # doesn't seem worth having a config just for the default selected template diff --git a/httemplate/edit/msgcat.html b/httemplate/edit/msgcat.html index 4e2edd6d8..5ca118ad7 100644 --- a/httemplate/edit/msgcat.html +++ b/httemplate/edit/msgcat.html @@ -3,7 +3,7 @@ table => 'msgcat', fields => [ { field=>'msgcode', type=>'fixed' }, { field=>'locale', type=>'fixed' }, - 'msg', + { field => 'msg', type => 'text', size => 60 }, ], labels => { 'msgnum' => 'String', 'msgcode' => 'Code', diff --git a/httemplate/edit/process/cust_main.cgi b/httemplate/edit/process/cust_main.cgi index 99c7f90b8..04516e984 100755 --- a/httemplate/edit/process/cust_main.cgi +++ b/httemplate/edit/process/cust_main.cgi @@ -188,6 +188,15 @@ if ( $cgi->param('residential_commercial') eq 'Residential' ) { } +# kind of a hack, but some tax data vendors require a status and others +# don't. +my $vendor = $conf->config('tax_data_vendor'); +if ( $vendor eq 'avalara' or $vendor eq 'suretax' ) { + if ( ! $cgi->param('taxstatusnum') ) { + $error ||= 'Tax status required'; + } +} + #perhaps this stuff should go to cust_main.pm if ( $new->custnum eq '' or $duplicate_of ) { diff --git a/httemplate/edit/process/prospect_main.html b/httemplate/edit/process/prospect_main.html index 7c8cc276e..b2ae88eba 100644 --- a/httemplate/edit/process/prospect_main.html +++ b/httemplate/edit/process/prospect_main.html @@ -1,5 +1,6 @@ <% include('elements/process.html', 'table' => 'prospect_main', + 'precheck_callback' => $precheck, 'args_callback' => $args_callback, 'agent_virt' => 1, 'process_o2m' => { @@ -11,6 +12,16 @@ %> <%init> +my $precheck = sub { + my $cgi = shift; + my $vendor = FS::Conf->new->config('tax_data_vendor'); + if ( $vendor eq 'avalara' or $vendor eq 'suretax' ) { + if ( ! $cgi->param('taxstatusnum') ) { + return 'Tax status required'; + } + } +}; + my $args_callback = sub { my( $cgi, $object ) = @_; diff --git a/httemplate/edit/process/quick-charge.cgi b/httemplate/edit/process/quick-charge.cgi index 8ee182141..d1b8e1086 100644 --- a/httemplate/edit/process/quick-charge.cgi +++ b/httemplate/edit/process/quick-charge.cgi @@ -1,13 +1,4 @@ -% if ( $error ) { -% $cgi->param('error', $error ); -<% $cgi->redirect($p.'quick-charge.html?'. $cgi->query_string) %> -% } else { -<% header(emt($message)) %> - <SCRIPT TYPE="text/javascript"> - window.top.location.reload(); - </SCRIPT> - </BODY></HTML> -% } +<% $cgi->redirect($redirect) %> <%init> my $curuser = $FS::CurrentUser::CurrentUser; @@ -157,4 +148,14 @@ if ( $param->{'pkgnum'} =~ /^(\d+)$/ ) { #modifying an existing one-time charge } +my $redirect; +if ( $error ) { + $cgi->param('error', $error ); + $redirect = $p.'quick-charge.html?'. $cgi->query_string; +} elsif ( $quotation ) { + $redirect = $fsurl.'view/quotation.html?' . $quotation->quotationnum; +} else { + $redirect = $fsurl.'view/cust_main.cgi?custnum=' . $cust_main->custnum . ';show=last'; +} + </%init> diff --git a/httemplate/edit/prospect_main.html b/httemplate/edit/prospect_main.html index fb6751532..7c02538f8 100644 --- a/httemplate/edit/prospect_main.html +++ b/httemplate/edit/prospect_main.html @@ -50,6 +50,7 @@ }, { 'field' => 'taxstatusnum', 'type' => 'select-tax_status', + 'required' => 1, 'empty_label' => ' ', }, ], diff --git a/httemplate/edit/quick-charge.html b/httemplate/edit/quick-charge.html index 14c3f51e6..2bbbe43d8 100644 --- a/httemplate/edit/quick-charge.html +++ b/httemplate/edit/quick-charge.html @@ -1,4 +1,4 @@ -<& /elements/header-popup.html, mt('One-time charge'), '', +<& /elements/header.html, mt('One-time charge'), '', ( ($quotationnum || $cgi->param('error')) ? '' : 'onload="addRow()"' ), &> @@ -93,6 +93,18 @@ function bill_now_changed (what) { </SCRIPT> +<P> +% if ( $cust_main ) { +<& /elements/small_custview.html, + $cust_main->custnum, + scalar($conf->config('countrydefault')), + 1, #no balance +&> +% } else { +<& /elements/small_prospect_view.html, $prospect_main &> +% } +</P> + <FORM ACTION = "process/quick-charge.cgi" NAME = "QuickChargeForm" ID = "QuickChargeForm" @@ -183,7 +195,10 @@ function bill_now_changed (what) { <& /elements/tr-select-taxclass.html, 'curr_value' => $part_pkg->get('taxclass') &> - <& /elements/tr-select-taxproduct.html, 'label' => emt('Tax product'), 'onclick' => 'parent.taxproductmagic(this);', 'curr_value' => $part_pkg->get('taxproductnum') &> + <& /elements/tr-select-taxproduct.html, + 'label' => emt('Tax product'), + 'curr_value' => $part_pkg->get('taxproductnum') + &> % } % } else { # new one-time charge @@ -307,9 +322,14 @@ function bill_now_changed (what) { <& /elements/tr-select-taxclass.html, 'curr_value' => $cgi->param('taxclass') &> -<& /elements/tr-select-taxproduct.html, 'label' => emt('Tax product'), 'onclick' => 'parent.taxproductmagic(this);', 'curr_value' => $cgi->param('taxproductnum') &> +<& /elements/tr-select-taxproduct.html, + 'label' => emt('Tax product'), + 'curr_value' => $cgi->param('taxproductnum') +&> -<& /elements/tr-select-taxoverride.html, 'onclick' => 'parent.taxoverridemagic(this);', 'curr_value' => $cgi->param('tax_override') &> +<& /elements/tr-select-taxoverride.html, + 'curr_value' => $cgi->param('tax_override') +&> % } # if !$cust_pkg |