1
This commit is contained in:
@@ -88,10 +88,7 @@ async def create_invoice(
|
|||||||
# 2. 检查订单唯一性
|
# 2. 检查订单唯一性
|
||||||
occupied = await check_orders_available(db, data.order_ids)
|
occupied = await check_orders_available(db, data.order_ids)
|
||||||
if occupied:
|
if occupied:
|
||||||
details = "; ".join(
|
details = f"订单 {order.order_no} 未支付,无法开票",
|
||||||
f"订单 {o['order_no']} 已被发票 {o['invoice_no']} 占用"
|
|
||||||
for o in occupied
|
|
||||||
)
|
|
||||||
raise HTTPException(
|
raise HTTPException(
|
||||||
status_code=status.HTTP_409_CONFLICT,
|
status_code=status.HTTP_409_CONFLICT,
|
||||||
detail=details,
|
detail=details,
|
||||||
|
|||||||
Reference in New Issue
Block a user