fix files names

This commit is contained in:
2026-04-09 10:32:19 +03:00
parent dfaefed4be
commit 8f357f5887
3 changed files with 12 additions and 2 deletions

View File

@@ -11,7 +11,15 @@
"Все_удержания_магазина": 102 "Все_удержания_магазина": 102
}, },
"wb":{ "wb":{
"Артикул": 0,
"Наименование":1,
"Выручка": 8,
"Выкупы": 3,
"Возвраты":5,
"Не_выкупы":11,
"Налог_в_руб":60,
"Прибыль":67,
"Все_удержания_магазина": 54
}, },
"yandex":{ "yandex":{
"Артикул": 0, "Артикул": 0,

View File

@@ -68,4 +68,4 @@ class Handler(BaseHandler):
return "background-color: green; color: white" return "background-color: green; color: white"
return "" return ""
styled = df.style.map(multi_style, subset=["Маржинальность","Прибыль"]) styled = df.style.map(multi_style, subset=["Маржинальность","Прибыль"])
styled.to_excel(f"output/{self.file_name}", engine="openpyxl", index=False) styled.to_excel(f"output/{self.file_name}_Товары_поесяцам", engine="openpyxl", index=False)

View File

@@ -24,6 +24,8 @@ for file in files:
calculate.get_articles_with_sales(jsonread.merchant("yandex"), sheet_name="Отчёт по товарам") calculate.get_articles_with_sales(jsonread.merchant("yandex"), sheet_name="Отчёт по товарам")
case _ if "wb" in file: case _ if "wb" in file:
print("Это WB") print("Это WB")
calculate = Handler(file)
calculate.get_articles_with_sales(jsonread.merchant("wb"), sheet_name="Отчёт товарам")
case _: case _:
print("Не распознано") print("Не распознано")