From 45346fd655ba53b82c80b920da945cc0b87ece01 Mon Sep 17 00:00:00 2001 From: Ivan Kohler Date: Fri, 3 Aug 2012 13:09:05 -0700 Subject: selfservice payment fees, RT#18345 --- httemplate/misc/payment.cgi | 15 +-------------- 1 file changed, 1 insertion(+), 14 deletions(-) (limited to 'httemplate/misc/payment.cgi') diff --git a/httemplate/misc/payment.cgi b/httemplate/misc/payment.cgi index 1ae15b930..e221c600a 100644 --- a/httemplate/misc/payment.cgi +++ b/httemplate/misc/payment.cgi @@ -16,7 +16,7 @@ 'process-display' => scalar($conf->config('manual_process-display')), 'process-skip-first' => $conf->exists('manual_process-skip_first'), 'num_payments' => scalar($cust_main->cust_pay), - 'post_fee_callback' => $post_fee_callback, + 'surcharge_percentage' => scalar($conf->config('credit-card-surcharge-percentage')), &> <& /elements/tr-select-discount_term.html, @@ -269,19 +269,6 @@ if ( $balance > 0 ) { $amount = $balance; } -my $post_fee_callback = sub { - my( $amountref ) = @_; - - return unless $$amountref > 0; - - my $conf = new FS::Conf; - - my $cc_surcharge_pct = $conf->config('credit-card-surcharge-percentage'); - $$amountref += $$amountref * $cc_surcharge_pct/100 if $cc_surcharge_pct > 0; - - $$amountref = sprintf("%.2f", $$amountref); -}; - my $payunique = "webui-payment-". time. "-$$-". rand() * 2**32; -- cgit v1.2.1 From 0d8eb2d4d4a372680d0fa564fbfcba0d6674b259 Mon Sep 17 00:00:00 2001 From: Ivan Kohler Date: Sat, 4 Aug 2012 09:26:23 -0700 Subject: fix skipping processing fee for first payment, RT#18345 --- httemplate/misc/payment.cgi | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'httemplate/misc/payment.cgi') diff --git a/httemplate/misc/payment.cgi b/httemplate/misc/payment.cgi index e221c600a..2d7307233 100644 --- a/httemplate/misc/payment.cgi +++ b/httemplate/misc/payment.cgi @@ -14,7 +14,7 @@ 'amount' => $amount, 'process-pkgpart' => scalar($conf->config('manual_process-pkgpart')), 'process-display' => scalar($conf->config('manual_process-display')), - 'process-skip-first' => $conf->exists('manual_process-skip_first'), + 'process-skip_first' => $conf->exists('manual_process-skip_first'), 'num_payments' => scalar($cust_main->cust_pay), 'surcharge_percentage' => scalar($conf->config('credit-card-surcharge-percentage')), &> -- cgit v1.2.1 From 7acc76e0ead0d88cb225c88016c778c8feb9a075 Mon Sep 17 00:00:00 2001 From: Mark Wells Date: Sun, 26 Aug 2012 23:05:04 -0700 Subject: only show coordinate fields where necessary, #940 --- httemplate/misc/payment.cgi | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'httemplate/misc/payment.cgi') diff --git a/httemplate/misc/payment.cgi b/httemplate/misc/payment.cgi index 2d7307233..b4e3a6f82 100644 --- a/httemplate/misc/payment.cgi +++ b/httemplate/misc/payment.cgi @@ -78,7 +78,7 @@ <& /elements/location.html, - 'object' => $cust_main, #XXX errors??? + 'object' => $cust_main->bill_location, 'no_asterisks' => 1, 'address1_label' => emt('Card billing address'), &> @@ -251,6 +251,10 @@ my $custnum = $1; my $cust_main = qsearchs( 'cust_main', { 'custnum'=>$custnum } ); die "unknown custnum $custnum" unless $cust_main; +my $location = $cust_main->bill_location; +# no proper error handling on this anyway, but when we have it, +# remember to repopulate fields in $location + my $balance = $cust_main->balance; my $payinfo = ''; -- cgit v1.2.1 From 97bd512eba99c5d3b6c6f5ae5bfeaa48eeee1cd4 Mon Sep 17 00:00:00 2001 From: Ivan Kohler Date: Mon, 10 Sep 2012 17:25:11 -0700 Subject: make selfservice_process-pkgpart and manual_process-pkgpart into agent overrides, RT#19304 --- httemplate/misc/payment.cgi | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'httemplate/misc/payment.cgi') diff --git a/httemplate/misc/payment.cgi b/httemplate/misc/payment.cgi index b4e3a6f82..5b9f63dc0 100644 --- a/httemplate/misc/payment.cgi +++ b/httemplate/misc/payment.cgi @@ -12,7 +12,8 @@ <& /elements/tr-amount_fee.html, 'amount' => $amount, - 'process-pkgpart' => scalar($conf->config('manual_process-pkgpart')), + '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), -- cgit v1.2.1