feat(입출고): 발주 목록에 입고일 열 추가
입고 예정일과 발주 사이에 입고일을 보여 준다. 여러 날에 나눠 입고하면 칸 안에서 줄바꿈하고, 같은 날 여러 번 입고는 한 번만, 입고 전에는 - 로 표시한다. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -20,6 +20,12 @@ OUT_DIR = os.path.join(ROOT, "tests", "js", ".out")
|
||||
from app.modules.inout.router import _date_holidays # noqa: E402
|
||||
|
||||
|
||||
def _order(no: int, receipt_dates: list[date]) -> dict:
|
||||
return {"id": no, "order_no": f"PO-26102{no}-01", "factory_name": "대성화학", "items_label": "미라클 봉투", "line_count": 1,
|
||||
"order_date": date(2026, 10, 20), "due_date": None, "receipt_dates": receipt_dates, "status": "partial", "status_label": "일부 입고",
|
||||
"summary": {"ordered": 100, "received": 10, "remaining": 90, "over": 0}}
|
||||
|
||||
|
||||
def main() -> None:
|
||||
os.makedirs(OUT_DIR, exist_ok=True)
|
||||
env = jinja2.Environment(
|
||||
@@ -28,7 +34,8 @@ def main() -> None:
|
||||
base = {"date_holidays": _date_holidays(), "today": date(2026, 10, 5), "user": {"name": "테스트", "email": "t@test.local"}, "nav_items": [], "perms": {"can_order": True, "can_receive": True}}
|
||||
pages = {
|
||||
"inout_form.html": ("inout/order_form.html", {"vals": {"order_date": "2026-10-05", "due_date": ""}, "factories": []}),
|
||||
"inout_list.html": ("inout/index.html", {"filters": {"from": "2026-10-01", "to": "", "status": "open", "q": "", "factory": ""}, "factories": [], "orders": [], "status_filters": {}}),
|
||||
"inout_list.html": ("inout/index.html", {"filters": {"from": "2026-10-01", "to": "", "status": "open", "q": "", "factory": ""}, "factories": [], "status_filters": {}, "orders": [
|
||||
_order(1, [date(2026, 10, 21), date(2026, 10, 23)]), _order(2, [date(2026, 10, 22)]), _order(3, [])]}),
|
||||
}
|
||||
for out, (name, ctx) in pages.items():
|
||||
with open(os.path.join(OUT_DIR, out), "w", encoding="utf-8") as f:
|
||||
|
||||
Reference in New Issue
Block a user