From ba5deb42e573673383c8e9dac0dfe3e4296c4b6d Mon Sep 17 00:00:00 2001 From: jeff Date: Wed, 13 Feb 2008 23:46:52 +0000 Subject: [PATCH] package class selection for one-time charges RT#1322 --- FS/FS/cust_main.pm | 4 +++- httemplate/edit/process/quick-charge.cgi | 1 + httemplate/edit/quick-charge.html | 1 + 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/FS/FS/cust_main.pm b/FS/FS/cust_main.pm index 398ff0487..73bdc1462 100644 --- a/FS/FS/cust_main.pm +++ b/FS/FS/cust_main.pm @@ -4632,13 +4632,14 @@ the error, otherwise returns false. sub charge { my $self = shift; - my ( $amount, $pkg, $comment, $taxclass, $additional ); + my ( $amount, $pkg, $comment, $taxclass, $additional, $classnum ); if ( ref( $_[0] ) ) { $amount = $_[0]->{amount}; $pkg = exists($_[0]->{pkg}) ? $_[0]->{pkg} : 'One-time charge'; $comment = exists($_[0]->{comment}) ? $_[0]->{comment} : '$'. sprintf("%.2f",$amount); $taxclass = exists($_[0]->{taxclass}) ? $_[0]->{taxclass} : ''; + $classnum = exists($_[0]->{classnum}) ? $_[0]->{classnum} : ''; $additional = $_[0]->{additional}; }else{ $amount = shift; @@ -4665,6 +4666,7 @@ sub charge { 'plan' => 'flat', 'freq' => 0, 'disabled' => 'Y', + 'classnum' => $classnum ? $classnum : '', 'taxclass' => $taxclass, } ); diff --git a/httemplate/edit/process/quick-charge.cgi b/httemplate/edit/process/quick-charge.cgi index 3c7cac51d..22f96852f 100644 --- a/httemplate/edit/process/quick-charge.cgi +++ b/httemplate/edit/process/quick-charge.cgi @@ -42,6 +42,7 @@ unless ( $error ) { 'amount' => $amount, 'pkg' => scalar($cgi->param('pkg')), 'taxclass' => scalar($cgi->param('taxclass')), + 'classnum' => scalar($cgi->param('classnum')), 'additional' => \@description, } ); } diff --git a/httemplate/edit/quick-charge.html b/httemplate/edit/quick-charge.html index e8df37103..95ec70c54 100644 --- a/httemplate/edit/quick-charge.html +++ b/httemplate/edit/quick-charge.html @@ -82,6 +82,7 @@ function validate_quick_charge () { $ +<% include('/elements/tr-select-pkg_class.html', '') %> <% include('/elements/tr-select-taxclass.html') %> Description: -- 2.11.0