RT#34134: Processing a Credit Card Payment on Accounts
authorJonathan Prykop <jonathan@freeside.biz>
Thu, 23 Apr 2015 00:46:28 +0000 (19:46 -0500)
committerJonathan Prykop <jonathan@freeside.biz>
Wed, 29 Apr 2015 21:07:50 +0000 (16:07 -0500)
FS/FS/Conf.pm
httemplate/misc/payment.cgi

index 6a66163..4e2139b 100644 (file)
@@ -2822,6 +2822,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.',
index 90b03c7..b83ad71 100644 (file)
@@ -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;