X-Git-Url: http://git.freeside.biz/gitweb/?a=blobdiff_plain;f=FS%2FFS%2Fcust_bill_pkg.pm;h=4448da62e35d13139f31ed6c173865e956da4790;hb=f7fa8fab5916969bac62635facfc1c2d30258b44;hp=0e333ae5deef6326fa2a756a6df671d12814f894;hpb=ac659c649a8a59398e4dc76c0e25a71a055dc29c;p=freeside.git diff --git a/FS/FS/cust_bill_pkg.pm b/FS/FS/cust_bill_pkg.pm index 0e333ae5d..4448da62e 100644 --- a/FS/FS/cust_bill_pkg.pm +++ b/FS/FS/cust_bill_pkg.pm @@ -300,13 +300,12 @@ sub insert { } # foreach my $link } - my $cust_event_fee = $self->get('cust_event_fee'); - if ( $cust_event_fee ) { - $cust_event_fee->set('billpkgnum' => $self->billpkgnum); - $error = $cust_event_fee->replace; + if ( my $fee_origin = $self->get('fee_origin') ) { + $fee_origin->set('billpkgnum' => $self->billpkgnum); + $error = $fee_origin->replace; if ( $error ) { $dbh->rollback if $oldAutoCommit; - return "error updating cust_event_fee: $error"; + return "error updating fee origin record: $error"; } } @@ -838,6 +837,8 @@ sub _item_discount { description => $self->mt('Discount'), amount => 0, ext_description => \@ext, + pkgpart => $self->pkgpart, + feepart => $self->feepart, # maybe should show quantity/unit discount? }; foreach my $pkg_discount (@pkg_discounts) {