package class selection for one-time charges RT#1322
authorjeff <jeff>
Wed, 13 Feb 2008 23:46:52 +0000 (23:46 +0000)
committerjeff <jeff>
Wed, 13 Feb 2008 23:46:52 +0000 (23:46 +0000)
FS/FS/cust_main.pm
httemplate/edit/process/quick-charge.cgi
httemplate/edit/quick-charge.html

index 398ff04..73bdc14 100644 (file)
@@ -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,
   } );
 
index 3c7cac5..22f9685 100644 (file)
@@ -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,
   } );
 }
index e8df371..95ec70c 100644 (file)
@@ -82,6 +82,7 @@ function validate_quick_charge () {
   <TD>
     $<INPUT TYPE="text" NAME="amount" SIZE=6 VALUE="<% $amount %>" onChange="enable_quick_charge()" onKeyPress="enable_quick_charge_amount()">
   </TD>
+<% include('/elements/tr-select-pkg_class.html', '') %>
 <% include('/elements/tr-select-taxclass.html') %>
 </TR>
   <TD>Description:</TD>