Topic: Error in Creating New Customer Account

"The entered information is a duplicate. Please go back and enter different values."
I got this message when I tried to add a new customer. The names are unique. Does anyone know how to fix this?

Re: Error in Creating New Customer Account

Logout, clear your browser cache, login again and then see if you get the same error. You may have used the browser's back button instead of the "back" link on the web page.

It is also possible that your sys_types table may be corrupted or inconsistent. The next_reference field is your target to investigate. This is generally used for transactions and may not apply to new customer creation.

The function add_customer() is defined in sales/includes/db/customers_db.inc - check out the sql in it and manually execute it in some mysql client and see what gives.

Re: Error in Creating New Customer Account

Hi apmuthu, thanks for helping again. I dont think it's because of the browser cache or the sys_types. also, I can create a new supplier without any problem.

When I change the sql I am able to insert a new row. But the original FA file is like mine so this can't be the reason. Can it be because I used mysql workbench from Ubuntu 16 to overwrite my database in mysql 5.5 php 5.5.9 Ubuntu 14 server?

        
"INSERT INTO ".TB_PREF."debtors_master (name, debtor_ref, address, tax_id,
dimension_id, dimension2_id, curr_code, credit_status, payment_terms, discount, 
pymt_discount,credit_limit, sales_type, notes)
        
INSERT INTO 0_debtors_master (debtor_no, name, debtor_ref, address, tax_id, curr_code, sales_type, dimension_id, dimension2_id, credit_status, payment_terms, discount, pymt_discount, credit_limit, notes, inactive)

I added debtor_no, inactive.

Re: Error in Creating New Customer Account

What says the debugger?

Re: Error in Creating New Customer Account

I found a backup last month that is working and compared the sqls. In crm_contacts, the  auto_increment in ID disappeared which is causing the error. Trying to fix it right now.

Re: Error in Creating New Customer Account

Compare the schemas and see if there are any other changes.
Is there any upgrade sql in the "sql" folder that drops the auto_increment attribute?

The only PHP file that refers to the AUTO_INCREMENT attribute is admin/db/maintenance_db.inc in both versions.

Whilst "inactive' is not needed unless it's default / NULL property has changed, the primary key is needed if the AUTO_INCREMENT is absent.