mirror of
https://github.com/Nikolay-Shirokov/cc-1c-skills.git
synced 2026-06-11 00:14:56 +03:00
fix(meta-compile): remove invalid properties from ChartOf* types
ChartOfCharacteristicTypes: remove CodeType (not a valid property). ChartOfAccounts: remove Autonumbering, Hierarchical (not valid). ChartOfCalculationTypes: remove CheckUnique, Autonumbering (not valid), fix DependenceOnCalculationTypes default from NotUsed to DontUse. Verified against real ACC 8.3.24 dumps. E2E test passed: cf-init → meta-compile ×18 → LoadConfigFromFiles → UpdateDBCfg. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
This commit is contained in:
@@ -1526,13 +1526,11 @@ function Emit-ChartOfCharacteristicTypesProperties {
|
||||
|
||||
$codeLength = if ($null -ne $def.codeLength) { "$($def.codeLength)" } else { "9" }
|
||||
$descriptionLength = if ($null -ne $def.descriptionLength) { "$($def.descriptionLength)" } else { "25" }
|
||||
$codeType = if ($def.codeType) { "$($def.codeType)" } else { "String" }
|
||||
$codeAllowedLength = if ($def.codeAllowedLength) { "$($def.codeAllowedLength)" } else { "Variable" }
|
||||
$autonumbering = if ($def.autonumbering -eq $false) { "false" } else { "true" }
|
||||
$checkUnique = if ($def.checkUnique -eq $true) { "true" } else { "false" }
|
||||
|
||||
X "$i<CodeLength>$codeLength</CodeLength>"
|
||||
X "$i<CodeType>$codeType</CodeType>"
|
||||
X "$i<CodeAllowedLength>$codeAllowedLength</CodeAllowedLength>"
|
||||
X "$i<DescriptionLength>$descriptionLength</DescriptionLength>"
|
||||
X "$i<CheckUnique>$checkUnique</CheckUnique>"
|
||||
@@ -1702,14 +1700,10 @@ function Emit-ChartOfAccountsProperties {
|
||||
X "$i<DescriptionLength>$descriptionLength</DescriptionLength>"
|
||||
X "$i<CodeSeries>$codeSeries</CodeSeries>"
|
||||
X "$i<CheckUnique>false</CheckUnique>"
|
||||
X "$i<Autonumbering>true</Autonumbering>"
|
||||
X "$i<DefaultPresentation>AsDescription</DefaultPresentation>"
|
||||
X "$i<AutoOrderByCode>$autoOrder</AutoOrderByCode>"
|
||||
X "$i<OrderLength>$orderLength</OrderLength>"
|
||||
|
||||
$hierarchical = if ($def.hierarchical -eq $true) { "true" } else { "false" }
|
||||
X "$i<Hierarchical>$hierarchical</Hierarchical>"
|
||||
|
||||
X "$i<EditType>InDialog</EditType>"
|
||||
|
||||
Emit-StandardAttributes $i "ChartOfAccounts"
|
||||
@@ -1813,18 +1807,14 @@ function Emit-ChartOfCalculationTypesProperties {
|
||||
$descriptionLength = if ($null -ne $def.descriptionLength) { "$($def.descriptionLength)" } else { "25" }
|
||||
$codeType = if ($def.codeType) { "$($def.codeType)" } else { "String" }
|
||||
$codeAllowedLength = if ($def.codeAllowedLength) { "$($def.codeAllowedLength)" } else { "Variable" }
|
||||
$autonumbering = if ($def.autonumbering -eq $false) { "false" } else { "true" }
|
||||
$checkUnique = if ($def.checkUnique -eq $true) { "true" } else { "false" }
|
||||
|
||||
X "$i<CodeLength>$codeLength</CodeLength>"
|
||||
X "$i<CodeType>$codeType</CodeType>"
|
||||
X "$i<CodeAllowedLength>$codeAllowedLength</CodeAllowedLength>"
|
||||
X "$i<DescriptionLength>$descriptionLength</DescriptionLength>"
|
||||
X "$i<DefaultPresentation>AsDescription</DefaultPresentation>"
|
||||
X "$i<CheckUnique>$checkUnique</CheckUnique>"
|
||||
X "$i<Autonumbering>$autonumbering</Autonumbering>"
|
||||
|
||||
$dependence = if ($def.dependenceOnCalculationTypes) { "$($def.dependenceOnCalculationTypes)" } else { "NotUsed" }
|
||||
$dependence = if ($def.dependenceOnCalculationTypes) { "$($def.dependenceOnCalculationTypes)" } else { "DontUse" }
|
||||
X "$i<DependenceOnCalculationTypes>$dependence</DependenceOnCalculationTypes>"
|
||||
|
||||
# BaseCalculationTypes
|
||||
|
||||
@@ -1341,12 +1341,10 @@ def emit_chart_of_characteristic_types_properties(indent):
|
||||
X(f'{i}<UseStandardCommands>true</UseStandardCommands>')
|
||||
code_length = str(defn['codeLength']) if defn.get('codeLength') is not None else '9'
|
||||
description_length = str(defn['descriptionLength']) if defn.get('descriptionLength') is not None else '25'
|
||||
code_type = str(defn['codeType']) if defn.get('codeType') else 'String'
|
||||
code_allowed_length = str(defn['codeAllowedLength']) if defn.get('codeAllowedLength') else 'Variable'
|
||||
autonumbering = 'false' if defn.get('autonumbering') is False else 'true'
|
||||
check_unique = 'true' if defn.get('checkUnique') is True else 'false'
|
||||
X(f'{i}<CodeLength>{code_length}</CodeLength>')
|
||||
X(f'{i}<CodeType>{code_type}</CodeType>')
|
||||
X(f'{i}<CodeAllowedLength>{code_allowed_length}</CodeAllowedLength>')
|
||||
X(f'{i}<DescriptionLength>{description_length}</DescriptionLength>')
|
||||
X(f'{i}<CheckUnique>{check_unique}</CheckUnique>')
|
||||
@@ -1490,12 +1488,9 @@ def emit_chart_of_accounts_properties(indent):
|
||||
X(f'{i}<DescriptionLength>{description_length}</DescriptionLength>')
|
||||
X(f'{i}<CodeSeries>{code_series}</CodeSeries>')
|
||||
X(f'{i}<CheckUnique>false</CheckUnique>')
|
||||
X(f'{i}<Autonumbering>true</Autonumbering>')
|
||||
X(f'{i}<DefaultPresentation>AsDescription</DefaultPresentation>')
|
||||
X(f'{i}<AutoOrderByCode>{auto_order}</AutoOrderByCode>')
|
||||
X(f'{i}<OrderLength>{order_length}</OrderLength>')
|
||||
hierarchical = 'true' if defn.get('hierarchical') is True else 'false'
|
||||
X(f'{i}<Hierarchical>{hierarchical}</Hierarchical>')
|
||||
X(f'{i}<EditType>InDialog</EditType>')
|
||||
emit_standard_attributes(i, 'ChartOfAccounts')
|
||||
X(f'{i}<StandardTabularSections>')
|
||||
@@ -1578,16 +1573,12 @@ def emit_chart_of_calculation_types_properties(indent):
|
||||
description_length = str(defn['descriptionLength']) if defn.get('descriptionLength') is not None else '25'
|
||||
code_type = str(defn['codeType']) if defn.get('codeType') else 'String'
|
||||
code_allowed_length = str(defn['codeAllowedLength']) if defn.get('codeAllowedLength') else 'Variable'
|
||||
autonumbering = 'false' if defn.get('autonumbering') is False else 'true'
|
||||
check_unique = 'true' if defn.get('checkUnique') is True else 'false'
|
||||
X(f'{i}<CodeLength>{code_length}</CodeLength>')
|
||||
X(f'{i}<CodeType>{code_type}</CodeType>')
|
||||
X(f'{i}<CodeAllowedLength>{code_allowed_length}</CodeAllowedLength>')
|
||||
X(f'{i}<DescriptionLength>{description_length}</DescriptionLength>')
|
||||
X(f'{i}<DefaultPresentation>AsDescription</DefaultPresentation>')
|
||||
X(f'{i}<CheckUnique>{check_unique}</CheckUnique>')
|
||||
X(f'{i}<Autonumbering>{autonumbering}</Autonumbering>')
|
||||
dependence = str(defn['dependenceOnCalculationTypes']) if defn.get('dependenceOnCalculationTypes') else 'NotUsed'
|
||||
dependence = str(defn['dependenceOnCalculationTypes']) if defn.get('dependenceOnCalculationTypes') else 'DontUse'
|
||||
X(f'{i}<DependenceOnCalculationTypes>{dependence}</DependenceOnCalculationTypes>')
|
||||
base_types = list(defn.get('baseCalculationTypes', []))
|
||||
if base_types:
|
||||
|
||||
Reference in New Issue
Block a user