feat(订单列表): 抵扣批次按钮改为立即重跑库存抵扣
- 状态行库存抵扣仍打开批次明细 - 操作列库存抵扣立即重跑并刷新,覆盖我方录单 - 非主系统单只重算本单 cover,不重新分配供应商 - 独立进货单仍禁止抵扣
This commit is contained in:
@@ -847,6 +847,12 @@ router.post('/orders/:orderCode/inventory-offset', authMiddleware, async (req: A
|
||||
branchCode,
|
||||
orderStatus: Number(order.order_status) || 0,
|
||||
});
|
||||
if (outcome.kind === 'independent_inbound') {
|
||||
return res.status(400).json({
|
||||
error: 'independent_inbound_no_offset',
|
||||
error_description: '独立进货单不能用库存抵扣',
|
||||
});
|
||||
}
|
||||
if (outcome.kind === 'not_main_system_order') {
|
||||
return res.status(400).json({
|
||||
error: 'not_main_system_order',
|
||||
|
||||
Reference in New Issue
Block a user