projects
/
freeside.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
package fees and usage-based fees, #27687, #25899
[freeside.git]
/
FS
/
FS
/
quotation_pkg.pm
diff --git
a/FS/FS/quotation_pkg.pm
b/FS/FS/quotation_pkg.pm
index
c9724d1
..
c98e0f9
100644
(file)
--- a/
FS/FS/quotation_pkg.pm
+++ b/
FS/FS/quotation_pkg.pm
@@
-2,6
+2,8
@@
package FS::quotation_pkg;
use base qw( FS::TemplateItem_Mixin FS::Record );
use strict;
use base qw( FS::TemplateItem_Mixin FS::Record );
use strict;
+use FS::Record qw( qsearchs ); #qsearch
+use FS::part_pkg;
use FS::quotation_pkg_discount; #so its loaded when TemplateItem_Mixin needs it
=head1 NAME
use FS::quotation_pkg_discount; #so its loaded when TemplateItem_Mixin needs it
=head1 NAME
@@
-126,6
+128,13
@@
sub check {
$self->SUPER::check;
}
$self->SUPER::check;
}
+#it looks redundant with a v4.x+ auto-generated method, but need to override
+# FS::TemplateItem_Mixin's version
+sub part_pkg {
+ my $self = shift;
+ qsearchs('part_pkg', { 'pkgpart' => $self->pkgpart } );
+}
+
sub desc {
my $self = shift;
$self->part_pkg->pkg;
sub desc {
my $self = shift;
$self->part_pkg->pkg;
@@
-192,6
+201,18
@@
sub cust_bill_pkg_display {
}
}
+=item cust_main
+
+Returns the customer (L<FS::cust_main> object).
+
+=cut
+
+sub cust_main {
+ my $self = shift;
+ my $quotation = FS::quotation->by_key($self->quotationnum) or return '';
+ $quotation->cust_main;
+}
+
=back
=head1 BUGS
=back
=head1 BUGS