}
 // end of last period date check
 /*
 	Check for any errors
 */
 if (error_check()) {
     $_SESSION["error"]["form"]["service_view"] = "failed";
     header("Location: ../index.php?page=customers/service-edit.php&id_customer=" . $obj_customer->id . "&id_service_customer=" . $obj_customer->id_service_customer);
     exit(0);
 } else {
     if (!$obj_customer->id_service_customer) {
         /*
         	Add new service
         */
         // assign service to customer
         $obj_customer->service_add($data["date_period_first"], $migration_options);
         // update service item option information
         $obj_customer->obj_service->option_type = "customer";
         $obj_customer->obj_service->option_type_id = $obj_customer->id_service_customer;
         $obj_customer->obj_service->data = array();
         $obj_customer->obj_service->load_data_options();
         $obj_customer->obj_service->data["description"] = $data["description"];
         $obj_customer->obj_service->action_update_options();
         /*
         	Do special migration-specific actions
         */
         if ($data["migration_date_period_usage_first"]) {
             /*
             	We need to create a special period for usage records, since
             	we want the telcomode service to charge for usage but not period
             	for the first run.