-#billing events
-foreach my $aref (
- #[ 'COMP', 'Comp invoice', '$cust_bill->comp();', 30, 'comp' ],
- [ 'CARD', 'Batch card', '$cust_bill->batch_card();', 40, 'batch-card' ],
- [ 'BILL', 'Send invoice', '$cust_bill->send();', 50, 'send' ],
- [ 'DCRD', 'Send invoice', '$cust_bill->send();', 50, 'send' ],
- [ 'DCHK', 'Send invoice', '$cust_bill->send();', 50, 'send' ],
-) {
-
- my $part_bill_event = new FS::part_bill_event({
- 'payby' => $aref->[0],
- 'event' => $aref->[1],
- 'eventcode' => $aref->[2],
- 'seconds' => 0,
- 'weight' => $aref->[3],
- 'plan' => $aref->[4],
- });
- my($error);
- $error=$part_bill_event->insert;
- die $error if $error;
+warn "Configuration initialized - commiting transaction\n" if $opt_v;
+$dbh->commit or die $dbh->errstr;
+$dbh->disconnect or die $dbh->errstr;
+warn "Configuration committed successfully\n" if $opt_v;