summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristopher Burger <burgerc@freeside.biz>2018-01-02 19:47:44 -0500
committerChristopher Burger <burgerc@freeside.biz>2018-06-19 12:28:35 -0400
commitc187712be2bdaf85586bfcf6b4070dbe165a33dd (patch)
treecb0a3cadeea43b7944e2fad8253db93bea146cff
parent697a391b0449e62b593a6cd4931aa457d9a0c45d (diff)
RT# 34134 - removed payment amount field from payment screen, added 3 payment options (pay full balance, pay specific invoice, pay another amount) which will prefill the payment amount field.
Conflicts: httemplate/elements/tr-select-payment_options.html
-rw-r--r--httemplate/elements/tr-amount_fee.html4
-rw-r--r--httemplate/elements/tr-select-invoice.html25
-rw-r--r--httemplate/misc/payment.cgi3
3 files changed, 29 insertions, 3 deletions
diff --git a/httemplate/elements/tr-amount_fee.html b/httemplate/elements/tr-amount_fee.html
index e3b8d7800..f174cf5cc 100644
--- a/httemplate/elements/tr-amount_fee.html
+++ b/httemplate/elements/tr-amount_fee.html
@@ -1,4 +1,4 @@
- <TR>
+ <TR ID="payment_amount_row" STYLE="display:none;">
<TH ALIGN="right"><% mt('Payment amount') |h %></TH>
<TD COLSPAN=7>
<TABLE><TR><TD BGCOLOR="#ffffff">
@@ -15,7 +15,7 @@
onKeyPress = "amount_changed(this)"
% }
>
- </TD><TD BGCOLOR="#cccccc">
+ </TD><TD BGCOLOR="<% length($fee) ? '#cccccc' : '#ffffff' %>">
% if ( $fee ) {
<INPUT TYPE="hidden" NAME="fee_pkgpart" VALUE="<% $fee_pkg->pkgpart %>">
<INPUT TYPE="hidden" NAME="fee" VALUE="<% $fee_display eq 'add' ? $fee : '' %>">
diff --git a/httemplate/elements/tr-select-invoice.html b/httemplate/elements/tr-select-invoice.html
new file mode 100644
index 000000000..03625b659
--- /dev/null
+++ b/httemplate/elements/tr-select-invoice.html
@@ -0,0 +1,25 @@
+
+ <TR ID="invoice_row" STYLE="display:none;">
+ <TH ALIGN="right"><% mt('Open invoices') |h %></TH>
+ <TD COLSPAN=7>
+ <SELECT
+ ID = "<% $opt{prefix} %>invoice"
+ NAME = "<% $opt{prefix} %>invoice"
+ onChange = "<% $opt{prefix} %>invoice_select_changed(this)"
+ <% $opt{disabled} %>
+ >
+ <OPTION VALUE="select">Select an invoice to pay</OPTION>
+% foreach my $record (@records) {
+% my $read_date = time2str("%b %o, %Y", $record->_date);
+ <OPTION VALUE="<% $record->charged %>"><% $record->invnum %> (<% $read_date %>) - <% $record->charged %></OPTION>
+% }
+
+ </SELECT>
+ </TD>
+ </TR>
+
+<%init>
+
+my %opt = @_;
+
+</%init>
diff --git a/httemplate/misc/payment.cgi b/httemplate/misc/payment.cgi
index b170da27b..f754f5a32 100644
--- a/httemplate/misc/payment.cgi
+++ b/httemplate/misc/payment.cgi
@@ -12,7 +12,8 @@
<TABLE class="fsinnerbox">
- <& /elements/tr-amount_fee.html,
+ <& /elements/tr-select-payment_options.html,
+ 'custnum' => $cust_main->custnum,
'amount' => $amount,
'process-pkgpart' =>
scalar($conf->config('manual_process-pkgpart', $cust_main->agentnum)),