summaryrefslogtreecommitdiff
path: root/httemplate
diff options
context:
space:
mode:
authorivan <ivan>2005-11-21 10:47:12 +0000
committerivan <ivan>2005-11-21 10:47:12 +0000
commitf10cd68f08a6bfbd565a83b40bacc3f55a1265b3 (patch)
tree2f2d35fd69cc7ea44ac4801dc6fad6278d09b7c6 /httemplate
parent91c861a52c70f7dd67cc2b9b2705e74640957921 (diff)
add MCRD payment type for manually processed ccards
Diffstat (limited to 'httemplate')
-rw-r--r--httemplate/edit/cust_main/billing.html23
-rwxr-xr-xhttemplate/edit/cust_pay.cgi1
-rwxr-xr-xhttemplate/search/cust_pay.cgi4
-rw-r--r--httemplate/search/report_cust_pay.html1
-rwxr-xr-xhttemplate/view/cust_bill.cgi9
-rw-r--r--httemplate/view/cust_main/payment_history.html8
6 files changed, 41 insertions, 5 deletions
diff --git a/httemplate/edit/cust_main/billing.html b/httemplate/edit/cust_main/billing.html
index caac3a956..6168fa97e 100644
--- a/httemplate/edit/cust_main/billing.html
+++ b/httemplate/edit/cust_main/billing.html
@@ -331,6 +331,22 @@ if ( $payby_default eq 'HIDE' ) {
'</TABLE>',
+ 'MCRD' =>
+
+ '<TABLE BGCOLOR="#cccccc" BORDER=0 CELLSPACING=0 HEIGHT=192>'.
+
+ qq!<TR><TD ALIGN="right" WIDTH="200">${r}Amount </TD>!.
+ qq!<TD WIDTH="408"><INPUT TYPE="text" NAME="paid" VALUE="!. ( $payby eq 'MCRD' ? $cust_main->paid : '' ). qq!"></TD></TR>!.
+
+ '<TR><TD>&nbsp;</TD></TR>'.
+ '<TR><TD>&nbsp;</TD></TR>'.
+ '<TR><TD>&nbsp;</TD></TR>'.
+ '<TR><TD>&nbsp;</TD></TR>'.
+ '<TR><TD>&nbsp;</TD></TR>'.
+ '<TR><TD>&nbsp;</TD></TR>'.
+
+ '</TABLE>',
+
);
@@ -341,11 +357,12 @@ if ( $payby_default eq 'HIDE' ) {
'BILL' => 'Billing',
'CASH' => 'Cash', # initial payment, then billing',
'WEST' => 'Western Union', # initial payment, then billing',
+ 'MCRD' => 'Manual credit card', # initial payment, then billing',
'COMP' => 'Complimentary',
);
- if ( $cust_main->custnum ) { #don't offer CASH and WEST initial payment types
+ if ( $cust_main->custnum ) { #don't offer CASH/WEST/MCRD initial payment types
# when editing customer
- delete $allopt{$_} for qw(CASH WEST);
+ delete $allopt{$_} for qw(CASH WEST MCRD);
}
tie my %options, 'Tie::IxHash',
@@ -365,7 +382,7 @@ if ( $payby_default eq 'HIDE' ) {
#'form_action' => 'nothingyet',
#chops bottom of page in IE# 'under_position' => 'absolute',
'html_between' => '</TD></TR></TABLE>',
- 'selected_layer' => $payby2option{$payby} || 'CARD',
+ 'selected_layer' => $payby2option{$payby || $payby_default || $payby[0] },
'layer_callback' => sub { my $layer = shift; $payby{$layer}; },
);
diff --git a/httemplate/edit/cust_pay.cgi b/httemplate/edit/cust_pay.cgi
index b2f3f55ff..0370ab726 100755
--- a/httemplate/edit/cust_pay.cgi
+++ b/httemplate/edit/cust_pay.cgi
@@ -6,6 +6,7 @@ my %payby = (
'BILL' => 'Check',
'CASH' => 'Cash',
'WEST' => 'Western Union',
+ 'MCRD' => 'Manual credit card',
);
my($link, $linknum, $paid, $payby, $payinfo, $quickpay, $_date);
diff --git a/httemplate/search/cust_pay.cgi b/httemplate/search/cust_pay.cgi
index bf3df9846..99ffc3d20 100755
--- a/httemplate/search/cust_pay.cgi
+++ b/httemplate/search/cust_pay.cgi
@@ -17,7 +17,7 @@
if ( $cgi->param('payby') ) {
$cgi->param('payby') =~
- /^(CARD|CHEK|BILL|PREP|CASH|WEST)(-(VisaMC|Amex|Discover|Maestro))?$/
+ /^(CARD|CHEK|BILL|PREP|CASH|WEST|MCRD)(-(VisaMC|Amex|Discover|Maestro))?$/
or die "illegal payby ". $cgi->param('payby');
push @search, "cust_pay.payby = '$1'";
if ( $3 ) {
@@ -170,6 +170,8 @@
'Cash '. $cust_pay->payinfo;
} elsif ( $cust_pay->payby eq 'WEST' ) {
'Western Union'; #. $cust_pay->payinfo;
+ } elsif ( $cust_pay->payby eq 'MCRD' ) {
+ 'Manual credit card'; #. $cust_pay->payinfo;
} else {
$cust_pay->payby. ' '. $cust_pay->payinfo;
}
diff --git a/httemplate/search/report_cust_pay.html b/httemplate/search/report_cust_pay.html
index 18501d5b5..a28ead92d 100644
--- a/httemplate/search/report_cust_pay.html
+++ b/httemplate/search/report_cust_pay.html
@@ -25,6 +25,7 @@
<OPTION VALUE="PREP">prepaid card</OPTION>
<OPTION VALUE="CASH">cash</OPTION>
<OPTION VALUE="WEST">Western Union</OPTION>
+ <OPTION VALUE="MCRD">manual credit card</OPTION>
</SELECT>
</TD>
</TR>
diff --git a/httemplate/view/cust_bill.cgi b/httemplate/view/cust_bill.cgi
index 8dcbd3a35..572441494 100755
--- a/httemplate/view/cust_bill.cgi
+++ b/httemplate/view/cust_bill.cgi
@@ -29,7 +29,7 @@ my $link = $templatename ? "$templatename-$invnum" : $invnum;
)) %>
<% if ( $cust_bill->owed > 0
- && ( $payby{'BILL'} || $payby{'CASH'} || $payby{'WEST'} )
+ && ( $payby{'BILL'} || $payby{'CASH'} || $payby{'WEST'} || $payby{'MCRD'} )
)
{
my $s = 0;
@@ -58,6 +58,13 @@ my $link = $templatename ? "$templatename-$invnum" : $invnum;
<% } %>
+ <% if ( $payby{'MCRD'} ) { %>
+
+ <%= $s++ ? ' | ' : '' %>
+ <A HREF="<%= $p %>edit/cust_pay.cgi?payby=MCRD;invnum=<%= $invnum %>">manual credit card</A>
+
+ <% } %>
+
payment against this invoice<BR>
<% } %>
diff --git a/httemplate/view/cust_main/payment_history.html b/httemplate/view/cust_main/payment_history.html
index e58b6248e..f794ccf4a 100644
--- a/httemplate/view/cust_main/payment_history.html
+++ b/httemplate/view/cust_main/payment_history.html
@@ -51,6 +51,13 @@
<% } %>
+<% if ( $payby{'MCRD'} ) { %>
+
+ <%= $s++ ? ' | ' : '' %>
+ <A HREF="<%= $p %>edit/cust_pay.cgi?payby=MCRD;custnum=<%= $custnum %>">Post manual credit card payment</A>
+
+<% } %>
+
<BR><A HREF="<%= $p %>edit/cust_credit.cgi?<%= $custnum %>">Post credit</A>
<BR>
@@ -98,6 +105,7 @@ foreach my $cust_pay ($cust_main->cust_pay) {
$payby =~ s/^COMP$/Complimentary by /;
$payby =~ s/^CASH$/Cash/;
$payby =~ s/^WEST$/Western Union/;
+ $payby =~ s/^MCRD$/Manual credit card/;
$payby =~ s/^BILL$//;
my $info = $payby ? " ($payby$payinfo)" : '';