when users creates sales invoices we suppose to change indexes to ensure never 2 invoices would be created with same documentno across tenant o issotrx=Y.
index we suggest CREATE UNIQUE INDEX c_invoice_documentno_sales ON adempiere.c_invoice USING btree (documentno, issotrx, ad_client_id, ad_org_id) WHERE issotrx='Y';
remark: in practice users was able to change manually document number and creates 2 or more invoices with same number. this fall on audit by auditor company.
Environment
None
Activity
Carlos Ruiz September 8, 2018 at 2:43 PM
I was not able to reproduce the issue.
If a user tries to create an invoice with same documentNo as another previous it fails with error Could not save record - Require unique data: - Please change information.:
It points to index «c_invoice_documentno_target» with columns (c_bpartner_id, documentno, c_doctypetarget_id)
when users creates sales invoices we suppose to change indexes to ensure never 2 invoices would be created with same documentno across tenant o issotrx=Y.
index we suggest
CREATE UNIQUE INDEX c_invoice_documentno_sales ON adempiere.c_invoice
USING btree (documentno, issotrx, ad_client_id, ad_org_id)
WHERE issotrx='Y';
remark: in practice users was able to change manually document number and creates 2 or more invoices with same number. this fall on audit by auditor company.