x
This commit is contained in:
@@ -350,16 +350,10 @@ async def update_purchase_order_status(
|
||||
raise HTTPException(status_code=400, detail="已付款的采购订单禁止修改状态")
|
||||
if order.status == "cancelled":
|
||||
raise HTTPException(status_code=400, detail="已作废的采购订单禁止修改状态")
|
||||
|
||||
if order.status == "received" and new_status not in ("paid", "cancelled"):
|
||||
raise HTTPException(status_code=400, detail="已收货的采购订单只能标记为已付款或已作废")
|
||||
|
||||
if order.status == "partial_received" and new_status not in ("received", "paid", "cancelled"):
|
||||
raise HTTPException(status_code=400, detail="部分收货的采购订单只能标记为已收货、已付款或已作废")
|
||||
|
||||
if order.status == "pending" and new_status not in ("received", "cancelled"):
|
||||
raise HTTPException(status_code=400, detail="待收货的采购订单只能标记为已收货或已作废")
|
||||
|
||||
if new_status == "cancelled" and order.status == "paid":
|
||||
raise HTTPException(status_code=400, detail="已付款的订单不能作废")
|
||||
|
||||
|
||||
@@ -534,8 +534,6 @@ async def update_sales_order_status(
|
||||
raise HTTPException(status_code=400, detail="已收款的销售订单禁止修改状态")
|
||||
if order.status == "cancelled":
|
||||
raise HTTPException(status_code=400, detail="已作废的销售订单禁止修改状态")
|
||||
if order.status == "manufacturing" and payload.status == "paid":
|
||||
raise HTTPException(status_code=400, detail="制造中的订单不能直接标记为已收款,请先标记为已交付")
|
||||
if order.status == "delivered" and payload.status not in ("paid", "cancelled"):
|
||||
raise HTTPException(status_code=400, detail="已交付的销售订单只能修改为已收款或已作废")
|
||||
if payload.status == "cancelled" and order.status == "paid":
|
||||
|
||||
Reference in New Issue
Block a user