[SICSR-14363] Domain restriction does not work correctly.  
Product Line: P&C
Component/s: Security
Affects Version/s: SICS 4.8.5
Fix Version/s: SICS 4.9.3
Customer: SOMPO JAPAN INSURANCE INC.
External Issue ID: Dezie3642

Problem:
Executing the Installment premium order creates an Open TW, although the user role is restricted from creating Open worksheets

Solution:
When the user press Run Now on Instalment orders/Adjustment orders and the user is assigned to a User Role with the Domain Restriction "Accounting Section on Worksheet Detail", and when the worksheet contains bookings that is restricted by this DR, e.g. because the Account Group on the balance (ac_ledger_balance.frk_account_group) match the Account Group that is restricted for this user, then we must make sure the system do not create this worksheet if status Open is part of the restricted statuses in the DR.

Workaround:

Root Cause:

Extent of Impact:

Impact on Existing Data

Recovery Method for Existing Data Affected