From ca2f12276eb88b2e71762c76974ae564f008b8c1 Mon Sep 17 00:00:00 2001 From: Christopher Burger Date: Tue, 2 Jan 2018 19:47:44 -0500 Subject: 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. --- httemplate/elements/tr-select-payment_options.html | 68 ++++++++++++++++++++++ 1 file changed, 68 insertions(+) create mode 100644 httemplate/elements/tr-select-payment_options.html (limited to 'httemplate/elements/tr-select-payment_options.html') diff --git a/httemplate/elements/tr-select-payment_options.html b/httemplate/elements/tr-select-payment_options.html new file mode 100644 index 000000000..5197c3706 --- /dev/null +++ b/httemplate/elements/tr-select-payment_options.html @@ -0,0 +1,68 @@ + + + <% mt('Payment options') |h %> + + + + + + <& /elements/tr-select-invoice.html, + %opt + &> + + <& /elements/tr-amount_fee.html, + %opt + &> + + + +<%init> + +my %opt = @_; + + \ No newline at end of file -- cgit v1.2.1 From 9d90ce6a6d2c107c0a3bcb7451932b7108466c27 Mon Sep 17 00:00:00 2001 From: Christopher Burger Date: Wed, 3 Jan 2018 10:43:28 -0500 Subject: RT# 34134 - added documentation for new feature --- httemplate/elements/tr-select-payment_options.html | 27 +++++++++++++++++++++- 1 file changed, 26 insertions(+), 1 deletion(-) (limited to 'httemplate/elements/tr-select-payment_options.html') diff --git a/httemplate/elements/tr-select-payment_options.html b/httemplate/elements/tr-select-payment_options.html index 5197c3706..3c50e88d8 100644 --- a/httemplate/elements/tr-select-payment_options.html +++ b/httemplate/elements/tr-select-payment_options.html @@ -1,3 +1,25 @@ +<%doc> + +Example: + + include( '/elements/tr-select-payment_options.html', + + #opt - most get used in /elements/tr-amount-fee + 'custnum' => 4, # customer number needed for selecting invoices + 'prefix' => 'pre', # prefix to fields and row ID's + 'amount' => 1, # payment amount + 'process-pkgpart' => scalar($conf->config('manual_process-pkgpart', $cust_main->agentnum)), + 'process-display' => scalar($conf->config('manual_process-display')), + 'process-skip_first' => $conf->exists('manual_process-skip_first'), + 'num_payments' => scalar($cust_main->cust_pay), + 'surcharge_percentage' => + ( $payby eq 'CARD' + ? scalar($conf->config('credit-card-surcharge-percentage', $cust_main->agentnum)) + : 0 + ), + ) + + <% mt('Payment options') |h %> @@ -17,7 +39,8 @@ <& /elements/tr-select-invoice.html, - %opt + 'custnum' => $opt{custnum}, + 'prefix' => $opt{prefix}, &> <& /elements/tr-amount_fee.html, @@ -31,6 +54,7 @@ if ( what.value == 'select' ) { document.getElementById('payment_amount_row').style.display = 'none'; document.getElementById('invoice_row').style.display = 'none'; + document.getElementById('<% $opt{prefix} %>invoice').value = 'select'; document.getElementById('amount').value = ''; } else if ( what.value == 'invoice' ) { @@ -41,6 +65,7 @@ else { document.getElementById('payment_amount_row').style.display = 'block'; document.getElementById('invoice_row').style.display = 'none'; + document.getElementById('<% $opt{prefix} %>invoice').value = 'select'; document.getElementById('amount').value = what.value; } -- cgit v1.2.1 From 5136b6e7f17e6d86911f7feb520dd5b4248532bb Mon Sep 17 00:00:00 2001 From: Christopher Burger Date: Wed, 3 Jan 2018 14:09:38 -0500 Subject: RT# 34134 - fixed error where payment amount field is hidden in self service. --- httemplate/elements/tr-select-payment_options.html | 1 + 1 file changed, 1 insertion(+) (limited to 'httemplate/elements/tr-select-payment_options.html') diff --git a/httemplate/elements/tr-select-payment_options.html b/httemplate/elements/tr-select-payment_options.html index 3c50e88d8..2304c22d0 100644 --- a/httemplate/elements/tr-select-payment_options.html +++ b/httemplate/elements/tr-select-payment_options.html @@ -44,6 +44,7 @@ Example: &> <& /elements/tr-amount_fee.html, + 'row_style' => 'STYLE="display:none;"', %opt &> -- cgit v1.2.1