完善出库闭环和前端作业体验
This commit is contained in:
1 parent
3c6dfda5e5
commit
ce0fd7ec52
21 files changed
+1495
-261
No files matched your search
@@ -95,6 +95,21 @@ public class InventoryMovementService : IInventoryMovementService
|
||||
await WriteTransactionAsync(before, inventory, InventoryMovementType.OutboundConfirm, -qty, bizNo, remark);
|
||||
}
|
||||
|
||||
public async Task ReleasePendingOutboundAsync(Inventory inventory, decimal qty, string? bizNo = null, string? remark = null)
|
||||
{
|
||||
EnsurePositive(qty);
|
||||
if (inventory.PendingOutboundQty < qty)
|
||||
{
|
||||
throw new BusinessException("PendingOutboundQty is not enough to release.");
|
||||
}
|
||||
|
||||
var before = Clone(inventory);
|
||||
inventory.PendingOutboundQty -= qty;
|
||||
inventory.InventoryStatus = ResolveStatus(inventory);
|
||||
await _inventoryRepository.UpdateAsync(inventory);
|
||||
await WriteTransactionAsync(before, inventory, InventoryMovementType.PendingOutboundRelease, -qty, bizNo, remark);
|
||||
}
|
||||
|
||||
public async Task FreezeAsync(Inventory inventory, decimal qty, string? bizNo = null, string? remark = null)
|
||||
{
|
||||
EnsurePositive(qty);
|
||||
|
||||
Reference in new issue
Block a user