X-Git-Url: http://git.freeside.biz/gitweb/?p=freeside.git;a=blobdiff_plain;f=FS%2FFS%2FTemplateItem_Mixin.pm;h=27b8f1bdbd1a2c71cdb55aed09c5a5e17b1c9dd3;hp=6ae3364d193efa1e38aebd9362d49d7ac9e9145c;hb=d46254f9b36873e457424eefdcf3610b71ef889d;hpb=b2d79135127e961869a05b936b9d33b1bef135df diff --git a/FS/FS/TemplateItem_Mixin.pm b/FS/FS/TemplateItem_Mixin.pm index 6ae3364d1..27b8f1bdb 100644 --- a/FS/FS/TemplateItem_Mixin.pm +++ b/FS/FS/TemplateItem_Mixin.pm @@ -367,15 +367,17 @@ sub cust_bill_pkg_detail { } -=item cust_bill_pkg_discount +=item pkg_discount -Returns the list of associated cust_bill_pkg_discount objects. +Returns the list of associated cust_bill_pkg_discount or +quotation_pkg_discount objects. =cut -sub cust_bill_pkg_discount { +sub pkg_discount { my $self = shift; - qsearch( $self->discount_table, { 'billpkgnum' => $self->billpkgnum } ); + my $pkey = $self->primary_key; + qsearch( $self->discount_table, { $pkey => $self->get($pkey) } ); } 1;