[freeside-commits] branch master updated. 430b2c784d2ee9ea5be00b821d2dbd27279ef132

Ivan ivan at 420.am
Tue Dec 10 21:00:40 PST 2013


The branch, master has been updated
       via  430b2c784d2ee9ea5be00b821d2dbd27279ef132 (commit)
       via  6ced51db0e73603461591e54b7f606467e7c7af0 (commit)
      from  e1157f37c618a7b9cdb2793d61999458076dc51b (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 430b2c784d2ee9ea5be00b821d2dbd27279ef132
Merge: 6ced51d e1157f3
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Tue Dec 10 20:59:42 2013 -0800

    Merge branch 'master' of git.freeside.biz:/home/git/freeside
    
    Conflicts:
    	FS/FS/Mason.pm
    	FS/MANIFEST

diff --cc FS/FS/ClientAPI/MyAccount.pm
index a580991,a580991..aa21ac0
--- a/FS/FS/ClientAPI/MyAccount.pm
+++ b/FS/FS/ClientAPI/MyAccount.pm
@@@ -7,6 -7,6 +7,7 @@@ use subs qw( _cache _provision )
  use IO::Scalar;
  use Data::Dumper;
  use Digest::MD5 qw(md5_hex);
++use Digest::SHA qw(sha512_hex);
  use Date::Format;
  use Time::Duration;
  use Time::Local qw(timelocal_nocheck);
@@@ -278,7 -278,7 +279,7 @@@ sub login 
  
    my $session_id;
    do {
--    $session_id = md5_hex(md5_hex(time(). {}. rand(). $$))
++    $session_id = sha512_hex(time(). {}. rand(). $$)
    } until ( ! defined _cache->get($session_id) ); #just in case
  
    my $timeout = $conf->config('selfservice-session_timeout') || '1 hour';
@@@ -2896,7 -2896,7 +2897,7 @@@ sub reset_passwd 
  
    my $reset_session_id;
    do {
--    $reset_session_id = md5_hex(md5_hex(time(). {}. rand(). $$))
++    $reset_session_id = sha512_hex(time(). {}. rand(). $$)
    } until ( ! defined _cache->get("reset_passwd_$reset_session_id") ); #just in case
  
    _cache->set( "reset_passwd_$reset_session_id", $reset_session, $timeout );
diff --cc FS/FS/Conf.pm
index 0eed8ee,0eed8ee..301d972
--- a/FS/FS/Conf.pm
+++ b/FS/FS/Conf.pm
@@@ -2150,7 -2150,7 +2150,7 @@@ and customer address. Include units.'
      'section'     => 'self-service',
      'description' => 'Acceptable payment types for the signup server',
      'type'        => 'selectmultiple',
--    'select_enum' => [ qw(CARD DCRD CHEK DCHK LECB PREPAY PPAL BILL COMP) ],
++    'select_enum' => [ qw(CARD DCRD CHEK DCHK PREPAY PPAL BILL COMP) ],
    },
  
    {
@@@ -2538,7 -2538,7 +2538,7 @@@
      'section'     => 'billing',
      'description' => 'Available payment types.',
      'type'        => 'selectmultiple',
--    'select_enum' => [ qw(CARD DCRD CHEK DCHK LECB BILL CASH WEST MCRD PPAL COMP) ],
++    'select_enum' => [ qw(CARD DCRD CHEK DCHK BILL CASH WEST MCRD PPAL COMP) ],
    },
  
    {
@@@ -2546,7 -2546,7 +2546,7 @@@
      'section'     => 'UI',
      'description' => 'Default payment type.  HIDE disables display of billing information and sets customers to BILL.',
      'type'        => 'select',
--    'select_enum' => [ '', qw(CARD DCRD CHEK DCHK LECB BILL CASH WEST MCRD PPAL COMP HIDE) ],
++    'select_enum' => [ '', qw(CARD DCRD CHEK DCHK BILL CASH WEST MCRD PPAL COMP HIDE) ],
    },
  
    {
diff --cc FS/FS/Mason.pm
index d228bb1,fefa1bc..4e9c4f1
--- a/FS/FS/Mason.pm
+++ b/FS/FS/Mason.pm
@@@ -358,9 -358,7 +358,10 @@@ if ( -e $addl_handler_use_file ) 
    use FS::cable_provider;
    use FS::cust_credit_void;
    use FS::discount_class;
 +  use FS::alarm_system;
 +  use FS::alarm_type;
 +  use FS::alarm_station;
+   use FS::addr_range;
    # Sammath Naur
  
    if ( $FS::Mason::addl_handler_use ) {
diff --cc FS/FS/part_export/bulkvs_e911.pm
index c66305b,c66305b..a8af3a0
--- a/FS/FS/part_export/bulkvs_e911.pm
+++ b/FS/FS/part_export/bulkvs_e911.pm
@@@ -57,7 -57,7 +57,7 @@@ sub _export_insert 
    my ($self, $svc_phone) = @_;
    my @login = $self->login;
  
--  my $location = $svc_phone->cust_location
++  my $location = $svc_phone->cust_location_or_main
      or return 'no e911 location defined for this phone service';
  
    warn "$me validating address for svcnum ".$svc_phone->svcnum."\n"
diff --cc FS/MANIFEST
index ba93399,0b36e24..1f2dfcc
--- a/FS/MANIFEST
+++ b/FS/MANIFEST
@@@ -729,9 -729,5 +729,11 @@@ FS/cust_credit_void.p
  t/cust_credit_void.t
  FS/discount_class.pm
  t/discount_class.t
 +FS/alarm_system.pm
 +t/alarm_system.t
 +FS/alarm_type.pm
 +t/alarm_type.t
 +FS/alarm_station.pm
 +t/alarm_station.t
+ FS/addr_range.pm
+ t/addr_range.t
diff --cc FS/bin/freeside-setup
index 07da88d,07da88d..a6908e1
--- a/FS/bin/freeside-setup
+++ b/FS/bin/freeside-setup
@@@ -37,51 -37,51 +37,8 @@@ getsecrets()
  #needs to match FS::Record
  my($dbdef_file) = "%%%FREESIDE_CONF%%%/dbdef.". datasrc;
  
--###
--
  my $username_len = 32;
  
--#print "\n\n", <<END, ":";
--#Freeside tracks the RADIUS User-Name, check attribute Password and
--#reply attribute Framed-IP-Address for each user.  You can specify additional
--#check and reply attributes (or you can add them later with the
--#fs-radius-add-check and fs-radius-add-reply programs).
--#
--#First enter any additional RADIUS check attributes you need to track for each 
--#user, separated by whitespace.
--#END
--#my @check_attributes = map { $attrib2db{lc($_)} or die "unknown attribute $_"; }
--#                         split(" ",&getvalue);
--#
--#print "\n\n", <<END, ":";
--#Now enter any additional reply attributes you need to track for each user,
--#separated by whitespace.
--#END
--#my @attributes = map { $attrib2db{lc($_)} or die "unknown attribute $_"; }
--#                   split(" ",&getvalue);
--#
--#print "\n\n", <<END, ":";
--#Do you wish to enable the tracking of a second, separate shipping/service
--#address?
--#END
--#my $ship = &_yesno;
--#
--#sub getvalue {
--#  my($x)=scalar(<STDIN>);
--#  chop $x;
--#  $x;
--#}
--#
--#sub _yesno {
--#  print " [y/N]:";
--#  my $x = scalar(<STDIN>);
--#  $x =~ /^y/i;
--#}
--
--#my @check_attributes = (); #add later
--#my @attributes = (); #add later
--#my $ship = $opt_s;
--
  ###
  # create a dbdef object from the old data structure
  ###
diff --cc bin/cust_pkg-restore_setup
index 5467ead,5467ead..a3761d1
--- a/bin/cust_pkg-restore_setup
+++ b/bin/cust_pkg-restore_setup
@@@ -23,7 -23,7 +23,7 @@@ my $oldAutoCommit = $FS::UID::AutoCommi
  local $FS::UID::AutoCommit = 0;
  my $dbh = dbh;
  
--my $fuzz = 2;
++#my $fuzz = 2;
  
  my $changed = 0;
  
@@@ -35,14 -35,14 +35,10 @@@ foreach my $cust_pkg 
           })
  ) {
  
--  #XXX only canceled packages?
--  #XXX only suspended packages?
--
    my $h_cust_pkg =
      qsearchs({ table       => 'h_cust_pkg',
                 hashref     => { 
                                  pkgnum         => $cust_pkg->pkgnum,
--                                history_action => 'replace_old',
                                  setup          => { op=>'!=', value=>'' },
                                  ($opt_u ? ('susp' => { op=>'!=', value=>'' })
                                          : ()
@@@ -51,7 -51,7 +47,8 @@@
                                          : ()
                                  ),
                                },
--               extra_sql   => ' AND history_date >= ? AND history_date <= ? ',
++               extra_sql   => " AND history_action IN ('insert','replace_old')".
++                              ' AND history_date >= ? AND history_date <= ? ',
                 extra_param => [ [$sdate,'int'], [$edate,'int'] ],
                 order_by    => 'ORDER BY history_date DESC LIMIT 1',
              })
@@@ -60,14 -60,14 +57,20 @@@
    $changed++;
  
    #if ( $opt_r ) {
--    print "restoring setup for pkgnum ". $cust_pkg->pkgnum.
--          " (custnum ". $cust_pkg->custnum.
--          ") to ". time2str('%D', $h_cust_pkg->setup). "\n";
++    #print "restoring setup for pkgnum ". $cust_pkg->pkgnum.
++    #      " (custnum ". $cust_pkg->custnum.
++    #      ") to ". time2str('%D', $h_cust_pkg->setup). "\n";
++    print $cust_pkg->pkgnum. ','.
++          time2str('%D', $h_cust_pkg->setup). ','.
++          $cust_pkg->custnum. ','.
++          '"'. $cust_pkg->cust_main->name. '"'. "\n";
    #}
  
--  $cust_pkg->set('setup', $h_cust_pkg->setup);
--  my $error = $cust_pkg->replace;
--  die $error if $error;
++  #don't actually do it yet ...
++  #$cust_pkg->set('setup', $h_cust_pkg->setup);
++  #my $error = $cust_pkg->replace;
++  ##die $error if $error;
++  #warn "error changing pkgnum ". $cust_pkg->pkgnum.': '. $error."\n";
  
  }
  
diff --cc fs_selfservice/php/freeside_signup_example.php
index 8b1dc19,8b1dc19..4805877
--- a/fs_selfservice/php/freeside_signup_example.php
+++ b/fs_selfservice/php/freeside_signup_example.php
@@@ -34,7 -34,7 +34,7 @@@ if ( ! $error ) 
  
      $custnum = $response['custnum'];
  
--    error_log("[new_customer] signup up with custnum $custnum");
++    error_log("[new_customer] new signup with custnum $custnum");
  
  } else {
  
diff --cc httemplate/edit/cust_main/billing.html
index da5f0f2,da5f0f2..1088cf5
--- a/httemplate/edit/cust_main/billing.html
+++ b/httemplate/edit/cust_main/billing.html
@@@ -679,8 -679,8 +679,8 @@@ my $conf = new FS::Conf
  my $payby_default = $conf->config('payby-default');
  
  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 ))
++#@payby = (qw( CARD DCRD CHEK DCHK BILL CASH WEST COMP ))
++ at payby = (qw( CARD DCRD CHEK DCHK BILL CASH COMP ))
    unless @payby;
  
  my $show_term = '';

commit 6ced51db0e73603461591e54b7f606467e7c7af0
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Tue Dec 10 20:58:22 2013 -0800

    on-the-fly alarm vendor / type / CS adding, RT#23694

diff --git a/FS/FS/Mason.pm b/FS/FS/Mason.pm
index fc25a86..d228bb1 100644
--- a/FS/FS/Mason.pm
+++ b/FS/FS/Mason.pm
@@ -358,6 +358,9 @@ if ( -e $addl_handler_use_file ) {
   use FS::cable_provider;
   use FS::cust_credit_void;
   use FS::discount_class;
+  use FS::alarm_system;
+  use FS::alarm_type;
+  use FS::alarm_station;
   # Sammath Naur
 
   if ( $FS::Mason::addl_handler_use ) {
diff --git a/FS/MANIFEST b/FS/MANIFEST
index e635831..ba93399 100644
--- a/FS/MANIFEST
+++ b/FS/MANIFEST
@@ -729,3 +729,9 @@ FS/cust_credit_void.pm
 t/cust_credit_void.t
 FS/discount_class.pm
 t/discount_class.t
+FS/alarm_system.pm
+t/alarm_system.t
+FS/alarm_type.pm
+t/alarm_type.t
+FS/alarm_station.pm
+t/alarm_station.t

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

Summary of changes:
 FS/FS/ClientAPI/MyAccount.pm                   |    5 ++-
 FS/FS/Conf.pm                                  |    6 ++--
 FS/FS/Mason.pm                                 |    3 ++
 FS/FS/part_export/bulkvs_e911.pm               |    2 +-
 FS/MANIFEST                                    |    6 +++
 FS/bin/freeside-setup                          |   43 ------------------------
 bin/cust_pkg-restore_setup                     |   27 ++++++++-------
 fs_selfservice/php/freeside_signup_example.php |    2 +-
 httemplate/edit/cust_main/billing.html         |    4 +-
 9 files changed, 34 insertions(+), 64 deletions(-)




More information about the freeside-commits mailing list