[freeside-commits] branch FREESIDE_4_BRANCH updated. 5915943078b4b8276b929f2bd8d2ccaed6698ee2

Ivan Kohler ivan at freeside.biz
Thu Mar 3 17:17:18 PST 2022


The branch, FREESIDE_4_BRANCH has been updated
       via  5915943078b4b8276b929f2bd8d2ccaed6698ee2 (commit)
      from  68bf8db41738d35393d9f078b1bd2cf49f6121c0 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 5915943078b4b8276b929f2bd8d2ccaed6698ee2
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Thu Mar 3 17:17:17 2022 -0800

    don't forget auto-charge on customer edit with data upgraded from v3

diff --git a/httemplate/elements/cust_payby.html b/httemplate/elements/cust_payby.html
index 6404bcb33..6765df077 100644
--- a/httemplate/elements/cust_payby.html
+++ b/httemplate/elements/cust_payby.html
@@ -306,8 +306,11 @@ if ( $curr_value ) {
   $cust_payby = new FS::cust_payby {};
 }
 my $sel_payby = $cgi->param($name.'_payby') || $cust_payby->payby;
+# add a weight for CARD/CHEK imports, so we don't turn off auto-charge on edit
 # convert DCRD to CARD + no weight, and the same for DCHK/CHEK
-if ($sel_payby eq 'DCRD') {
+if ( $cust_payby->custpaybynum && $sel_payby =~ /^(CARD|CHEK)$/ && ! $cust_payby->weight ) {
+  $cust_payby->weight(1);
+} elsif ($sel_payby eq 'DCRD') {
   $sel_payby = 'CARD';
   $cust_payby->weight('');
 } elsif ($sel_payby eq 'DCHK') {

-----------------------------------------------------------------------

Summary of changes:
 httemplate/elements/cust_payby.html | 5 ++++-
 1 file changed, 4 insertions(+), 1 deletion(-)




More information about the freeside-commits mailing list