projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
legacy invoices via self-service, RT#13656
[freeside.git]
/
FS
/
FS
/
reg_code_pkg.pm
diff --git
a/FS/FS/reg_code_pkg.pm
b/FS/FS/reg_code_pkg.pm
index
598497c
..
837b755
100644
(file)
--- a/
FS/FS/reg_code_pkg.pm
+++ b/
FS/FS/reg_code_pkg.pm
@@
-35,6
+35,8
@@
supported:
=over 4
=over 4
+=item codepkgnum - primary key
+
=item codenum - registration code (see L<FS::reg_code>)
=item pkgpart - package definition (see L<FS::part_pkg>)
=item codenum - registration code (see L<FS::reg_code>)
=item pkgpart - package definition (see L<FS::part_pkg>)
@@
-47,7
+49,8
@@
supported:
=item new HASHREF
=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<hash> method.
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<hash> method.
@@
-99,7
+102,8
@@
sub check {
my $self = shift;
my $error =
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;
|| $self->ut_foreign_key('pkgpart', 'part_pkg', 'pkgpart')
;
return $error if $error;