} } } /* Verify Data */ // check that the specified customer actually exists if (!$obj_customer->verify_id()) { log_write("error", "process", "The customer you have attempted to edit - " . $obj_customer->id . " - does not exist in this system."); } else { if ($obj_customer->id_service_customer) { // are we editing an existing service? make sure it exists and belongs to this customer if (!$obj_customer->verify_id_service_customer()) { log_write("error", "process", "The service you have attempted to edit - " . $obj_customer->id_service_customer . " - does not exist in this system."); } else { $obj_customer->load_data(); $obj_customer->load_data_service(); } } } // verify the service ID is valid if (!$obj_customer->id_service_customer) { $obj_customer->obj_service->id = $data["serviceid"]; if (!$obj_customer->obj_service->verify_id()) { log_write("error", "process", "Unable to find service " . $obj_customer->obj_service->id . ""); } else { $obj_customer->obj_service->load_data(); } } // make sure the last period date is no earlier than the last current service period if (!empty($data["date_period_last"]) && $data["date_period_last"] != "0000-00-00") {