From fb3f24328beb8e4d8703ea0d5376cdaaa86533a0 Mon Sep 17 00:00:00 2001 From: Jonathan Prykop Date: Wed, 22 Apr 2015 19:46:28 -0500 Subject: [PATCH] RT#34134: Processing a Credit Card Payment on Accounts --- FS/FS/Conf.pm | 7 +++++++ httemplate/misc/payment.cgi | 4 +++- 2 files changed, 10 insertions(+), 1 deletion(-) diff --git a/FS/FS/Conf.pm b/FS/FS/Conf.pm index a37e5a6ef..c5c03ff08 100644 --- a/FS/FS/Conf.pm +++ b/FS/FS/Conf.pm @@ -2854,6 +2854,13 @@ and customer address. Include units.', }, { + 'key' => 'manual_process-single_invoice_amount', + 'section' => 'billing', + 'description' => 'When entering manual credit card and ACH payments, amount will not autofill if the customer has more than one open invoice', + 'type' => 'checkbox', + }, + + { 'key' => 'manual_process-pkgpart', 'section' => 'billing', 'description' => 'Package to add to each manual credit card and ACH payment entered by employees from the backend. Enabling this option may be in violation of your merchant agreement(s), so please check it(/them) carefully before enabling this option.', diff --git a/httemplate/misc/payment.cgi b/httemplate/misc/payment.cgi index 90b03c7e8..b83ad7166 100644 --- a/httemplate/misc/payment.cgi +++ b/httemplate/misc/payment.cgi @@ -273,7 +273,9 @@ my @states = sort { $a cmp $b } keys %states; my $amount = ''; if ( $balance > 0 ) { - $amount = $balance; + $amount = $balance + unless $conf->exists('manual_process-single_invoice_amount') + && ($cust_main->open_cust_bill != 1); } my $payunique = "webui-payment-". time. "-$$-". rand() * 2**32; -- 2.11.0