[freeside-commits] freeside/httemplate/edit cust_main.cgi, 1.58,
1.59 cust_pay.cgi, 1.17, 1.18
Ivan,,,
ivan at wavetail.420.am
Fri Oct 21 08:21:39 PDT 2005
Update of /home/cvs/cvsroot/freeside/httemplate/edit
In directory wavetail:/tmp/cvs-serv1308/httemplate/edit
Modified Files:
cust_main.cgi cust_pay.cgi
Log Message:
add CASH and WEST payment types (payments only, not cust_main.payby)
Index: cust_pay.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/cust_pay.cgi,v
retrieving revision 1.17
retrieving revision 1.18
diff -u -d -r1.17 -r1.18
--- cust_pay.cgi 9 Jul 2005 10:55:18 -0000 1.17
+++ cust_pay.cgi 21 Oct 2005 15:21:37 -0000 1.18
@@ -1,8 +1,13 @@
-<!-- mason kludge -->
<%
my $conf = new FS::Conf;
+my %payby = (
+ 'BILL' => 'Check',
+ 'CASH' => 'Cash',
+ 'WEST' => 'Western Union',
+);
+
my($link, $linknum, $paid, $payby, $payinfo, $quickpay, $_date);
if ( $cgi->param('error') ) {
$link = $cgi->param('link');
@@ -12,31 +17,29 @@
$payinfo = $cgi->param('payinfo');
$quickpay = $cgi->param('quickpay');
$_date = $cgi->param('_date') ? str2time($cgi->param('_date')) : time;
-} elsif ($cgi->keywords) {
- my($query) = $cgi->keywords;
- $query =~ /^(\d+)$/;
- $link = 'invnum';
- $linknum = $1;
- $paid = '';
- $payby = 'BILL';
- $payinfo = "";
- $quickpay = '';
- $_date = time;
-} elsif ( $cgi->param('custnum') =~ /^(\d+)$/ ) {
+} elsif ( $cgi->param('custnum') =~ /^(\d+)$/ ) {
$link = 'custnum';
$linknum = $1;
$paid = '';
- $payby = 'BILL';
+ $payby = $cgi->param('payby') || 'BILL';
$payinfo = '';
$quickpay = $cgi->param('quickpay');
$_date = time;
+} elsif ( $cgi->param('invnum') =~ /^(\d+)$/ ) {
+ $link = 'invnum';
+ $linknum = $1;
+ $paid = '';
+ $payby = $cgi->param('payby') || 'BILL';
+ $payinfo = "";
+ $quickpay = '';
+ $_date = time;
} else {
die "illegal query ". $cgi->keywords;
}
my $paybatch = "webui-$_date-$$-". rand() * 2**32;
-my $title = 'Post payment';
+my $title = 'Post '. $payby{$payby}. ' payment';
$title .= " against Invoice #$linknum" if $link eq 'invnum';
%>
@@ -97,13 +100,18 @@
<TR>
<TD ALIGN="right">Amount</TD>
<TD BGCOLOR="#ffffff" ALIGN="right"><%= $money_char %></TD>
- <TD><INPUT TYPE="text" NAME="paid" VALUE="<%= $paid %>" SIZE=8 MAXLENGTH=8></TD>
-</TR>
-<TR>
- <TD ALIGN="right">Check #</TD>
- <TD COLSPAN=2><INPUT TYPE="text" NAME="payinfo" VALUE="<%= $payinfo %>" SIZE=10></TD>
+ <TD><INPUT TYPE="text" NAME="paid" VALUE="<%= $paid %>" SIZE=8 MAXLENGTH=8> by <B><%= $payby{$payby} %></B></TD>
</TR>
+<% if ( $payby eq 'BILL' ) { %>
+
+ <TR>
+ <TD ALIGN="right">Check #</TD>
+ <TD COLSPAN=2><INPUT TYPE="text" NAME="payinfo" VALUE="<%= $payinfo %>" SIZE=10></TD>
+ </TR>
+
+<% } %>
+
<TR>
<% if ( $link eq 'custnum' ) { %>
<TD ALIGN="right">Auto-apply<BR>to invoices</TD>
Index: cust_main.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/cust_main.cgi,v
retrieving revision 1.58
retrieving revision 1.59
diff -u -d -r1.58 -r1.59
--- cust_main.cgi 6 Oct 2005 01:40:35 -0000 1.58
+++ cust_main.cgi 21 Oct 2005 15:21:37 -0000 1.59
@@ -35,6 +35,7 @@
$popnum = $cgi->param('popnum');
@invoicing_list = split( /\s*,\s*/, $cgi->param('invoicing_list') );
$same = $cgi->param('same');
+ $cust_main->setfield('paid' => $cgi->param('paid')) if $cgi->param('paid');
} elsif ( $cgi->keywords ) { #editing
my( $query ) = $cgi->keywords;
$query =~ /^(\d+)$/;
@@ -261,7 +262,8 @@
'payinfo', 'payinfo1', 'payinfo2',
'payname', 'exp_month', 'exp_year', 'paycvv',
'paystart_month', 'paystart_year', 'payissue',
- 'payip'
+ 'payip',
+ 'paid'
);
var billing_bottomvars = new Array(
@@ -340,6 +342,7 @@
'payname', 'exp_month', 'exp_year', 'paycvv',
'paystart_month', 'paystart_year', 'payissue',
'payip',
+ 'paid',
'tax',
'invoicing_list', 'invoicing_list_POST', 'invoicing_list_FAX'
More information about the freeside-commits
mailing list