[freeside-commits] branch master updated. 2b10c0594ff2ab9ce37d9f8af9c154d3bedde731

Ivan ivan at 420.am
Mon Sep 10 17:26:31 PDT 2012


The branch, master has been updated
       via  2b10c0594ff2ab9ce37d9f8af9c154d3bedde731 (commit)
       via  05669195e91e450449405bd3dc355e8e17f36565 (commit)
       via  97bd512eba99c5d3b6c6f5ae5bfeaa48eeee1cd4 (commit)
      from  f8c8b9782ff5400790c2fb6dae017ce01790e56e (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 2b10c0594ff2ab9ce37d9f8af9c154d3bedde731
Merge: 0566919 f8c8b97
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Mon Sep 10 17:26:18 2012 -0700

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


commit 05669195e91e450449405bd3dc355e8e17f36565
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Mon Sep 10 17:26:13 2012 -0700

    store a commission agentnum with credits?  RT#18231

diff --git a/FS/FS/Schema.pm b/FS/FS/Schema.pm
index 709e9f9..b1e7a9c 100644
--- a/FS/FS/Schema.pm
+++ b/FS/FS/Schema.pm
@@ -937,6 +937,7 @@ sub tables_hashref {
         'closed',    'char', 'NULL', 1, '', '', 
         'pkgnum', 'int', 'NULL', '', '', '', #desired pkgnum for pkg-balances
         'eventnum', 'int', 'NULL', '', '', '', #triggering event for commission
+        #'commission_agentnum', 'int', 'NULL', '', '', '', #
       ],
       'primary_key' => 'crednum',
       'unique' => [],

commit 97bd512eba99c5d3b6c6f5ae5bfeaa48eeee1cd4
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Mon Sep 10 17:25:11 2012 -0700

    make selfservice_process-pkgpart and manual_process-pkgpart into agent overrides, RT#19304

diff --git a/FS/FS/ClientAPI/MasonComponent.pm b/FS/FS/ClientAPI/MasonComponent.pm
index 61208c1..c4094ff 100644
--- a/FS/FS/ClientAPI/MasonComponent.pm
+++ b/FS/FS/ClientAPI/MasonComponent.pm
@@ -53,7 +53,8 @@ my %session_callbacks = (
     my %args = @$argsref;
     %args = (
       %args,
-      'process-pkgpart'    => scalar($conf->config('selfservice_process-pkgpart')),
+      'process-pkgpart'    =>
+        scalar($conf->config('selfservice_process-pkgpart', $cust_main->agentnum)),
       'process-display'    => scalar($conf->config('selfservice_process-display')),
       'process-skip_first' => $conf->exists('selfservice_process-skip_first'),
       'num_payments'       => scalar($cust_main->cust_pay), 
diff --git a/FS/FS/ClientAPI/MyAccount.pm b/FS/FS/ClientAPI/MyAccount.pm
index eddb164..3f7c004 100644
--- a/FS/FS/ClientAPI/MyAccount.pm
+++ b/FS/FS/ClientAPI/MyAccount.pm
@@ -14,6 +14,7 @@ use Business::CreditCard;
 use HTML::Entities;
 use Text::CSV_XS;
 use Spreadsheet::WriteExcel;
+use OLE::Storage_Lite;
 use FS::UI::Web::small_custview qw(small_custview); #less doh
 use FS::UI::Web;
 use FS::UI::bytecount qw( display_bytecount );
@@ -929,7 +930,7 @@ sub validate_payment {
   #changing the hidden form values
   my $conf = new FS::Conf;
   my $fee_display = $conf->config('selfservice_process-display') || 'add';
-  my $fee_pkgpart = $conf->config('selfservice_process-pkgpart');
+  my $fee_pkgpart = $conf->config('selfservice_process-pkgpart', $cust_main->agentnum);
   my $fee_skip_first = $conf->exists('selfservice_process-skip_first');
   if ( $fee_display eq 'add'
          and $fee_pkgpart
@@ -1101,7 +1102,7 @@ sub do_process_payment {
 
   #no error, so order the fee package if applicable...
   my $conf = new FS::Conf;
-  my $fee_pkgpart = $conf->config('selfservice_process-pkgpart');
+  my $fee_pkgpart = $conf->config('selfservice_process-pkgpart', $cust_main->agentnum);
   my $fee_skip_first = $conf->exists('selfservice_process-skip_first');
   
   if ( $fee_pkgpart and ! $fee_skip_first || scalar($cust_main->cust_pay) ) {
diff --git a/FS/FS/Conf.pm b/FS/FS/Conf.pm
index 42432b2..321ba0b 100644
--- a/FS/FS/Conf.pm
+++ b/FS/FS/Conf.pm
@@ -1363,7 +1363,7 @@ and customer address. Include units.',
   {
     'key'         => 'invoice_latexextracouponspace',
     'section'     => 'invoicing',
-    'description' => 'Optional LaTeX invoice textheight space to reserve for a tear off coupon. Include units.',
+    'description' => 'Optional LaTeX invoice textheight space to reserve for a tear off coupon.  Include units.  Default is 3.6cm',
     'type'        => 'text',
     'per_agent'   => 1,
     'validate'    => sub { shift =~
@@ -2555,6 +2555,7 @@ and customer address. Include units.',
     '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.',
     'type'        => 'select-part_pkg',
+    'per_agent'   => 1,
   },
 
   {
@@ -2580,6 +2581,7 @@ and customer address. Include units.',
     'section'     => 'billing',
     'description' => 'Package to add to each manual credit card and ACH payment entered by the customer themselves in the self-service interface.  Enabling this option may be in violation of your merchant agreement(s), so please check it(/them) carefully before enabling this option.',
     'type'        => 'select-part_pkg',
+    'per_agent'   => 1,
   },
 
   {
diff --git a/httemplate/misc/payment.cgi b/httemplate/misc/payment.cgi
index b4e3a6f..5b9f63d 100644
--- a/httemplate/misc/payment.cgi
+++ b/httemplate/misc/payment.cgi
@@ -12,7 +12,8 @@
 
   <& /elements/tr-amount_fee.html,
        'amount'             => $amount,
-       'process-pkgpart'    => scalar($conf->config('manual_process-pkgpart')),
+       'process-pkgpart'    => 
+          scalar($conf->config('manual_process-pkgpart', $cust_main->agentnum)),
        'process-display'    => scalar($conf->config('manual_process-display')),
        'process-skip_first' => $conf->exists('manual_process-skip_first'),
        'num_payments'       => scalar($cust_main->cust_pay), 

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

Summary of changes:
 FS/FS/ClientAPI/MasonComponent.pm |    3 ++-
 FS/FS/ClientAPI/MyAccount.pm      |    5 +++--
 FS/FS/Conf.pm                     |    4 +++-
 FS/FS/Schema.pm                   |    1 +
 httemplate/misc/payment.cgi       |    3 ++-
 5 files changed, 11 insertions(+), 5 deletions(-)




More information about the freeside-commits mailing list