X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=FS%2FFS%2Freg_code_pkg.pm;h=837b755e636c07b2fbe18a56062207cb1c8dad37;hp=598497c466e6da04ddebfb0ea045531c614de24f;hb=20f38e4c256094bd938b732950e8f93319f851a5;hpb=55a68e4aabe10db4d9c3ab1bb8befd2f9f4b9008 diff --git a/FS/FS/reg_code_pkg.pm b/FS/FS/reg_code_pkg.pm index 598497c46..837b755e6 100644 --- a/FS/FS/reg_code_pkg.pm +++ b/FS/FS/reg_code_pkg.pm @@ -35,6 +35,8 @@ supported: =over 4 +=item codepkgnum - primary key + =item codenum - registration code (see L) =item pkgpart - package definition (see L) @@ -47,7 +49,8 @@ supported: =item new HASHREF -Creates a new example. To add the example to the database, see L<"insert">. +Creates a new registration code. To add the registration code to the database, +see L<"insert">. Note that this stores the hash reference, not a distinct copy of the hash it points to. You can ask the object for a copy with the I method. @@ -99,7 +102,8 @@ sub check { my $self = shift; my $error = - $self->ut_foreign_key('codenum', 'reg_code', 'codenum') + $self->ut_numbern('codepkgnum') + || $self->ut_foreign_key('codenum', 'reg_code', 'codenum') || $self->ut_foreign_key('pkgpart', 'part_pkg', 'pkgpart') ; return $error if $error;