[freeside-commits] branch master updated. ad53c8a887998e8054f0b26eea5878e6c9520685

Ivan ivan at 420.am
Thu Jan 8 09:05:58 PST 2015


The branch, master has been updated
       via  ad53c8a887998e8054f0b26eea5878e6c9520685 (commit)
      from  99e332001fc0a3483bc999d51f5e01ed2efec5f6 (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 ad53c8a887998e8054f0b26eea5878e6c9520685
Author: Ivan Kohler <ivan at freeside.biz>
Date:   Thu Jan 8 09:05:55 2015 -0800

    ut_foreign_key still requires a value in v4 though, RT#13971

diff --git a/FS/FS/Record.pm b/FS/FS/Record.pm
index 765880e..781230f 100644
--- a/FS/FS/Record.pm
+++ b/FS/FS/Record.pm
@@ -3093,7 +3093,7 @@ on the column first.
 
 sub ut_foreign_key {
   my( $self, $field, $table, $foreign ) = @_;
-  return '' if $no_check_foreign;
+  return $self->ut_number($field) if $no_check_foreign;
   qsearchs($table, { $foreign => $self->getfield($field) })
     or return "Can't find ". $self->table. ".$field ". $self->getfield($field).
               " in $table.$foreign";
diff --git a/FS/FS/prospect_main.pm b/FS/FS/prospect_main.pm
index 79b3f67..f30508d 100644
--- a/FS/FS/prospect_main.pm
+++ b/FS/FS/prospect_main.pm
@@ -243,8 +243,8 @@ sub check {
 
   my $error = 
     $self->ut_numbern('prospectnum')
-    || $self->ut_foreign_key( 'agentnum', 'agent',         'agentnum' )
-    || $self->ut_foreign_key( 'refnum',   'part_referral', 'refnum' )
+    || $self->ut_foreign_key(  'agentnum', 'agent',         'agentnum' )
+    || $self->ut_foreign_keyn( 'refnum',   'part_referral', 'refnum'   )
     || $self->ut_textn('company')
   ;
   return $error if $error;

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

Summary of changes:
 FS/FS/Record.pm        |    2 +-
 FS/FS/prospect_main.pm |    4 ++--
 2 files changed, 3 insertions(+), 3 deletions(-)




More information about the freeside-commits mailing list