oneCInteraction 1.2.2__tar.gz → 1.2.3__tar.gz
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.
- {onecinteraction-1.2.2/src/oneCInteraction.egg-info → onecinteraction-1.2.3}/PKG-INFO +22 -2
- {onecinteraction-1.2.2 → onecinteraction-1.2.3}/README.md +21 -1
- {onecinteraction-1.2.2 → onecinteraction-1.2.3}/src/oneCInteraction/discounts.py +1 -0
- {onecinteraction-1.2.2 → onecinteraction-1.2.3/src/oneCInteraction.egg-info}/PKG-INFO +22 -2
- {onecinteraction-1.2.2 → onecinteraction-1.2.3}/src/oneCInteraction.egg-info/scm_version.json +2 -2
- {onecinteraction-1.2.2 → onecinteraction-1.2.3}/.github/workflows/publish.yml +0 -0
- {onecinteraction-1.2.2 → onecinteraction-1.2.3}/.gitignore +0 -0
- {onecinteraction-1.2.2 → onecinteraction-1.2.3}/LICENSE +0 -0
- {onecinteraction-1.2.2 → onecinteraction-1.2.3}/pyproject.toml +0 -0
- {onecinteraction-1.2.2 → onecinteraction-1.2.3}/setup.cfg +0 -0
- {onecinteraction-1.2.2 → onecinteraction-1.2.3}/src/oneCInteraction/__init__.py +0 -0
- {onecinteraction-1.2.2 → onecinteraction-1.2.3}/src/oneCInteraction/categories.py +0 -0
- {onecinteraction-1.2.2 → onecinteraction-1.2.3}/src/oneCInteraction/characteristics.py +0 -0
- {onecinteraction-1.2.2 → onecinteraction-1.2.3}/src/oneCInteraction/connection.py +0 -0
- {onecinteraction-1.2.2 → onecinteraction-1.2.3}/src/oneCInteraction/customers.py +0 -0
- {onecinteraction-1.2.2 → onecinteraction-1.2.3}/src/oneCInteraction/groups.py +0 -0
- {onecinteraction-1.2.2 → onecinteraction-1.2.3}/src/oneCInteraction/log.py +0 -0
- {onecinteraction-1.2.2 → onecinteraction-1.2.3}/src/oneCInteraction/nomenclature.py +0 -0
- {onecinteraction-1.2.2 → onecinteraction-1.2.3}/src/oneCInteraction/orders.py +0 -0
- {onecinteraction-1.2.2 → onecinteraction-1.2.3}/src/oneCInteraction/structures.py +0 -0
- {onecinteraction-1.2.2 → onecinteraction-1.2.3}/src/oneCInteraction.egg-info/SOURCES.txt +0 -0
- {onecinteraction-1.2.2 → onecinteraction-1.2.3}/src/oneCInteraction.egg-info/dependency_links.txt +0 -0
- {onecinteraction-1.2.2 → onecinteraction-1.2.3}/src/oneCInteraction.egg-info/requires.txt +0 -0
- {onecinteraction-1.2.2 → onecinteraction-1.2.3}/src/oneCInteraction.egg-info/scm_file_list.json +0 -0
- {onecinteraction-1.2.2 → onecinteraction-1.2.3}/src/oneCInteraction.egg-info/top_level.txt +0 -0
- {onecinteraction-1.2.2 → onecinteraction-1.2.3}/tests/test_lib.py +0 -0
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: oneCInteraction
|
|
3
|
-
Version: 1.2.
|
|
3
|
+
Version: 1.2.3
|
|
4
4
|
Summary: A Python library for interacting with 1C:Enterprise databases via COM connection.
|
|
5
5
|
Author: agcl
|
|
6
6
|
Classifier: Programming Language :: Python :: 3
|
|
@@ -47,6 +47,7 @@ The library is built on the principle of composition: the main `Connection` clas
|
|
|
47
47
|
- `Connection.characteristics` (`CharacteristicsManager`) — reads properties of product variants.
|
|
48
48
|
- `Connection.orders` (`OrdersManager`) — handles creation and updates of customer orders.
|
|
49
49
|
- `Connection.customers` (`CustomersManager`) — manages customers/counterparties.
|
|
50
|
+
- `Connection.discounts` (`DiscountsManager`) — manages discount groups and active nomenclature discounts.
|
|
50
51
|
|
|
51
52
|
---
|
|
52
53
|
|
|
@@ -155,6 +156,14 @@ A buyer's order.
|
|
|
155
156
|
|
|
156
157
|
Calling `str(order_obj)` returns a nicely formatted HTML string suitable for sending to a Telegram bot.
|
|
157
158
|
|
|
159
|
+
#### `DiscountGroup`
|
|
160
|
+
Represents a group of nomenclature discounts.
|
|
161
|
+
- `s_name` (str): Discount group name or comment.
|
|
162
|
+
- `s_document_number` (str): Number of the document that set the discount in 1C.
|
|
163
|
+
- `s_discount_type_code` (str): Discount type code (e.g. `"B2B"`).
|
|
164
|
+
- `n_discount_percent` (float): Discount percentage.
|
|
165
|
+
- `l_nomenclatures` (list of dict): List of products in the discount group (each product is a dict with keys `"code"`, `"name"`, `"uuid"`, and `"char_name"`).
|
|
166
|
+
|
|
158
167
|
---
|
|
159
168
|
|
|
160
169
|
### 3. Nomenclature Manager `NomenclatureManager` (`Connection.nomenclature`)
|
|
@@ -239,7 +248,18 @@ Defined in [customers.py](file:///c:/Users/agcl/PycharmProjects/oneCInteractionL
|
|
|
239
248
|
|
|
240
249
|
---
|
|
241
250
|
|
|
242
|
-
### 9.
|
|
251
|
+
### 9. Discounts Manager `DiscountsManager` (`Connection.discounts`)
|
|
252
|
+
Defined in [discounts.py](file:///c:/Users/agcl/PycharmProjects/oneCInteractionLib/src/oneCInteraction/discounts.py).
|
|
253
|
+
|
|
254
|
+
- `get_active_groups(s_discount_type_codeIn: str = None) -> list`
|
|
255
|
+
Retrieves active discount groups and returns them as a list of `DiscountGroup` objects.
|
|
256
|
+
- If `s_discount_type_codeIn` is specified, only returns groups matching that discount type code.
|
|
257
|
+
- Queries active discounts from the `СкидкиНаценкиНоменклатуры` information register.
|
|
258
|
+
- Only retrieves discounts where the percentage is greater than zero and the registrar document's end date (`ДатаОкончания`) is either not set or is greater than or equal to the current date.
|
|
259
|
+
|
|
260
|
+
---
|
|
261
|
+
|
|
262
|
+
### 10. Logging (`log.py`)
|
|
243
263
|
Defined in [log.py](file:///c:/Users/agcl/PycharmProjects/oneCInteractionLib/src/oneCInteraction/log.py).
|
|
244
264
|
|
|
245
265
|
All actions are logged automatically. The library resolves the root directory of the project that imported it and stores log files in the relative path `log/system/[calling_module_name].log`.
|
|
@@ -32,6 +32,7 @@ The library is built on the principle of composition: the main `Connection` clas
|
|
|
32
32
|
- `Connection.characteristics` (`CharacteristicsManager`) — reads properties of product variants.
|
|
33
33
|
- `Connection.orders` (`OrdersManager`) — handles creation and updates of customer orders.
|
|
34
34
|
- `Connection.customers` (`CustomersManager`) — manages customers/counterparties.
|
|
35
|
+
- `Connection.discounts` (`DiscountsManager`) — manages discount groups and active nomenclature discounts.
|
|
35
36
|
|
|
36
37
|
---
|
|
37
38
|
|
|
@@ -140,6 +141,14 @@ A buyer's order.
|
|
|
140
141
|
|
|
141
142
|
Calling `str(order_obj)` returns a nicely formatted HTML string suitable for sending to a Telegram bot.
|
|
142
143
|
|
|
144
|
+
#### `DiscountGroup`
|
|
145
|
+
Represents a group of nomenclature discounts.
|
|
146
|
+
- `s_name` (str): Discount group name or comment.
|
|
147
|
+
- `s_document_number` (str): Number of the document that set the discount in 1C.
|
|
148
|
+
- `s_discount_type_code` (str): Discount type code (e.g. `"B2B"`).
|
|
149
|
+
- `n_discount_percent` (float): Discount percentage.
|
|
150
|
+
- `l_nomenclatures` (list of dict): List of products in the discount group (each product is a dict with keys `"code"`, `"name"`, `"uuid"`, and `"char_name"`).
|
|
151
|
+
|
|
143
152
|
---
|
|
144
153
|
|
|
145
154
|
### 3. Nomenclature Manager `NomenclatureManager` (`Connection.nomenclature`)
|
|
@@ -224,7 +233,18 @@ Defined in [customers.py](file:///c:/Users/agcl/PycharmProjects/oneCInteractionL
|
|
|
224
233
|
|
|
225
234
|
---
|
|
226
235
|
|
|
227
|
-
### 9.
|
|
236
|
+
### 9. Discounts Manager `DiscountsManager` (`Connection.discounts`)
|
|
237
|
+
Defined in [discounts.py](file:///c:/Users/agcl/PycharmProjects/oneCInteractionLib/src/oneCInteraction/discounts.py).
|
|
238
|
+
|
|
239
|
+
- `get_active_groups(s_discount_type_codeIn: str = None) -> list`
|
|
240
|
+
Retrieves active discount groups and returns them as a list of `DiscountGroup` objects.
|
|
241
|
+
- If `s_discount_type_codeIn` is specified, only returns groups matching that discount type code.
|
|
242
|
+
- Queries active discounts from the `СкидкиНаценкиНоменклатуры` information register.
|
|
243
|
+
- Only retrieves discounts where the percentage is greater than zero and the registrar document's end date (`ДатаОкончания`) is either not set or is greater than or equal to the current date.
|
|
244
|
+
|
|
245
|
+
---
|
|
246
|
+
|
|
247
|
+
### 10. Logging (`log.py`)
|
|
228
248
|
Defined in [log.py](file:///c:/Users/agcl/PycharmProjects/oneCInteractionLib/src/oneCInteraction/log.py).
|
|
229
249
|
|
|
230
250
|
All actions are logged automatically. The library resolves the root directory of the project that imported it and stores log files in the relative path `log/system/[calling_module_name].log`.
|
|
@@ -40,6 +40,7 @@ class DiscountsManager:
|
|
|
40
40
|
РегистрСведений.СкидкиНаценкиНоменклатуры.СрезПоследних(&CurrentDate, ) КАК Скидки
|
|
41
41
|
WHERE
|
|
42
42
|
Скидки.ПроцентСкидкиНаценки > 0
|
|
43
|
+
AND (Скидки.Регистратор.ДатаОкончания = DATETIME(1, 1, 1) OR Скидки.Регистратор.ДатаОкончания >= &CurrentDate)
|
|
43
44
|
"""
|
|
44
45
|
|
|
45
46
|
if s_discount_type_codeIn is not None:
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
Metadata-Version: 2.4
|
|
2
2
|
Name: oneCInteraction
|
|
3
|
-
Version: 1.2.
|
|
3
|
+
Version: 1.2.3
|
|
4
4
|
Summary: A Python library for interacting with 1C:Enterprise databases via COM connection.
|
|
5
5
|
Author: agcl
|
|
6
6
|
Classifier: Programming Language :: Python :: 3
|
|
@@ -47,6 +47,7 @@ The library is built on the principle of composition: the main `Connection` clas
|
|
|
47
47
|
- `Connection.characteristics` (`CharacteristicsManager`) — reads properties of product variants.
|
|
48
48
|
- `Connection.orders` (`OrdersManager`) — handles creation and updates of customer orders.
|
|
49
49
|
- `Connection.customers` (`CustomersManager`) — manages customers/counterparties.
|
|
50
|
+
- `Connection.discounts` (`DiscountsManager`) — manages discount groups and active nomenclature discounts.
|
|
50
51
|
|
|
51
52
|
---
|
|
52
53
|
|
|
@@ -155,6 +156,14 @@ A buyer's order.
|
|
|
155
156
|
|
|
156
157
|
Calling `str(order_obj)` returns a nicely formatted HTML string suitable for sending to a Telegram bot.
|
|
157
158
|
|
|
159
|
+
#### `DiscountGroup`
|
|
160
|
+
Represents a group of nomenclature discounts.
|
|
161
|
+
- `s_name` (str): Discount group name or comment.
|
|
162
|
+
- `s_document_number` (str): Number of the document that set the discount in 1C.
|
|
163
|
+
- `s_discount_type_code` (str): Discount type code (e.g. `"B2B"`).
|
|
164
|
+
- `n_discount_percent` (float): Discount percentage.
|
|
165
|
+
- `l_nomenclatures` (list of dict): List of products in the discount group (each product is a dict with keys `"code"`, `"name"`, `"uuid"`, and `"char_name"`).
|
|
166
|
+
|
|
158
167
|
---
|
|
159
168
|
|
|
160
169
|
### 3. Nomenclature Manager `NomenclatureManager` (`Connection.nomenclature`)
|
|
@@ -239,7 +248,18 @@ Defined in [customers.py](file:///c:/Users/agcl/PycharmProjects/oneCInteractionL
|
|
|
239
248
|
|
|
240
249
|
---
|
|
241
250
|
|
|
242
|
-
### 9.
|
|
251
|
+
### 9. Discounts Manager `DiscountsManager` (`Connection.discounts`)
|
|
252
|
+
Defined in [discounts.py](file:///c:/Users/agcl/PycharmProjects/oneCInteractionLib/src/oneCInteraction/discounts.py).
|
|
253
|
+
|
|
254
|
+
- `get_active_groups(s_discount_type_codeIn: str = None) -> list`
|
|
255
|
+
Retrieves active discount groups and returns them as a list of `DiscountGroup` objects.
|
|
256
|
+
- If `s_discount_type_codeIn` is specified, only returns groups matching that discount type code.
|
|
257
|
+
- Queries active discounts from the `СкидкиНаценкиНоменклатуры` information register.
|
|
258
|
+
- Only retrieves discounts where the percentage is greater than zero and the registrar document's end date (`ДатаОкончания`) is either not set or is greater than or equal to the current date.
|
|
259
|
+
|
|
260
|
+
---
|
|
261
|
+
|
|
262
|
+
### 10. Logging (`log.py`)
|
|
243
263
|
Defined in [log.py](file:///c:/Users/agcl/PycharmProjects/oneCInteractionLib/src/oneCInteraction/log.py).
|
|
244
264
|
|
|
245
265
|
All actions are logged automatically. The library resolves the root directory of the project that imported it and stores log files in the relative path `log/system/[calling_module_name].log`.
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
|
File without changes
|
{onecinteraction-1.2.2 → onecinteraction-1.2.3}/src/oneCInteraction.egg-info/dependency_links.txt
RENAMED
|
File without changes
|
|
File without changes
|
{onecinteraction-1.2.2 → onecinteraction-1.2.3}/src/oneCInteraction.egg-info/scm_file_list.json
RENAMED
|
File without changes
|
|
File without changes
|
|
File without changes
|