summaryrefslogtreecommitdiff
path: root/FS/FS/cust_pkg.pm
diff options
context:
space:
mode:
authorIvan Kohler <ivan@freeside.biz>2014-01-08 17:23:05 -0800
committerIvan Kohler <ivan@freeside.biz>2014-01-08 17:23:05 -0800
commit8861d46820af163c7de7839178b6120c9b32ab2c (patch)
treeebd723b2d1ea70f57bc52f94c80d991b5f50094a /FS/FS/cust_pkg.pm
parent49809d3653e7ac4951d36716dce3cd25ba9c3728 (diff)
time/data/etc. unit pricing add-ons, RT#24392
Diffstat (limited to 'FS/FS/cust_pkg.pm')
-rw-r--r--FS/FS/cust_pkg.pm15
1 files changed, 15 insertions, 0 deletions
diff --git a/FS/FS/cust_pkg.pm b/FS/FS/cust_pkg.pm
index afdd41d..97354d4 100644
--- a/FS/FS/cust_pkg.pm
+++ b/FS/FS/cust_pkg.pm
@@ -267,6 +267,10 @@ orders. (Currently this includes: intro periods when delay_setup is on.)
cust_pkg_option records will be created
+=item cust_pkg_usageprice
+
+Array reference of cust_pkg_usageprice objects, will be inserted
+
=item ticket_subject
a ticket will be added to this customer with this subject
@@ -353,6 +357,17 @@ sub insert {
'params' => $self->refnum,
);
+ if ( $self->hashref->{cust_pkg_usageprice} ) {
+ for my $cust_pkg_usageprice ( @{ $self->hashref->{cust_pkg_usageprice} } ) {
+ $cust_pkg_usageprice->pkgnum( $self->pkgnum );
+ my $error = $cust_pkg_usageprice->insert;
+ if ( $error ) {
+ $dbh->rollback if $oldAutoCommit;
+ return $error;
+ }
+ }
+ }
+
if ( $self->discountnum ) {
my $error = $self->insert_discount();
if ( $error ) {