Topic: Saving INVOICE creates duplicate CUSTOMERS

Good day to everyone

I need help with my project.  I'm new using MVD

When I create a new INVOICE it create a duplicate customer record.
How can I fix it?

When I open the project, I go to:

CREATE NEW INVOICE, SELECT CUSTOMER, ADD SERVICES AND SAVE
It creates the record, but when I go see the customers listing I see the same customer repeated

Please help...

Post's attachments

Attachment icon invoice3.zip 362.5 kb, 30 downloads since 2025-01-26 

Re: Saving INVOICE creates duplicate CUSTOMERS

Hi


There are several tables in your database.
Let's describe the name and its purpose as it should be.
"clients" - the client table. The list of UNIQUE clients that are entered into the database under a unique ID.
"bills" - the table of issued invoices. With information about the client ID from the directory, the account number and other useful information
related to the invoice.
The rest does not matter for now.
When forming a new invoice, a record with a new account number, client ID and all other information should appear in the "bills" table.
When viewing all invoices on the corresponding form of the application, you should refer to the "bills" table.
When viewing all clients, you should refer to the "clients" table.
Everything is wrong with your tables.
Derek gave you a good example and pointed out what you should pay attention to. You did not pay attention to this.
Here is a link to a document in which on pages 4-8 the principle of databases and relationships between tables is very briefly described, why this is exactly so.
https://myvisualdatabase.com/forum/view … 991#p15991