Hello, I am a newbie adopter of the very excellent FA ERP system, and I'm writing code that will connect our Prestashop carts with FA. I found the above SQL code to be very helpful in figuring out what goes where. The table key link diagram was also very helpful.
But I am confused about 2 fields: "ref" and "name", and I'm hoping to get some clarification.
When I create a new customer through the FA interface, it asks for "Customer Name" and "Customer Short Name". Since customer names are not necessarily unique, I was careful to make up a unique code for the short name by using the first letter of first name + last name + source_ID, for example:
Customer Name: John Doe
Short Name: JDoe2522
When I enter the above in the FA interface, it first inserts a new record in the "fl_crm_persons" table, where it puts the name (John Doe) into the "ref" column, and the short name (JDoe2522) into the "name" column.
ref=John Doe
name=JDoe2522
It then copies various fields (as per SQL above) from this first insert into the "fl_debtors_master", where the "debtor_ref" column receives the "ref" column (which is the full name).
I'm wondering if this might be wrong, because it means the debtor_ref field in the "fl_debtors_master" may not have a unique value. Am I missing something here?
I was also wondering if there is a similar batch of SQL code to show what happens when a new order is entered?
Regards, Adrian