diff options
author | Ivan Kohler <ivan@freeside.biz> | 2015-02-02 01:34:59 -0800 |
---|---|---|
committer | Ivan Kohler <ivan@freeside.biz> | 2015-02-02 01:34:59 -0800 |
commit | 899cf5029429c1183024cd4bf838573a951d0ede (patch) | |
tree | e49a56592b9086d8f816df75008bd0c79cc53083 /httemplate | |
parent | 91fc21ed01fec83bf1dbb7392d212acdffd4d44c (diff) | |
parent | 64514e0541c94b23a096acb265cb47e9ca6e6f85 (diff) |
Merge branch 'master' of git.freeside.biz:/home/git/freeside
Diffstat (limited to 'httemplate')
-rw-r--r-- | httemplate/edit/process/quick-charge.cgi | 16 | ||||
-rw-r--r-- | httemplate/edit/process/quick-cust_pkg.cgi | 2 | ||||
-rw-r--r-- | httemplate/edit/quick-charge.html | 9 | ||||
-rw-r--r-- | httemplate/view/cust_main/payment_history/voided_invoice.html | 2 | ||||
-rw-r--r-- | httemplate/view/cust_main/payment_history/voided_payment.html | 2 |
5 files changed, 28 insertions, 3 deletions
diff --git a/httemplate/edit/process/quick-charge.cgi b/httemplate/edit/process/quick-charge.cgi index c130a550f..aa6010ef9 100644 --- a/httemplate/edit/process/quick-charge.cgi +++ b/httemplate/edit/process/quick-charge.cgi @@ -67,6 +67,18 @@ if ( $param->{'pkgnum'} =~ /^(\d+)$/ ) { #modifying an existing one-time charge my $start_date = $cgi->param('start_date') ? parse_datetime($cgi->param('start_date')) : time; + + $param->{'tax_override'} =~ /^\s*([,\d]*)\s*$/ + or $error .= "Illegal tax override " . $param->{"tax_override"} . " "; + my $override = $1; + + if ( $param->{'taxclass'} eq '(select)' ) { + $error .= "Must select a tax class. " + unless ($conf->exists('enable_taxproducts') && + ( $override || $param->{taxproductnum} ) + ); + $cgi->param('taxclass', ''); + } $error = $cust_pkg->modify_charge( 'pkg' => scalar($cgi->param('pkg')), @@ -75,6 +87,10 @@ if ( $param->{'pkgnum'} =~ /^(\d+)$/ ) { #modifying an existing one-time charge 'adjust_commission' => ($cgi->param('adjust_commission') ? 1 : 0), 'amount' => $amount, 'setup_cost' => $setup_cost, + 'setuptax' => scalar($cgi->param('setuptax')), + 'taxclass' => scalar($cgi->param('taxclass')), + 'taxproductnum' => scalar($cgi->param('taxproductnum')), + 'tax_override' => $override, 'quantity' => $quantity, 'start_date' => $start_date, ); diff --git a/httemplate/edit/process/quick-cust_pkg.cgi b/httemplate/edit/process/quick-cust_pkg.cgi index f1d8c2696..34f5d12bd 100644 --- a/httemplate/edit/process/quick-cust_pkg.cgi +++ b/httemplate/edit/process/quick-cust_pkg.cgi @@ -159,7 +159,7 @@ if ( $quotationnum ) { $quotation_pkg->prospectnum($prospect_main->prospectnum) if $prospect_main; #XXX handle new location - $error = $quotation_pkg->insert; + $error = $quotation_pkg->insert || $quotation_pkg->estimate; } else { diff --git a/httemplate/edit/quick-charge.html b/httemplate/edit/quick-charge.html index 1e1232dcd..83620a973 100644 --- a/httemplate/edit/quick-charge.html +++ b/httemplate/edit/quick-charge.html @@ -171,6 +171,15 @@ function bill_now_changed (what) { &> % } +<TR> + <TD ALIGN="right"><% mt('Tax exempt') |h %> </TD> + <TD><INPUT TYPE="checkbox" NAME="setuptax" VALUE="Y" <% $cgi->param('setuptax') ? 'CHECKED' : '' %>></TD> +</TR> + +<& /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') &> + % } else { # new one-time charge <TR> diff --git a/httemplate/view/cust_main/payment_history/voided_invoice.html b/httemplate/view/cust_main/payment_history/voided_invoice.html index eb00e057e..3d81e662f 100644 --- a/httemplate/view/cust_main/payment_history/voided_invoice.html +++ b/httemplate/view/cust_main/payment_history/voided_invoice.html @@ -6,7 +6,7 @@ % } % my $reason = $cust_bill_void->reason; % if ($reason) { - for <% $reason %> + (<% $reason %>) % } <% mt("on [_1]", time2str($date_format, $cust_bill_void->void_date) ) |h %> </I> diff --git a/httemplate/view/cust_main/payment_history/voided_payment.html b/httemplate/view/cust_main/payment_history/voided_payment.html index daeaa31e9..5c43c91e5 100644 --- a/httemplate/view/cust_main/payment_history/voided_payment.html +++ b/httemplate/view/cust_main/payment_history/voided_payment.html @@ -6,7 +6,7 @@ % } % my $reason = $cust_pay_void->reason; % if ($reason) { - for <% $reason %> + (<% $reason %>) % } <% mt("on [_1]", time2str($date_format, $cust_pay_void->void_date) ) |h %> </I> |