From: Mark Wells Date: Wed, 29 Jun 2016 06:29:37 +0000 (-0700) Subject: change one-time charge UI to a full page to avoid conflict with taxproducts, #71394 X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=commitdiff_plain;h=ca00b528d98dbf454bae7b497c8d83ca8851724c change one-time charge UI to a full page to avoid conflict with taxproducts, #71394 --- diff --git a/httemplate/browse/part_pkg_taxproduct/cch.html b/httemplate/browse/part_pkg_taxproduct/cch.html index b901bad9f..1f4f53d5f 100755 --- a/httemplate/browse/part_pkg_taxproduct/cch.html +++ b/httemplate/browse/part_pkg_taxproduct/cch.html @@ -97,7 +97,7 @@ $cgi->delete('tax_customer'); if ( $tax_group || $tax_item || $tax_provider || $tax_customer ) { - push @menubar, 'View all tax products' => $p.'browse/part_pkg_taxproduct.cgi'; + push @menubar, 'View all tax products' => $p.'browse/part_pkg_taxproduct/cch.html'; } $cgi->param('dummy', 1); 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)) %> - - -% } +<% $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'; +} + 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) { +

+% 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 &> +% } +

+
$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 diff --git a/httemplate/view/cust_main/menu.html b/httemplate/view/cust_main/menu.html index ab2d69d34..9e194f42d 100644 --- a/httemplate/view/cust_main/menu.html +++ b/httemplate/view/cust_main/menu.html @@ -131,8 +131,6 @@ -<& /elements/one_time_charge_link.html, form_only=>1 &> -