// ensure the DDI range is valid
    if ($obj_ddi->data["ddi_start"] > $obj_ddi->data["ddi_finish"]) {
        log_write("error", "process", "The supplied DDI range is invalid, the finish DDI must be the same or higher than the start DDI");
        error_flag_field("ddi_start");
        error_flag_field("ddi_finish");
    }
    /*
    	Check for any errors
    */
    if (error_check()) {
        $_SESSION["error"]["form"]["service_ddi_edit"] = "failed";
        header("Location: ../index.php?page=customers/service-ddi-edit.php&id_customer=" . $obj_customer->id . "&id_service_customer=" . $obj_customer->id_service_customer . "&id_ddi=" . $obj_ddi->id);
        exit(0);
    } else {
        /*
        	Update/Create DDI entry
        */
        $obj_ddi->action_update();
        /*
        	Complete
        */
        header("Location: ../index.php?page=customers/service-ddi.php&id_customer=" . $obj_customer->id . "&id_service_customer=" . $obj_customer->id_service_customer . "");
        exit(0);
    }
    /////////////////////////
} else {
    // user does not have perms to view this page/isn't logged on
    error_render_noperms();
    header("Location: ../index.php?page=message.php");
    exit(0);
}