R29929 SalesOrder - Valid Fiscal Sales Number
| Code | R29929 | 
| Entity | Crm.Sales.SalesOrders Entity | 
| Name | ValidFiscalSalesNumber | 
| Attribute | FiscalSalesNumber | 
| Layer | Back-End | 
| Events | Commit | 
| Priority | Late | 
| Modify | NO | 
| Applicable Legislations | BG (EnterpriseCompany.Company) | 
| Action | Validate that: If (FiscalSalesNumber != NULL) , then REGEX(FiscalSalesNumber , ^.{8}-.{4}-[0-9]{7}$) = True | 
| Description | When a POS Sales Order is created into database, according to the Bulgarian legislation the
software must generate a unique sales number with the following format
'XXXXXXXX-ZZZZ-0000001', where:
 
 | 
| Message | Document '{DocumentText}' contains a Fiscal Sales Number '{FiscalSalesNumber}' that does
not meet the format requirements of the Bulgarian legislation. The format of the Fiscal Sales
Number must be 'XXXXXXXX-ZZZZ-0000001', where: * XXXXXXXX - 8-digit Individual Number of the POS Fiscal Printer; * ZZZZ - 4-digit POS Operator code; * 0000001 - 7-digit individual number of the Sales Order, formed by the active POS Fiscal Printer's Sequence. | 
| Introduced In Version | 2019.1 | 
| Revocable | NO | 
* For more information about the Business Rules Documentation Template and a short explanation of each column, see topic System Business Rules.