Got error when input "sales by invoice" said "Please enter an unique invoice number"
?
This is caused by a problem with your data or a configuration issue. If you cannot figure it out for yourself and need some free support or sympathy please provide the requested environment information and some details about how you are configured related to invoices
Probably your invoice counter is not setup correctly or you changed it yourself? It tries to complete an invoice with number that is already in the db

this is my config,
I deleted some invoice sales from the "takings", is that the cause ? then how do I fix it ?
Yes, the {CO} token assigns an invoice number representing the current count of records in the ospos_sales table. Since you deleted some records that throws the count off.
If you want a quick fix then change the invoice format to {ISEQ} and set the last used invoice number to the last one that was actually assigned as the invoice.
I believe this is documented in the Wiki.
Most helpful comment
Yes, the {CO} token assigns an invoice number representing the current count of records in the
ospos_salestable. Since you deleted some records that throws the count off.If you want a quick fix then change the invoice format to
{ISEQ}and set the last used invoice number to the last one that was actually assigned as the invoice.I believe this is documented in the Wiki.