Openbravo Issue Tracking System - Openbravo Localizations
View Issue Details
0048754Openbravo LocalizationsLocalization Portugalpublic2022-03-09 15:502022-03-10 12:54
ucarrion 
jorge-garcia 
highmajoralways
closedunable to reproduce 
5
 
 
0048754: Copy store process fails if there is a document type with no fiscal prefix defined
While running a Copy Retail Store process for a Portuguese configured store, if there is any involved document type that has no document type prefix defined, the copy store shows an error.

FIND THE ERROR LOG ATTACHED
-Login the backoffice, select an store set as Portuguese Configuration=true
-Open the document type document and filter for the mentioned store
-Take the POS Order and set the document type prefix (portuguese configuration section) and set is as empty.
-Do a copy store process using the mentioned store as template
-You will get an error
Could be some cases where, by any reason, some document types have no document type prefix. I would say, if the document is not SAFT signed, I wouldn't care of it during the copy store.
NOR
related to feature request 0048763 acknowledged Retail Retail Modules To include Tax Id organization info in Copy Retail Store window 
txt 48754log.txt (25,192) 2022-03-09 16:22
https://issues.openbravo.com/file_download.php?file_id=16720&type=bug
Issue History
2022-03-09 15:50ucarrionNew Issue
2022-03-09 15:50ucarrionAssigned To => aferraz
2022-03-09 16:20rafarodaTag Attached: NOR
2022-03-09 16:22ucarrionDescription Updatedbug_revision_view_page.php?rev_id=23769#r23769
2022-03-09 16:22ucarrionFile Added: 48754log.txt
2022-03-09 16:37aferrazAssigned Toaferraz => jorge-garcia
2022-03-10 12:54jorge-garciaNote Added: 0135619
2022-03-10 12:54jorge-garciaStatusnew => closed
2022-03-10 12:54jorge-garciaResolutionopen => unable to reproduce
2022-03-10 15:19jorge-garciaRelationship addedrelated to 0048763

Notes
(0135619)
jorge-garcia   
2022-03-10 12:54   
Once SAFT prefix for a document type is set, there is no way to change it through the ERP, however, it is possible to change it through a database query

The query used to change it was:
update C_DocType set em_saft_doctype_prefix = '' where c_doctype_id = '511A9371A0F74195AA3F6D66C722729D';

The problem with this query is that the em_saft_doctype_prefix is not null (indicating the field has a value) and then the regular expression to verify the prefix contains only uppercase letters fails

Instead, if it is needed to delete a SAFT prefix through database, should be:
update C_DocType set em_saft_doctype_prefix = null where c_doctype_id = '511A9371A0F74195AA3F6D66C722729D';