[freeside-commits] branch master updated. 434137989f7343ada30ceff4056c5f75ef8d9d27

Ivan ivan at 420.am
Sat Oct 24 15:44:48 PDT 2015


The branch, master has been updated
       via  434137989f7343ada30ceff4056c5f75ef8d9d27 (commit)
       via  a0e3c43f10daaff70886197ff40a47d92f2c345b (commit)
      from  50b038e338455c5d20f48f99767767b70c515c31 (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 434137989f7343ada30ceff4056c5f75ef8d9d27
Merge: a0e3c43 50b038e
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Sat Oct 24 15:44:30 2015 -0700

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


commit a0e3c43f10daaff70886197ff40a47d92f2c345b
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Sat Oct 24 15:44:27 2015 -0700

    remove obsolete usage of payby config, western union payments, etc., RT#23741

diff --git a/FS/FS/Conf.pm b/FS/FS/Conf.pm
index 647ae0b..a1b0e7c 100644
--- a/FS/FS/Conf.pm
+++ b/FS/FS/Conf.pm
@@ -2512,7 +2512,7 @@ and customer address. Include units.',
     'section'     => 'billing',
     'description' => 'Available payment types.',
     'type'        => 'selectmultiple',
-    'select_enum' => [ qw(CARD DCRD CHEK DCHK BILL CASH WEST MCRD MCHK PPAL) ],
+    'select_enum' => [ qw(CARD DCRD CHEK DCHK) ], #BILL CASH WEST MCRD MCHK PPAL) ],
   },
 
   {
diff --git a/httemplate/view/cust_bill.cgi b/httemplate/view/cust_bill.cgi
index 2ff3ca8..8884dde 100755
--- a/httemplate/view/cust_bill.cgi
+++ b/httemplate/view/cust_bill.cgi
@@ -19,7 +19,6 @@ function areyousure(href, message) {
 % }
 
 % if ( $cust_bill->owed > 0
-%      && scalar( grep $payby{$_}, qw(BILL CASH WEST MCRD MCHK) )
 %      && $curuser->access_right(['Post payment', 'Post check payment', 'Post cash payment'])
 %      && ! $conf->exists('pkg-balances')
 %    )
@@ -28,30 +27,30 @@ function areyousure(href, message) {
 
       <% mt('Post') |h %> 
 
-%     if ( $payby{'BILL'} && $curuser->access_right(['Post payment', 'Post check payment']) ) { 
+%     if ( $curuser->access_right(['Post payment', 'Post check payment']) ) { 
           <% $s++ ? ' | ' : '' %>
           <A HREF="<% $p %>edit/cust_pay.cgi?payby=BILL;invnum=<% $invnum %>"><% mt('check') |h %></A>
 %     } 
 
-%     if ( $payby{'CASH'} && $curuser->access_right(['Post payment', 'Post cash payment']) ) { 
+%     if ( $curuser->access_right(['Post payment', 'Post cash payment']) ) { 
           <% $s++ ? ' | ' : '' %>
           <A HREF="<% $p %>edit/cust_pay.cgi?payby=CASH;invnum=<% $invnum %>"><% mt('cash') |h %></A>
 %     } 
 
-%     if ( $payby{'WEST'} && $curuser->access_right(['Post payment']) ) { 
-          <% $s++ ? ' | ' : '' %>
-          <A HREF="<% $p %>edit/cust_pay.cgi?payby=WEST;invnum=<% $invnum %>"><% mt('Western Union') |h %></A>
-%     } 
-
-%     if ( $payby{'MCRD'} && $curuser->access_right(['Post payment']) ) { 
-          <% $s++ ? ' | ' : '' %>
-          <A HREF="<% $p %>edit/cust_pay.cgi?payby=MCRD;invnum=<% $invnum %>"><% mt('manual credit card') |h %></A>
-%     } 
-
-%     if ( $payby{'MCHK'} && $curuser->access_right(['Post payment']) ) { 
-          <% $s++ ? ' | ' : '' %>
-          <A HREF="<% $p %>edit/cust_pay.cgi?payby=MCHK;invnum=<% $invnum %>"><% mt('manual electronic check') |h %></A>
-%     } 
+%#  %     if ( $payby{'WEST'} && $curuser->access_right(['Post payment']) ) { 
+%#            <% $s++ ? ' | ' : '' %>
+%#            <A HREF="<% $p %>edit/cust_pay.cgi?payby=WEST;invnum=<% $invnum %>"><% mt('Western Union') |h %></A>
+%#  %     } 
+%#  
+%#  %     if ( $payby{'MCRD'} && $curuser->access_right(['Post payment']) ) { 
+%#            <% $s++ ? ' | ' : '' %>
+%#            <A HREF="<% $p %>edit/cust_pay.cgi?payby=MCRD;invnum=<% $invnum %>"><% mt('manual credit card') |h %></A>
+%#  %     } 
+%#  
+%#  %     if ( $payby{'MCHK'} && $curuser->access_right(['Post payment']) ) { 
+%#            <% $s++ ? ' | ' : '' %>
+%#            <A HREF="<% $p %>edit/cust_pay.cgi?payby=MCHK;invnum=<% $invnum %>"><% mt('manual electronic check') |h %></A>
+%#  %     } 
 
       <% mt('payment against this invoice') |h %><BR><BR>
 
@@ -167,11 +166,6 @@ my %opt = (
 
 $opt{'barcode_img'} = 1 if $conf->exists('invoice-barcode');
 
-my @payby =  grep /\w/, $conf->config('payby');
- at payby = (qw( CARD DCRD CHEK DCHK BILL CASH ))
-  unless @payby;
-my %payby = map { $_=>1 } @payby;
-
 my $cust_bill = qsearchs({
   'select'    => 'cust_bill.*',
   'table'     => 'cust_bill',
diff --git a/httemplate/view/cust_main/menu.html b/httemplate/view/cust_main/menu.html
index 5429e8e..b874063 100644
--- a/httemplate/view/cust_main/menu.html
+++ b/httemplate/view/cust_main/menu.html
@@ -418,7 +418,6 @@ my @menu = (
           width       => 763,
           height      => 392,
           acl         => [ 'Post payment', 'Post check payment' ],
-          condition   => sub { $payby{BILL} },
         },
         {
           label       => 'Enter cash payment',
@@ -427,35 +426,34 @@ my @menu = (
           width       => 763,
           height      => 392,
           acl         => [ 'Post payment', 'Post cash payment' ],
-          condition   => sub { $payby{CASH} },
-        },
-        {
-          label       => 'Enter Western Union payment',
-          popup       => "edit/cust_pay.cgi?popup=1;payby=WEST;custnum=$custnum",
-          actionlabel => 'Enter Western Union payment',
-          width       => 763,
-          height      => 392,
-          acl         => [ 'Post payment', ],
-          condition   => sub { $payby{WEST} },
-        },
-        {
-          label       => 'Record manual (offline/POS) credit card payment',
-          popup       => "edit/cust_pay.cgi?popup=1;payby=MCRD;custnum=$custnum",
-          actionlabel => 'Enter credit card payment',
-          width       => 763,
-          height      => 392,
-          acl         => [ 'Post payment', ],
-          condition   => sub { $payby{MCRD} },
-        },
-        {
-          label       => 'Record manual (offline/POS) electronic check',
-          popup       => "edit/cust_pay.cgi?popup=1;payby=MCHK;custnum=$custnum",
-          actionlabel => 'Enter credit card payment',
-          width       => 763,
-          height      => 392,
-          acl         => [ 'Post payment', ],
-          condition   => sub { $payby{MCHK} },
         },
+        #{
+        #  label       => 'Enter Western Union payment',
+        #  popup       => "edit/cust_pay.cgi?popup=1;payby=WEST;custnum=$custnum",
+        #  actionlabel => 'Enter Western Union payment',
+        #  width       => 763,
+        #  height      => 392,
+        #  acl         => [ 'Post payment', ],
+        ##  condition   => sub { $payby{WEST} },
+        #},
+        #{
+        #  label       => 'Record manual (offline/POS) credit card payment',
+        #  popup       => "edit/cust_pay.cgi?popup=1;payby=MCRD;custnum=$custnum",
+        #  actionlabel => 'Enter credit card payment',
+        #  width       => 763,
+        #  height      => 392,
+        #  acl         => [ 'Post payment', ],
+        ##  condition   => sub { $payby{MCRD} },
+        #},
+        #{
+        #  label       => 'Record manual (offline/POS) electronic check',
+        #  popup       => "edit/cust_pay.cgi?popup=1;payby=MCHK;custnum=$custnum",
+        #  actionlabel => 'Enter credit card payment',
+        #  width       => 763,
+        #  height      => 392,
+        #  acl         => [ 'Post payment', ],
+        ##  condition   => sub { $payby{MCHK} },
+        #},
       ],
     },
 
@@ -513,7 +511,6 @@ my @menu = (
           actionlabel => 'Enter check refund',
           width       => 440,
           acl         => ['Post refund', 'Post check refund'],
-          condition   => sub { $payby{BILL} },
         },
         {
           label       => 'Enter cash refund',
@@ -521,24 +518,23 @@ my @menu = (
           actionlabel => 'Enter cash refund',
           width       => 392,
           acl         => ['Post refund', 'Post cash refund'],
-          condition   => sub { $payby{CASH} },
-        },
-        {
-          label       => 'Record manual (offline/POS) credit card refund',
-          popup       => "edit/cust_refund.cgi?popup=1;payby=MCRD;custnum=$custnum",
-          actionlabel => 'Enter credit card refund',
-          width       => 440,
-          acl         => ['Post refund' ],
-          condition   => sub { $payby{MCRD} },
-        },
-        {
-          label       => 'Record manual (offline/POS) electronic check refund',
-          popup       => "edit/cust_refund.cgi?popup=1;payby=MCHK;custnum=$custnum",
-          actionlabel => 'Enter electronic check refund',
-          width       => 440,
-          acl         => ['Post refund' ],
-          condition   => sub { $payby{MCHK} },
         },
+        #{
+        #  label       => 'Record manual (offline/POS) credit card refund',
+        #  popup       => "edit/cust_refund.cgi?popup=1;payby=MCRD;custnum=$custnum",
+        #  actionlabel => 'Enter credit card refund',
+        #  width       => 440,
+        #  acl         => ['Post refund' ],
+        ##  condition   => sub { $payby{MCRD} },
+        #},
+        #{
+        #  label       => 'Record manual (offline/POS) electronic check refund',
+        #  popup       => "edit/cust_refund.cgi?popup=1;payby=MCHK;custnum=$custnum",
+        #  actionlabel => 'Enter electronic check refund',
+        #  width       => 440,
+        #  acl         => ['Post refund' ],
+        ##  condition   => sub { $payby{MCHK} },
+        #},
 
       ],
 
diff --git a/httemplate/view/cust_main/payment_history.html b/httemplate/view/cust_main/payment_history.html
index d81fe99..f673748 100644
--- a/httemplate/view/cust_main/payment_history.html
+++ b/httemplate/view/cust_main/payment_history.html
@@ -194,12 +194,6 @@ my $custnum = $cust_main->custnum;
 
 my $curuser = $FS::CurrentUser::CurrentUser;
 
-my @payby = grep /\w/, $conf->config('payby');
-#@payby = (qw( CARD DCRD CHEK DCHK LECB BILL CASH WEST COMP ))
- at payby = (qw( CARD DCRD CHEK DCHK LECB BILL CASH COMP ))
-  unless @payby;
-my %payby = map { $_=>1 } @payby;
-
 my %status = (
   'Queued'     => 'O', #Open
   'In-transit' => 'I',

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

Summary of changes:
 FS/FS/Conf.pm                                  |    2 +-
 httemplate/view/cust_bill.cgi                  |   38 +++++-----
 httemplate/view/cust_main/menu.html            |   90 +++++++++++-------------
 httemplate/view/cust_main/payment_history.html |    6 --
 4 files changed, 60 insertions(+), 76 deletions(-)




More information about the freeside-commits mailing list