feat: end-point for deal document generation

This commit is contained in:
2024-09-20 20:02:17 +04:00
parent 03aba9649a
commit 5316f7f9ce
9 changed files with 482 additions and 5 deletions

View File

@@ -1,5 +1,15 @@
import os
import sys
from datetime import datetime
from pathlib import Path
from jinja2 import FileSystemLoader, Environment
from utils.code128 import encode128
ENV = Environment(loader=FileSystemLoader(Path("templates") / Path("documents")))
ENV.globals['now'] = datetime.now
ENV.globals['encode128'] = encode128
APP_PATH = os.path.dirname(sys.executable) if getattr(sys, 'frozen', False) else os.path.dirname(__file__)
@@ -29,3 +39,13 @@ MONTHS = (
'ноября',
'декабря'
)
DEAL_STATUS_STR = [
'Создан',
'Ожидает принятия',
'Упаковка',
'Ожидание отправки',
'Ожидание оплаты',
'Завершено',
'Отменено',
]