feat: spacers between barcodes of diff products, avoid product cut in deal document, deal document refactoring
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
from typing import Dict
|
||||
from io import BytesIO
|
||||
from typing import Dict, Tuple
|
||||
|
||||
from sqlalchemy import select, update, insert
|
||||
from sqlalchemy.orm import selectinload, joinedload
|
||||
@@ -76,8 +77,7 @@ class BarcodeService(BaseService):
|
||||
)
|
||||
return GetProductBarcodeResponse(barcode=barcode)
|
||||
|
||||
async def get_barcode_pdf(self, request: GetProductBarcodePdfRequest) -> GetProductBarcodeResponse:
|
||||
# get product by id
|
||||
async def get_barcode_pdf(self, request: GetProductBarcodePdfRequest) -> Tuple[str, BytesIO]:
|
||||
stmt = (
|
||||
select(Product)
|
||||
.options(
|
||||
@@ -102,7 +102,7 @@ class BarcodeService(BaseService):
|
||||
)
|
||||
return filename, pdf_buffer
|
||||
|
||||
async def get_deal_barcodes_pdf(self, request: GetDealProductsBarcodesPdfRequest) -> GetProductBarcodeResponse:
|
||||
async def get_deal_barcodes_pdf(self, request: GetDealProductsBarcodesPdfRequest) -> Tuple[str, BytesIO]:
|
||||
stmt = (
|
||||
select(Deal)
|
||||
.options(
|
||||
|
||||
Reference in New Issue
Block a user