env_example update
This commit is contained in:
15
env_example
15
env_example
@@ -16,6 +16,7 @@ COMPANY="..." #Организация_Key
|
|||||||
STORE = "..." #Склад_Key
|
STORE = "..." #Склад_Key
|
||||||
|
|
||||||
CONTRAGENT_RWB = "..." #WB
|
CONTRAGENT_RWB = "..." #WB
|
||||||
|
CONTRACT_RWB1="..." #Purchases
|
||||||
CONTRAGENT_OZON = "..." #Озон
|
CONTRAGENT_OZON = "..." #Озон
|
||||||
CONTRAGENT_YANDEX="..." #Яндекс
|
CONTRAGENT_YANDEX="..." #Яндекс
|
||||||
|
|
||||||
@@ -25,14 +26,22 @@ CONTRACT_RWB2 = "..." #основной для озона
|
|||||||
|
|
||||||
MEASURE="..." #"ЕдиницаИзмерения_Key" шт
|
MEASURE="..." #"ЕдиницаИзмерения_Key" шт
|
||||||
|
|
||||||
#Accountant
|
#Accountant sector
|
||||||
|
|
||||||
A60_01="..." # 60.01 СчетУчетаРасчетовЗаПосредническиеУслуги_Key
|
A60_01="..." # 60.01 СчетУчетаРасчетовЗаПосредническиеУслуги_Key
|
||||||
A62_02= "..." # 62.02 СчетУчетаРасчетовПоАвансамПолученным_Key
|
A62_02= "..." # 62.02 СчетУчетаРасчетовПоАвансамПолученным_Key
|
||||||
A60_02= "..." # 60.02 СчетУчетаРасчетовПоАвансамВыданным_Key
|
A60_02= "..." # 60.02 СчетУчетаРасчетовПоАвансамВыданным_Key
|
||||||
A62_01= "..." # 62.01 СчетУчетаРасчетовСКонтрагентом_Key
|
A62_01= "..." # 62.01 СчетУчетаРасчетовСКонтрагентом_Key
|
||||||
A45_02="..." # 45.02 СчетУчета_Key
|
A45_02="..." # 45.02 СчетУчета_Key Счет_передачи_key
|
||||||
|
A43="..." # 43 СчетУчета_Key
|
||||||
A90_01_1="..." # 90.01.1 СчетДоходов_Key
|
A90_01_1="..." # 90.01.1 СчетДоходов_Key
|
||||||
A90_02_1="..." # 90.02.1 СчетРасходов_Key
|
A90_02_1="..." # 90.02.1 СчетРасходов_Key
|
||||||
A90_03="..." # 90.03 СчетУчетаНДСПоРеализации_Key
|
A90_03="..." # 90.03 СчетУчетаНДСПоРеализации_Key
|
||||||
A76_09="..." # 76.09 СчетУчетаРасчетовПоАвансамПолученным_Key and СчетУчетаРасчетовСКонтрагентом_Key
|
A76_09="..." # 76.09 СчетУчетаРасчетовПоАвансамПолученным_Key and СчетУчетаРасчетовСКонтрагентом_Key
|
||||||
|
A44_01="..." # 44.01 СчетУчетаЗатрат_Key
|
||||||
|
A19_04="..." # 19.04 СчетУчетаНДС_Key
|
||||||
|
|
||||||
|
TYPE1="..." #types of documents
|
||||||
|
TYPE2="..."
|
||||||
|
TYPE3="..."
|
||||||
|
TYPE4="..."
|
||||||
@@ -3,7 +3,7 @@ from server.backend.schemas.pydantic import ExcelInfo,settings,Translit
|
|||||||
from server.backend.api.nomenclature import processing
|
from server.backend.api.nomenclature import processing
|
||||||
import re
|
import re
|
||||||
import datetime
|
import datetime
|
||||||
def last_day_of_month(format: str):
|
def first_day_of_prev_month(format: str):
|
||||||
today = datetime.datetime.now()
|
today = datetime.datetime.now()
|
||||||
first_day_current_month = today.replace(day=1)
|
first_day_current_month = today.replace(day=1)
|
||||||
last_day_prev_month = (first_day_current_month - datetime.timedelta(days=1)).replace(day=1)
|
last_day_prev_month = (first_day_current_month - datetime.timedelta(days=1)).replace(day=1)
|
||||||
@@ -12,9 +12,7 @@ def process_sheet(df, real_arti:str, real_quantity:str, real_sum_1:str):
|
|||||||
df= df.iloc[2:].reset_index(drop=True)
|
df= df.iloc[2:].reset_index(drop=True)
|
||||||
#Выборка
|
#Выборка
|
||||||
df = df.iloc[:, [real_arti, real_quantity, real_sum_1]].copy().dropna()
|
df = df.iloc[:, [real_arti, real_quantity, real_sum_1]].copy().dropna()
|
||||||
#df = df[[real_arti, real_quantity, real_sum_1]].copy().dropna() #copy and drop all NA values
|
|
||||||
df = df[(df != 0).all(axis=1)] #drop all 0 values
|
df = df[(df != 0).all(axis=1)] #drop all 0 values
|
||||||
#df = df[[real_arti, real_quantity, real_sum_1]]
|
|
||||||
df.columns = ['arti', 'counts', 'price']
|
df.columns = ['arti', 'counts', 'price']
|
||||||
#Нормализация
|
#Нормализация
|
||||||
df['arti'] = df['arti'].replace(Translit.TRANSLIT, regex=True)
|
df['arti'] = df['arti'].replace(Translit.TRANSLIT, regex=True)
|
||||||
@@ -35,7 +33,6 @@ def process_sheet(df, real_arti:str, real_quantity:str, real_sum_1:str):
|
|||||||
raise Exception(f"There are some errors with validation in Лист_1, check it ", errors)
|
raise Exception(f"There are some errors with validation in Лист_1, check it ", errors)
|
||||||
return validated_rows
|
return validated_rows
|
||||||
def evaluating(dfs):
|
def evaluating(dfs):
|
||||||
#validated_rows_1 = process_sheet(dfs["Лист_1"], real_arti="Артикул",real_quantity=dfs["Лист_1"].columns[4], real_sum_1=dfs["Лист_1"].columns[8]) # номера столбцов
|
|
||||||
validated_rows_1 = process_sheet(dfs["Лист_1"], real_arti=0,real_quantity=4, real_sum_1=8)
|
validated_rows_1 = process_sheet(dfs["Лист_1"], real_arti=0,real_quantity=4, real_sum_1=8)
|
||||||
date = last_day_of_month(settings.TIMEFORMAT)
|
date = first_day_of_prev_month(settings.TIMEFORMAT)
|
||||||
return validated_rows_1, date
|
return validated_rows_1, date
|
||||||
Reference in New Issue
Block a user