[freeside-commits] freeside/httemplate/edit cust_credit.cgi, 1.14,
1.15 cust_pay.cgi, 1.23, 1.24
Ivan,,,
ivan at wavetail.420.am
Wed Aug 23 18:37:21 PDT 2006
- Previous message: [freeside-commits] freeside/httemplate/view/cust_main billing.html,
1.6, 1.7 contacts.html, 1.4, 1.5 misc.html, 1.3,
1.4 order_pkg.html, 1.1, 1.2 packages.html, 1.7,
1.8 payment_history.html, 1.13, 1.14 quick-charge.html, 1.4,
1.5 tickets.html, 1.6, 1.7
- Next message: [freeside-commits] freeside/httemplate/edit/cust_main
select-country.html, 1.4, 1.5 select-county.html, 1.3,
1.4 select-state.html, 1.3, 1.4
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
Update of /home/cvs/cvsroot/freeside/httemplate/edit
In directory wavetail:/tmp/cvs-serv4309
Modified Files:
cust_credit.cgi cust_pay.cgi
Log Message:
oops, "Auto-apply to invoices" dropdown disappeared
Index: cust_credit.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/cust_credit.cgi,v
retrieving revision 1.14
retrieving revision 1.15
diff -u -d -r1.14 -r1.15
--- cust_credit.cgi 23 Aug 2006 22:25:37 -0000 1.14
+++ cust_credit.cgi 24 Aug 2006 01:37:19 -0000 1.15
@@ -1,40 +1,10 @@
-%
-%
-%my $conf = new FS::Conf;
-%my($custnum, $amount, $reason);
-%if ( $cgi->param('error') ) {
-% #$cust_credit = new FS::cust_credit ( {
-% # map { $_, scalar($cgi->param($_)) } fields('cust_credit')
-% #} );
-% $custnum = $cgi->param('custnum');
-% $amount = $cgi->param('amount');
-% #$refund = $cgi->param('refund');
-% $reason = $cgi->param('reason');
-%} else {
-% my($query) = $cgi->keywords;
-% $query =~ /^(\d+)$/;
-% $custnum = $1;
-% $amount = '';
-% #$refund = 'yes';
-% $reason = '';
-%}
-%my $_date = time;
-%
-%my $otaker = getotaker;
-%
-%my $p1 = popurl(1);
-%
-%
<% include('/elements/header-popup.html', 'Enter Credit') %>
-% if ( $cgi->param('error') ) {
+% if ( $cgi->param('error') ) {
<FONT SIZE="+1" COLOR="#ff0000">Error: <% $cgi->param('error') %></FONT>
<BR><BR>
% }
-
-<!-- <% small_custview($custnum, $conf->config('countrydefault')) %> -->
-
<FORM ACTION="<% $p1 %>process/cust_credit.cgi" METHOD=POST>
<INPUT TYPE="hidden" NAME="crednum" VALUE="">
<INPUT TYPE="hidden" NAME="custnum" VALUE="<% $custnum %>">
@@ -44,7 +14,6 @@
<INPUT TYPE="hidden" NAME="otaker" VALUE="<% $otaker %>">
Credit
-
<% ntable("#cccccc", 2) %>
<TR>
@@ -56,11 +25,11 @@
<TD ALIGN="right">Amount</TD>
<TD BGCOLOR="#ffffff">$<INPUT TYPE="text" NAME="amount" VALUE="<% $amount %>" SIZE=8 MAXLENGTH=8></TD>
</TR>
+
%
%#print qq! <INPUT TYPE="checkbox" NAME="refund" VALUE="$refund">Also post refund!;
%
-
<TR>
<TD ALIGN="right">Reason</TD>
<TD BGCOLOR="#ffffff"><INPUT TYPE="text" NAME="reason" VALUE="<% $reason %>" SIZE=32></TD>
@@ -74,7 +43,38 @@
</TABLE>
<BR>
+
<CENTER><INPUT TYPE="submit" VALUE="Enter credit"></CENTER>
- </FORM>
- </BODY>
+
+</FORM>
+</BODY>
</HTML>
+
+<%once>
+my $conf = new FS::Conf;
+</%once>
+
+<%init>
+my($custnum, $amount, $reason);
+if ( $cgi->param('error') ) {
+ #$cust_credit = new FS::cust_credit ( {
+ # map { $_, scalar($cgi->param($_)) } fields('cust_credit')
+ #} );
+ $custnum = $cgi->param('custnum');
+ $amount = $cgi->param('amount');
+ #$refund = $cgi->param('refund');
+ $reason = $cgi->param('reason');
+} else {
+ my($query) = $cgi->keywords;
+ $query =~ /^(\d+)$/;
+ $custnum = $1;
+ $amount = '';
+ #$refund = 'yes';
+ $reason = '';
+}
+my $_date = time;
+
+my $otaker = getotaker;
+
+my $p1 = popurl(1);
+</%init>
Index: cust_pay.cgi
===================================================================
RCS file: /home/cvs/cvsroot/freeside/httemplate/edit/cust_pay.cgi,v
retrieving revision 1.23
retrieving revision 1.24
diff -u -d -r1.23 -r1.24
--- cust_pay.cgi 23 Aug 2006 22:25:37 -0000 1.23
+++ cust_pay.cgi 24 Aug 2006 01:37:19 -0000 1.24
@@ -1,61 +1,14 @@
-%
-%
-%my $conf = new FS::Conf;
-%
-%my %payby = (
-% 'BILL' => 'Check',
-% 'CASH' => 'Cash',
-% 'WEST' => 'Western Union',
-% 'MCRD' => 'Manual credit card',
-%);
-%
-%my($link, $linknum, $paid, $payby, $payinfo, $_date);
-%if ( $cgi->param('error') ) {
-% $link = $cgi->param('link');
-% $linknum = $cgi->param('linknum');
-% $paid = $cgi->param('paid');
-% $payby = $cgi->param('payby');
-% $payinfo = $cgi->param('payinfo');
-% $_date = $cgi->param('_date') ? str2time($cgi->param('_date')) : time;
-%} elsif ( $cgi->param('custnum') =~ /^(\d+)$/ ) {
-% $link = $cgi->param('popup') ? 'popup' : 'custnum';
-% $linknum = $1;
-% $paid = '';
-% $payby = $cgi->param('payby') || 'BILL';
-% $payinfo = '';
-% $_date = time;
-%} elsif ( $cgi->param('invnum') =~ /^(\d+)$/ ) {
-% $link = 'invnum';
-% $linknum = $1;
-% $paid = '';
-% $payby = $cgi->param('payby') || 'BILL';
-% $payinfo = "";
-% $_date = time;
-%} else {
-% die "illegal query ". $cgi->keywords;
-%}
-%
-%my $paybatch = "webui-$_date-$$-". rand() * 2**32;
-%
-%my $title = 'Post '. $payby{$payby}. ' payment';
-%$title .= " against Invoice #$linknum" if $link eq 'invnum';
-%
-%if ( $link eq 'popup' ) {
-%
-%
-<% include('/elements/header-popup.html', $title ) %>
+% if ( $link eq 'popup' ) {
+ <% include('/elements/header-popup.html', $title ) %>
% } else {
-
-
-<% include("/elements/header.html", $title, '') %>
+ <% include("/elements/header.html", $title, '') %>
% }
-% if ( $cgi->param('error') ) {
-<FONT SIZE="+1" COLOR="#ff0000">Error: <% $cgi->param('error') %></FONT>
-<BR><BR>
+% if ( $cgi->param('error') ) {
+ <FONT SIZE="+1" COLOR="#ff0000">Error: <% $cgi->param('error') %></FONT>
+ <BR><BR>
% }
-
<LINK REL="stylesheet" TYPE="text/css" HREF="../elements/calendar-win2k-2.css" TITLE="win2k-2">
<SCRIPT TYPE="text/javascript" SRC="../elements/calendar_stripped.js"></SCRIPT>
<SCRIPT TYPE="text/javascript" SRC="../elements/calendar-en.js"></SCRIPT>
@@ -64,28 +17,17 @@
<FORM ACTION="<% popurl(1) %>process/cust_pay.cgi" METHOD=POST>
<INPUT TYPE="hidden" NAME="link" VALUE="<% $link %>">
<INPUT TYPE="hidden" NAME="linknum" VALUE="<% $linknum %>">
-%
-%my $money_char = $conf->config('money_char') || '$';
-%my $custnum;
-%if ( $link eq 'invnum' ) {
-% my $cust_bill = qsearchs('cust_bill', { 'invnum' => $linknum } )
-% or die "unknown invnum $linknum";
-% $custnum = $cust_bill->custnum;
-%} elsif ( $link eq 'custnum' ) {
-% $custnum = $linknum;
-%}
-%
-% unless ( $link eq 'popup' ) {
-<% small_custview($custnum, $conf->config('countrydefault')) %>
+% unless ( $link eq 'popup' ) {
+ <% small_custview($custnum, $conf->config('countrydefault')) %>
% }
-
<INPUT TYPE="hidden" NAME="payby" VALUE="<% $payby %>">
<BR><BR>
Payment
<% ntable("#cccccc", 2) %>
+
<TR>
<TD ALIGN="right">Date</TD>
<TD COLSPAN=2>
@@ -93,6 +35,7 @@
<IMG SRC="../images/calendar.png" ID="_date_button" STYLE="cursor: pointer" TITLE="Select date">
</TD>
</TR>
+
<SCRIPT TYPE="text/javascript">
Calendar.setup({
inputField: "_date_text",
@@ -101,33 +44,37 @@
align: "BR"
});
</SCRIPT>
+
<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> by <B><% $payby{$payby} %></B></TD>
</TR>
-% if ( $payby eq 'BILL' ) {
-
+% 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' ) {
+% if ( $link eq 'custnum' || $link eq 'popup' ) {
<TD ALIGN="right">Auto-apply<BR>to invoices</TD>
- <TD COLSPAN=2><SELECT NAME="apply"><OPTION VALUE="yes" SELECTED>yes<OPTION>no</SELECT></TD>
+ <TD COLSPAN=2>
+ <SELECT NAME="apply">
+ <OPTION VALUE="yes" SELECTED>yes
+ <OPTION>no</SELECT>
+ </TD>
+
% } elsif ( $link eq 'invnum' ) {
<TD ALIGN="right">Apply to</TD>
<TD COLSPAN=2 BGCOLOR="#ffffff">Invoice #<B><% $linknum %></B> only</TD>
<INPUT TYPE="hidden" NAME="apply" VALUE="no">
-% }
+% }
</TR>
</TABLE>
@@ -136,6 +83,63 @@
<BR>
<INPUT TYPE="submit" VALUE="Post payment">
- </FORM>
- </BODY>
+
+</FORM>
+</BODY>
</HTML>
+
+<%once>
+my $conf = new FS::Conf;
+
+my %payby = (
+ 'BILL' => 'Check',
+ 'CASH' => 'Cash',
+ 'WEST' => 'Western Union',
+ 'MCRD' => 'Manual credit card',
+);
+
+my $money_char = $conf->config('money_char') || '$';
+</%once>
+
+<%init>
+my($link, $linknum, $paid, $payby, $payinfo, $_date);
+if ( $cgi->param('error') ) {
+ $link = $cgi->param('link');
+ $linknum = $cgi->param('linknum');
+ $paid = $cgi->param('paid');
+ $payby = $cgi->param('payby');
+ $payinfo = $cgi->param('payinfo');
+ $_date = $cgi->param('_date') ? str2time($cgi->param('_date')) : time;
+} elsif ( $cgi->param('custnum') =~ /^(\d+)$/ ) {
+ $link = $cgi->param('popup') ? 'popup' : 'custnum';
+ $linknum = $1;
+ $paid = '';
+ $payby = $cgi->param('payby') || 'BILL';
+ $payinfo = '';
+ $_date = time;
+} elsif ( $cgi->param('invnum') =~ /^(\d+)$/ ) {
+ $link = 'invnum';
+ $linknum = $1;
+ $paid = '';
+ $payby = $cgi->param('payby') || 'BILL';
+ $payinfo = "";
+ $_date = time;
+} else {
+ die "illegal query ". $cgi->keywords;
+}
+
+my $paybatch = "webui-$_date-$$-". rand() * 2**32;
+
+my $title = 'Post '. $payby{$payby}. ' payment';
+$title .= " against Invoice #$linknum" if $link eq 'invnum';
+
+my $custnum;
+if ( $link eq 'invnum' ) {
+ my $cust_bill = qsearchs('cust_bill', { 'invnum' => $linknum } )
+ or die "unknown invnum $linknum";
+ $custnum = $cust_bill->custnum;
+} elsif ( $link eq 'custnum' ) {
+ $custnum = $linknum;
+}
+</%init>
+
- Previous message: [freeside-commits] freeside/httemplate/view/cust_main billing.html,
1.6, 1.7 contacts.html, 1.4, 1.5 misc.html, 1.3,
1.4 order_pkg.html, 1.1, 1.2 packages.html, 1.7,
1.8 payment_history.html, 1.13, 1.14 quick-charge.html, 1.4,
1.5 tickets.html, 1.6, 1.7
- Next message: [freeside-commits] freeside/httemplate/edit/cust_main
select-country.html, 1.4, 1.5 select-county.html, 1.3,
1.4 select-state.html, 1.3, 1.4
- Messages sorted by:
[ date ]
[ thread ]
[ subject ]
[ author ]
More information about the freeside-commits
mailing list