[freeside-commits] branch master updated. e322fbb08d0f837be3f3f8e7c92a4a5bc75030ad

Ivan ivan at 420.am
Sun Oct 16 15:12:39 PDT 2016


The branch, master has been updated
       via  e322fbb08d0f837be3f3f8e7c92a4a5bc75030ad (commit)
       via  1c3dfc13e3eaf4a0d2fc213111dcbf12608ee81c (commit)
       via  e028b9d72c6863b374e3241fcbac0e1b604f8f40 (commit)
      from  f81c236b2f3b5fe8777b04ee78b793b301eef9fd (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 e322fbb08d0f837be3f3f8e7c92a4a5bc75030ad
Merge: 1c3dfc1 f81c236
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Sun Oct 16 15:12:35 2016 -0700

    Merge branch 'master' of git.freeside.biz:/home/git/freeside


commit 1c3dfc13e3eaf4a0d2fc213111dcbf12608ee81c
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Sun Oct 16 15:12:32 2016 -0700

    style

diff --git a/httemplate/elements/freeside.css b/httemplate/elements/freeside.css
index 8545ee5..1155b0c 100644
--- a/httemplate/elements/freeside.css
+++ b/httemplate/elements/freeside.css
@@ -236,7 +236,7 @@ div.fstabcontainer {
   font-weight:normal;
   font-size:80%;
   vertical-align: top;
-  padding-top: 3px;
+  padding-top: 5px;
   color: #666666;
 }
 

commit e028b9d72c6863b374e3241fcbac0e1b604f8f40
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Sun Oct 16 15:11:56 2016 -0700

    agent-virtualize credit card surcharge percentage, RT#72961

diff --git a/FS/FS/ClientAPI/MasonComponent.pm b/FS/FS/ClientAPI/MasonComponent.pm
index 493e0c0..3a4bfe1 100644
--- a/FS/FS/ClientAPI/MasonComponent.pm
+++ b/FS/FS/ClientAPI/MasonComponent.pm
@@ -62,7 +62,7 @@ my %session_callbacks = (
       'process-display'    => scalar($conf->config('selfservice_process-display')),
       'process-skip_first' => $conf->exists('selfservice_process-skip_first'),
       'num_payments'       => scalar($cust_main->cust_pay), 
-      'surcharge_percentage' => scalar($conf->config('credit-card-surcharge-percentage')),
+      'surcharge_percentage' => scalar($conf->config('credit-card-surcharge-percentage', $cust_main->agentnum)),
     );
     @$argsref = ( %args );
 
diff --git a/FS/FS/ClientAPI/MyAccount.pm b/FS/FS/ClientAPI/MyAccount.pm
index 07b1be9..7c17ae3 100644
--- a/FS/FS/ClientAPI/MyAccount.pm
+++ b/FS/FS/ClientAPI/MyAccount.pm
@@ -848,7 +848,6 @@ sub payment_info {
 
       'save_unchecked' => $conf->exists('selfservice-save_unchecked'),
 
-      'credit_card_surcharge_percentage' => scalar($conf->config('credit-card-surcharge-percentage')),
     };
 
   }
@@ -914,6 +913,8 @@ sub payment_info {
   $return{payunique} = "webui-MyAccount-$_date-$$-". rand() * 2**32; #new
   $return{paybatch} = $return{payunique};  #back compat
 
+  $return{credit_card_surcharge_percentage} = $conf->config('credit-card-surcharge-percentage', $cust_main->agentnum);
+
   return { 'error' => '',
            %return,
          };
diff --git a/FS/FS/cust_main/Billing_Realtime.pm b/FS/FS/cust_main/Billing_Realtime.pm
index 2951360..cb7299b 100644
--- a/FS/FS/cust_main/Billing_Realtime.pm
+++ b/FS/FS/cust_main/Billing_Realtime.pm
@@ -418,8 +418,8 @@ sub realtime_bop {
 
   my $cc_surcharge = 0;
   my $cc_surcharge_pct = 0;
-  $cc_surcharge_pct = $conf->config('credit-card-surcharge-percentage') 
-    if $conf->config('credit-card-surcharge-percentage')
+  $cc_surcharge_pct = $conf->config('credit-card-surcharge-percentage', $self->agentnum) 
+    if $conf->config('credit-card-surcharge-percentage', $self->agentnum)
     && $options{method} eq 'CC';
 
   # always add cc surcharge if called from event 
diff --git a/httemplate/misc/payment.cgi b/httemplate/misc/payment.cgi
index a3db58f..24248eb 100644
--- a/httemplate/misc/payment.cgi
+++ b/httemplate/misc/payment.cgi
@@ -21,7 +21,7 @@
        'num_payments'       => scalar($cust_main->cust_pay), 
        'surcharge_percentage' =>
          ( $payby eq 'CARD'
-             ? scalar($conf->config('credit-card-surcharge-percentage'))
+             ? scalar($conf->config('credit-card-surcharge-percentage', $cust_main->agentnum))
              : 0
          ),
   &>

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

Summary of changes:
 FS/FS/ClientAPI/MasonComponent.pm   |    2 +-
 FS/FS/ClientAPI/MyAccount.pm        |    3 ++-
 FS/FS/cust_main/Billing_Realtime.pm |    4 ++--
 httemplate/elements/freeside.css    |    2 +-
 httemplate/misc/payment.cgi         |    2 +-
 5 files changed, 7 insertions(+), 6 deletions(-)




More information about the freeside-commits mailing list