This commit is contained in:
2026-01-06 18:55:47 +03:00
parent 58e6ef2d98
commit e22abc8057
7 changed files with 34 additions and 52 deletions

View File

@@ -3,10 +3,10 @@ from server.backend.schemas.pydantic import ExcelInfo, settings,Translit
from server.backend.api.nomenclature import processing
import datetime
def last_day_of_month(format: str):
def last_day_of_month(date_format: str):
next_month = datetime.datetime.now().replace(day=28) + datetime.timedelta(days=4)
last_day = next_month - datetime.timedelta(days=next_month.day)
return last_day.strftime(format)
return last_day.strftime(date_format)
def process_sheet(df, document_type:str):
#Выборка
df = df[['Артикул поставщика', 'Тип документа', 'Кол-во', 'Вайлдберриз реализовал Товар (Пр)']].copy().dropna() #copy and drop all NA values