I dislike the way IP tells me a Client Exists when trying to add it.
I’m talking about the // Set validation rule based on is_update found at
modules/clients/controllers/Clients.php
$this->session->set_flashdata('alert_error', trans('client_already_exists'));
redirect('clients/form');
Not worth it something like:
- Ajax Search and show result as you fill the fields of the new customer
- Upon matching redirect to the customer profile , something like this:
if (!empty($check)) {
$client = $this->mdl_clients->where('client_name', $this->input->post('client_name'))->get();
$client_id = $client->row()->client_id;
redirect('clients/view/' . $client_id);
//$this->session->set_flashdata('alert_error', trans('client_already_exists'));
//redirect('clients/form');
} else {
$new_client = true;
}
I think is just easier instead of throw that error Clietn Exits! than having to navigate the Client List or make the search.
What do you guys think?