digicust_types 1.8.102 → 1.8.104
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -101,7 +101,8 @@ export interface ExecutionStrategy {
|
|
|
101
101
|
addNegativeCodings?: boolean;
|
|
102
102
|
};
|
|
103
103
|
/**
|
|
104
|
-
* Custom formattings for the resulting description of line items.
|
|
104
|
+
* Custom formattings for the resulting description of line items. For more complex conditional formattings, use the JSONAta property instead.
|
|
105
|
+
*
|
|
105
106
|
* Possible variables are:
|
|
106
107
|
* - {line-item-description} - The normalized line-item-description from the document. Should always contain a value.
|
|
107
108
|
* - {line-item-description-short} - The GPT shortened line-item-description. Shortening is only applied if the line-item-description contains more than 4 words, otherwise it will be the original line-item-description
|
|
@@ -121,6 +122,56 @@ export interface ExecutionStrategy {
|
|
|
121
122
|
* {enriched-description-short}
|
|
122
123
|
*/
|
|
123
124
|
descriptionFormatString?: string;
|
|
125
|
+
/**
|
|
126
|
+
* Custom formattings for the resulting description of line items as a JSONAta query. The result must be a string, not an object.
|
|
127
|
+
* The "simpler" descriptionFormatString will be ignored if this is set.
|
|
128
|
+
*
|
|
129
|
+
* The input JSON object looks like this:
|
|
130
|
+
*
|
|
131
|
+
* {
|
|
132
|
+
* "tariffNumberDescription": "Einrichtungen, Maschinen, Apparate und Geräte zur Kälteerzeugung",
|
|
133
|
+
* "lineItemDescription": "Orsiro Mission 2.5/9 PTCA-Stents ",
|
|
134
|
+
* "lineItemDescriptionShort": "Orsiro Mission PTCA-Stents ",
|
|
135
|
+
* "materialDescription": "PCTA-Stents",
|
|
136
|
+
* "enrichedDescription": "PCTA-Stents",
|
|
137
|
+
* "enrichedDescriptionShort": "Stents",
|
|
138
|
+
* "preferMaterialMasterData": false,
|
|
139
|
+
* "materialMatched": true,
|
|
140
|
+
* "useCustomsTariffNumberDescription": true,
|
|
141
|
+
* "useLineItemDescriptionShortening": true,
|
|
142
|
+
* "materialMatchedByTariffNumber": true,
|
|
143
|
+
* "materialMatchedByMaterialNr": false
|
|
144
|
+
* }
|
|
145
|
+
*
|
|
146
|
+
* Examples:
|
|
147
|
+
*
|
|
148
|
+
* - Built-In Standard formatting depending on various state variables:
|
|
149
|
+
* useCustomsTariffNumberDescription and
|
|
150
|
+
* (preferMaterialMasterData = false or materialMatched = false) and
|
|
151
|
+
* $exists(tariffNumberDescription) and
|
|
152
|
+
* $string(tariffNumberDescription) != ""
|
|
153
|
+
* ? tariffNumberDescription & " - " & (
|
|
154
|
+
* useLineItemDescriptionShortening = true and materialMatched = false
|
|
155
|
+
* ? lineItemDescriptionShort
|
|
156
|
+
* : (
|
|
157
|
+
* materialMatched = true
|
|
158
|
+
* ? materialDescription
|
|
159
|
+
* : (
|
|
160
|
+
* useLineItemDescriptionShortening = true
|
|
161
|
+
* ? lineItemDescriptionShort
|
|
162
|
+
* : lineItemDescription)
|
|
163
|
+
* )
|
|
164
|
+
* )
|
|
165
|
+
* : enrichedDescription
|
|
166
|
+
*
|
|
167
|
+
* Example Result with JSON input from above: "Einrichtungen, Maschinen, Apparate und Geräte zur Kälteerzeugung - PCTA-Stents"
|
|
168
|
+
*
|
|
169
|
+
* - Static formatting for customer preferring combined material and line-item descriptions:
|
|
170
|
+
* $exists(materialDescription) and $string(materialDescription) != "" ? materialDescription & ' - ' & lineItemDescription : lineItemDescription
|
|
171
|
+
*
|
|
172
|
+
* Example Result with JSON input from above: "PCTA-Stents - Orsiro Mission 2.5/9 PTCA-Stents"
|
|
173
|
+
*/
|
|
174
|
+
descriptionFormatStringJsonAta?: string;
|
|
124
175
|
lineItemGrossWeightStrategy?: "default" | "forceToFirstLineItem";
|
|
125
176
|
};
|
|
126
177
|
dataValidation?: {
|
|
@@ -22,6 +22,10 @@ export interface CustomsTariffNumberNormalizationSettings {
|
|
|
22
22
|
itemDescriptionSource?: "description" | "altDescription";
|
|
23
23
|
hideOriginalItemDescription?: boolean;
|
|
24
24
|
preferMasterDataDescription?: boolean;
|
|
25
|
+
/**
|
|
26
|
+
* Specifies whether to shorten the line item description if it is longer than 4 words.
|
|
27
|
+
*/
|
|
28
|
+
disableLineItemDescriptionShortening?: boolean;
|
|
25
29
|
/**
|
|
26
30
|
* Specifies the maximum length of the combined item description (prefix + tariff number description + suffix).
|
|
27
31
|
* If not set, defaults to 238 characters.
|