feat: end-point for pdf of all deal's barcodes, client and marketplace info in bill of payment

This commit is contained in:
2024-09-28 19:38:06 +04:00
parent d9c43624c0
commit 489f65a087
8 changed files with 169 additions and 57 deletions

View File

@@ -4,7 +4,7 @@ from typing import List
from fastapi import HTTPException
from number_to_string import get_string_by_number
from sqlalchemy import select
from sqlalchemy.orm import selectinload
from sqlalchemy.orm import selectinload, joinedload
from starlette import status
from weasyprint import HTML, CSS
@@ -168,6 +168,8 @@ class BillingService(BaseService):
.options(
selectinload(Deal.products).selectinload(DealProduct.services),
selectinload(Deal.services).selectinload(DealServiceModel.service),
joinedload(Deal.shipping_warehouse),
joinedload(Deal.client),
)
)