summaryrefslogtreecommitdiff
path: root/httemplate/view/cust_main.cgi
diff options
context:
space:
mode:
Diffstat (limited to 'httemplate/view/cust_main.cgi')
-rwxr-xr-xhttemplate/view/cust_main.cgi43
1 files changed, 34 insertions, 9 deletions
diff --git a/httemplate/view/cust_main.cgi b/httemplate/view/cust_main.cgi
index 52d85deff..421bd98a4 100755
--- a/httemplate/view/cust_main.cgi
+++ b/httemplate/view/cust_main.cgi
@@ -206,8 +206,7 @@ print '<BR>';
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>',
@@ -266,12 +265,37 @@ foreach my $type_pkgs ( qsearch('type_pkgs',{'typenum'=> $agent->typenum }) ) {
$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!&nbsp;Amount:<INPUT TYPE="text" NAME="amount" SIZE=6>!.
+ qq!&nbsp;!;
+
+#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>
@@ -364,7 +388,8 @@ foreach my $package (@packages) {
for ( qw( setup bill susp expire cancel ) ) {
print "<TD ROWSPAN=$rowspan><FONT SIZE=-1>", ( $package->getfield($_)
- ? time2str("%D", $package->getfield($_) )
+ ? time2str("%D</FONT><BR><FONT SIZE=-3>%l:%M:%S%P&nbsp;%z</FONT>",
+ $package->getfield($_) )
: '&nbsp'
), '</FONT></TD>',
;
@@ -459,7 +484,7 @@ foreach my $bill (@bills) {
$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;
@@ -542,7 +567,7 @@ foreach my $payment (@unapplied_payments) {
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;
@@ -597,10 +622,10 @@ foreach my $item (sort keyfield_numerically @history) {
( $charge ? "\$".sprintf("%.2f",$charge) : '' ),
"</FONT></TD>",
"<TD><FONT SIZE=-1>",
- ( $payment ? "- \$".sprintf("%.2f",$payment) : '' ),
+ ( $payment ? "-&nbsp;\$".sprintf("%.2f",$payment) : '' ),
"</FONT></TD>",
"<TD><FONT SIZE=-1>",
- ( $credit ? "- \$".sprintf("%.2f",$credit) : '' ),
+ ( $credit ? "-&nbsp;\$".sprintf("%.2f",$credit) : '' ),
"</FONT></TD>",
"<TD><FONT SIZE=-1>",
( $refund ? "\$".sprintf("%.2f",$refund) : '' ),