[freeside-commits] branch FREESIDE_3_BRANCH updated. b8a2ca1082333950aed46d6d388cf3eb57eb62a5

Christopher Burger burgerc at freeside.biz
Tue Oct 30 12:21:51 PDT 2018


The branch, FREESIDE_3_BRANCH has been updated
       via  b8a2ca1082333950aed46d6d388cf3eb57eb62a5 (commit)
       via  3872c1d3a2d975989e342be389b8260bfcc5ec41 (commit)
      from  fe3d7a23f0ebda93058085b9d439a18a36247f42 (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 b8a2ca1082333950aed46d6d388cf3eb57eb62a5
Merge: 3872c1d3a fe3d7a23f
Author: Christopher Burger <burgerc at freeside.biz>
Date:   Tue Oct 30 15:21:11 2018 -0400

    Merge branch 'FREESIDE_3_BRANCH' of ssh://git.freeside.biz/home/git/freeside into FREESIDE_3_BRANCH


commit 3872c1d3a2d975989e342be389b8260bfcc5ec41
Author: Christopher Burger <burgerc at freeside.biz>
Date:   Tue Oct 30 11:07:15 2018 -0400

    RT# 79902 - fixed so change payment information link will still work when upgraded from V3 to V4 and restores functionality in V3
    
    Conflicts:
            FS/FS/ClientAPI/MyAccount.pm
            fs_selfservice/FS-SelfService/cgi/selfservice.cgi

diff --git a/FS/FS/ClientAPI/MyAccount.pm b/FS/FS/ClientAPI/MyAccount.pm
index 9e1a4adc4..cb6a938da 100644
--- a/FS/FS/ClientAPI/MyAccount.pm
+++ b/FS/FS/ClientAPI/MyAccount.pm
@@ -613,6 +613,7 @@ sub customer_info_short {
       $return{payinfo} = $cust_main->paymask;
       @return{'month', 'year'} = $cust_main->paydate_monthyear;
     }
+    else { delete $return{'payinfo'}; }
     
     my @invoicing_list = $cust_main->invoicing_list;
     $return{'invoicing_list'} =
diff --git a/fs_selfservice/FS-SelfService/cgi/change_pay.html b/fs_selfservice/FS-SelfService/cgi/change_pay.html
index f90f6d92b..75ceee8f7 100644
--- a/fs_selfservice/FS-SelfService/cgi/change_pay.html
+++ b/fs_selfservice/FS-SelfService/cgi/change_pay.html
@@ -14,6 +14,7 @@
 
   my $tail = qq(</TABLE>).
              qq(<INPUT TYPE="hidden" NAME="action" VALUE="process_change_pay">).
+             qq(<INPUT TYPE="hidden" NAME="custpaybynum" VALUE="$custpaybynum">).
              qq(<BR>).
              qq(<INPUT TYPE="submit" NAME="process" ).
              qq(VALUE="Save payment information"> ).
@@ -60,9 +61,6 @@
   delete $options{'DCRD'} unless $payby eq 'DCRD' || ! exists $options{'CARD'};
   delete $options{'DCHK'} unless $payby eq 'DCHK' || ! exists $options{'CHEK'};
 
-  ## set default layer to first payby.
-  @p = keys %options; $payby = $p[0];
-
   HTML::Widgets::SelectLayers->new(
     options => \%options,
     selected_layer => $payby,
diff --git a/fs_selfservice/FS-SelfService/cgi/selfservice.cgi b/fs_selfservice/FS-SelfService/cgi/selfservice.cgi
index 831c0590a..dcfccdc5c 100755
--- a/fs_selfservice/FS-SelfService/cgi/selfservice.cgi
+++ b/fs_selfservice/FS-SelfService/cgi/selfservice.cgi
@@ -306,8 +306,9 @@ sub process_change_ship {
 sub process_change_pay {
         my $postal = $cgi->param( 'postal_invoicing' );
         my $payby  = $cgi->param( 'payby' );
+        $cgi->param('paydate', $cgi->param('year') . '-' . $cgi->param('month') . '-01');
         my @list =
-          qw( payby payinfo payinfo1 payinfo2 month year payname
+          qw( payby payinfo payinfo1 payinfo2 month year paydate payname custpaybynum
               address1 address2 city county state zip country auto paytype
               paystate ss stateid stateid_state invoicing_list
             );
@@ -325,7 +326,11 @@ sub process_change_pay {
           };
         }
 
-        _process_change_info( 'change_pay', @list );
+        if (FS::SelfService->can('update_payby')) {
+          if ($cgi->param( 'custpaybynum' )) { _process_change_payby( 'change_pay', @list ); }
+          else { _process_insert_payby( 'change_pay', @list ); }
+        }
+        else { _process_change_info( 'change_pay', @list ); }
 }
 
 sub view_invoice {

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

Summary of changes:
 FS/FS/ClientAPI/MyAccount.pm                      | 1 +
 fs_selfservice/FS-SelfService/cgi/change_pay.html | 4 +---
 fs_selfservice/FS-SelfService/cgi/selfservice.cgi | 9 +++++++--
 3 files changed, 9 insertions(+), 5 deletions(-)




More information about the freeside-commits mailing list