[freeside-commits] freeside/httemplate/edit quick-charge.html, 1.7, 1.8
Ivan,,,
ivan at wavetail.420.am
Thu Jun 5 12:24:35 PDT 2008
Update of /home/cvs/cvsroot/freeside/httemplate/edit
In directory wavetail.420.am:/tmp/cvs-serv22150/httemplate/edit
Modified Files:
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.7
retrieving revision 1.8
diff -u -d -r1.7 -r1.8
--- quick-charge.html 16 Apr 2008 20:34:41 -0000 1.7
+++ quick-charge.html 5 Jun 2008 19:24:33 -0000 1.8
@@ -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', 'curr_value' => $cgi->param('classnum') ) %>
+
<% include('/elements/tr-select-taxclass.html', 'curr_value' => $cgi->param('taxclass') ) %>
-</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