if ( $cust_main->payby eq 'CARD' ) {
my $payinfo = $cust_main->payinfo;
- $payinfo = substr($payinfo,0,4). 'x'x(length($payinfo)-4);
-
+ $payinfo = 'x'x(length($payinfo)-4). substr($payinfo,(length($payinfo)-4));
print 'Credit card</TD></TR>',
'<TR><TD ALIGN="right">Card number</TD><TD BGCOLOR="#ffffff">',
$payinfo, '</TD></TR>',
$part_pkg->comment;
}
-print '</SELECT><INPUT TYPE="submit" VALUE="Order Package"><BR>';
+print '</SELECT><INPUT TYPE="submit" VALUE="Order Package"></FORM><BR>';
+
+print '<BR>'.
+ qq!<FORM ACTION="${p}edit/process/quick-charge.cgi" METHOD="POST">!.
+ qq!<INPUT TYPE="hidden" NAME="custnum" VALUE="$custnum">!.
+ qq!Description:<INPUT TYPE="text" NAME="pkg">!.
+ qq! Amount:<INPUT TYPE="text" NAME="amount" SIZE=6>!.
+ qq! !;
+
+#false laziness w/ edit/part_pkg.cgi
+if ( $conf->exists('enable_taxclasses') ) {
+ print '<SELECT NAME="taxclass">';
+ my $sth = dbh->prepare('SELECT DISTINCT taxclass FROM cust_main_county')
+ or die dbh->errstr;
+ $sth->execute or die $sth->errstr;
+ foreach my $taxclass ( map $_->[0], @{$sth->fetchall_arrayref} ) {
+ print qq!<OPTION VALUE="$taxclass"!;
+ #print ' SELECTED' if $taxclass eq $hashref->{taxclass};
+ print qq!>$taxclass</OPTION>!;
+ }
+ print '</SELECT>';
+} else {
+ print '<INPUT TYPE="hidden" NAME="taxclass" VALUE="">';
+}
+
+print qq!<INPUT TYPE="submit" VALUE="One-time charge"></FORM><BR>!;
print <<END;
<SCRIPT>
function cust_pkg_areyousure(href) {
- if (confirm("Permanantly delete included services and cancel this package?") == true)
+ if (confirm("Permanently delete included services and cancel this package?") == true)
window.location.href = href;
}
</SCRIPT>
for ( qw( setup bill susp expire cancel ) ) {
print "<TD ROWSPAN=$rowspan><FONT SIZE=-1>", ( $package->getfield($_)
- ? time2str("%D<BR><FONT SIZE=-3>%l:%M:%S%P %z</FONT>",
+ ? time2str("%D</FONT><BR><FONT SIZE=-3>%l:%M:%S%P %z</FONT>",
$package->getfield($_) )
: ' '
), '</FONT></TD>',
$payment->payinfo,
$cust_bill_pay->amount,
);
- $payinfo = substr($payinfo,0,4). 'x'x(length($payinfo)-4)
+ $payinfo = 'x'x(length($payinfo)-4). substr($payinfo,(length($payinfo)-4))
if $payby eq 'CARD';
my $target = "$payby$payinfo";
$payby =~ s/^BILL$/Check #/ if $payinfo;
my $payby = $payment->payby;
my $payinfo = $payment->payinfo;
#false laziness w/above
- $payinfo = substr($payinfo,0,4). 'x'x(length($payinfo)-4)
+ $payinfo = 'x'x(length($payinfo)-4). substr($payinfo,(length($payinfo)-4))
if $payby eq 'CARD';
my $target = "$payby$payinfo";
$payby =~ s/^BILL$/Check #/ if $payinfo;
( $charge ? "\$".sprintf("%.2f",$charge) : '' ),
"</FONT></TD>",
"<TD><FONT SIZE=-1>",
- ( $payment ? "- \$".sprintf("%.2f",$payment) : '' ),
+ ( $payment ? "- \$".sprintf("%.2f",$payment) : '' ),
"</FONT></TD>",
"<TD><FONT SIZE=-1>",
- ( $credit ? "- \$".sprintf("%.2f",$credit) : '' ),
+ ( $credit ? "- \$".sprintf("%.2f",$credit) : '' ),
"</FONT></TD>",
"<TD><FONT SIZE=-1>",
( $refund ? "\$".sprintf("%.2f",$refund) : '' ),