diff options
author | Mark Wells <mark@freeside.biz> | 2012-03-29 14:27:55 -0700 |
---|---|---|
committer | Mark Wells <mark@freeside.biz> | 2012-03-29 14:32:13 -0700 |
commit | 8f43e32350b7f8a0925959f747f7296b9b42c09e (patch) | |
tree | 0ab9172972d9eea243bf7667a1c9609332769e1f /httemplate/edit | |
parent | 09bdd45e0a95601b7c51c5dbbef03793f320a61d (diff) |
additional fields for cash payments, #16821
Diffstat (limited to 'httemplate/edit')
-rwxr-xr-x | httemplate/edit/cust_pay.cgi | 26 | ||||
-rwxr-xr-x | httemplate/edit/process/cust_pay.cgi | 5 |
2 files changed, 28 insertions, 3 deletions
diff --git a/httemplate/edit/cust_pay.cgi b/httemplate/edit/cust_pay.cgi index 3fd9c79eb..7a1bb00fa 100755 --- a/httemplate/edit/cust_pay.cgi +++ b/httemplate/edit/cust_pay.cgi @@ -18,7 +18,7 @@ <INPUT TYPE="hidden" NAME="payby" VALUE="<% $payby %>"> <INPUT TYPE="hidden" NAME="paybatch" VALUE="<% $paybatch %>"> -<BR><BR> +<BR> <% mt('Payment') |h %> <% ntable("#cccccc", 2) %> @@ -56,7 +56,29 @@ <TD ALIGN="right"><% mt('Check #') |h %></TD> <TD COLSPAN=2><INPUT TYPE="text" NAME="payinfo" VALUE="<% $payinfo %>" SIZE=10></TD> </TR> -% } +% } +% elsif ( $payby eq 'CASH' and $conf->exists('require_cash_deposit_info') ) { + <TR> + <TD ALIGN="right"><% mt('Bank') |h %></TD> + <TD COLSPAN=3><INPUT TYPE="text" NAME="bank" VALUE="<% $cgi->param('bank') %>"></TD> + </TR> + <TR> + <TD ALIGN="right"><% mt('Check #') |h %></TD> + <TD COLSPAN=2><INPUT TYPE="text" NAME="payinfo" VALUE="<% $payinfo %>" SIZE=10></TD> + </TR> + <TR> + <TD ALIGN="right"><% mt('Teller #') |h %></TD> + <TD COLSPAN=2><INPUT TYPE="text" NAME="teller" VALUE="<% $cgi->param('teller') %>" SIZE=10></TD> + </TR> + <TR> + <TD ALIGN="right"><% mt('Depositor') |h %></TD> + <TD COLSPAN=3><INPUT TYPE="text" NAME="depositor" VALUE="<% $cgi->param('depositor') %>"></TD> + </TR> + <TR> + <TD ALIGN="right"><% mt('Account #') |h %></TD> + <TD COLSPAN=2><INPUT TYPE="text" NAME="account" VALUE="<% $cgi->param('account') %>" SIZE=18></TD> + </TR> +% } <TR> % if ( $link eq 'custnum' || $link eq 'popup' ) { diff --git a/httemplate/edit/process/cust_pay.cgi b/httemplate/edit/process/cust_pay.cgi index e74f9022f..06f5e64d5 100755 --- a/httemplate/edit/process/cust_pay.cgi +++ b/httemplate/edit/process/cust_pay.cgi @@ -28,6 +28,8 @@ %} <%init> +my $conf = FS::Conf->new; + $cgi->param('linknum') =~ /^(\d+)$/ or die "Illegal linknum: ". $cgi->param('linknum'); my $linknum = $1; @@ -46,6 +48,7 @@ my $new = new FS::cust_pay ( { $_, scalar($cgi->param($_)); } qw( paid payby payinfo paybatch pkgnum discount_term + bank depositor account teller ) #} fields('cust_pay') } ); @@ -57,6 +60,6 @@ push @rights, 'Post cash payment' if $new->payby eq 'CASH'; die "access denied" unless $FS::CurrentUser::CurrentUser->access_right(\@rights); -my $error = $new->insert( 'manual' => 1 ); +my $error ||= $new->insert( 'manual' => 1 ); </%init> |