[freeside-commits] freeside/httemplate/edit quick-charge.html, 1.2.2.4, 1.2.2.5

Ivan,,, ivan at wavetail.420.am
Thu Jun 5 12:24:39 PDT 2008


Update of /home/cvs/cvsroot/freeside/httemplate/edit
In directory wavetail.420.am:/tmp/cvs-serv22157/httemplate/edit

Modified Files:
      Tag: FREESIDE_1_7_BRANCH
	quick-charge.html 
Log Message:
voxlinesystems CDRs and quantity bs

Index: quick-charge.html
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/quick-charge.html,v
retrieving revision 1.2.2.4
retrieving revision 1.2.2.5
diff -u -d -r1.2.2.4 -r1.2.2.5
--- quick-charge.html	13 Feb 2008 23:45:42 -0000	1.2.2.4
+++ quick-charge.html	5 Jun 2008 19:24:37 -0000	1.2.2.5
@@ -78,18 +78,32 @@
 <TABLE ID="QuickChargeTable" BGCOLOR="#cccccc" BORDER=0 CELLSPACING=0 STYLE="background-color: #cccccc">
 
 <TR>
-  <TD ALIGN="right">Amount:</TD>
+  <TD ALIGN="right">Amount: </TD>
   <TD>
     $<INPUT TYPE="text" NAME="amount" SIZE=6 VALUE="<% $amount %>" onChange="enable_quick_charge()" onKeyPress="enable_quick_charge_amount()">
   </TD>
+</TR>
+
+% if ( $conf->exists('invoice-unitprice') ) {
+    <TR>
+      <TD ALIGN="right">Quantity: </TD>
+      <TD>
+        <INPUT TYPE="text" NAME="quantity" SIZE=4 VALUE="<% $quantity %>">
+      </TD>
+    </TR>
+% }
+
 <% include('/elements/tr-select-pkg_class.html', '') %>
+
 <% include('/elements/tr-select-taxclass.html') %>
-</TR>
+
+<TR>
   <TD>Description:</TD>
   <TD>
     <INPUT TYPE="text" NAME="pkg" SIZE="60" MAXLENGTH="65" VALUE="<% $pkg %>" onChange="enable_quick_charge()" onKeyPress="enable_quick_charge_desc()">
   </TD>
 </TR>
+
 <TR>
   <TD></TD>
   <TD><FONT SIZE="-1">Optional additional description: </FONT></TD>
@@ -114,7 +128,7 @@
 </TABLE>
 
 <BR>
-<INPUT TYPE="submit" NAME="submit" VALUE="Add one-time charge" <% $cgi->param('error') ? '' :' DISABLED' %>>
+<INPUT TYPE="submit" ID="submit" NAME="submit" VALUE="Add one-time charge" <% $cgi->param('error') ? '' :' DISABLED' %>>
 
 </FORM>
 
@@ -167,6 +181,8 @@
 die "access denied"
   unless $FS::CurrentUser::CurrentUser->access_right('One-time charge');
 
+my $conf = new FS::Conf;
+
 $cgi->param('custnum') =~ /^(\d+)$/ or die 'illegal custnum';
 my $custnum = $1;
 
@@ -175,6 +191,11 @@
   $amount = $1;
 }
 
+my $quantity = 1;
+if ( $cgi->param('quantity') =~ /^\s*(\d+)\s*$/ ) {
+  $quantity = $1;
+}
+
 $cgi->param('pkg') =~ /^([\w \!\@\#\$\%\&\(\)\-\+\;\:\'\"\,\.\?\/\=\[\]]*)$/ 
   or die 'illegal description';
 my $pkg = $1;



More information about the freeside-commits mailing list