diff options
author | ivan <ivan> | 2007-09-12 05:38:38 +0000 |
---|---|---|
committer | ivan <ivan> | 2007-09-12 05:38:38 +0000 |
commit | 27df14819d223d4f4e357754261b7493656d4b39 (patch) | |
tree | e294003e37d5445ccaa12397b0051b7e03727aaf /bin | |
parent | f9bba7174781a1be9fb275d3ede18d9c65071ef0 (diff) |
freeside-migrate-events now moves event options, whew
Diffstat (limited to 'bin')
-rw-r--r-- | bin/freeside-migrate-events | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/bin/freeside-migrate-events b/bin/freeside-migrate-events index 2ec291893..f33a0ad0e 100644 --- a/bin/freeside-migrate-events +++ b/bin/freeside-migrate-events @@ -40,7 +40,6 @@ my %plan2action = ( 'collect' => 'collect', ); -#XXX may need to fudge some plandata2option names!!! foreach my $part_bill_event ( qsearch({ @@ -62,6 +61,11 @@ foreach my $part_bill_event ( next; } + my %plandata = map { /^(\w+) (.*)$/; ($1, $2); } + split(/\n/, $part_bill_event->plandata); + + #XXX may need to fudge some plandata2option names!!! + my $part_event = new FS::part_event { 'event' => $part_bill_event->event, 'eventtable' => 'cust_bill', @@ -71,7 +75,7 @@ foreach my $part_bill_event ( 'disabled' => $part_bill_event->disabled, }; - my $error = $part_event->insert; + my $error = $part_event->insert(\%plandata); die "error inserting part_event: $error\n" if $error; print ' '. $part_event->eventpart; |