fixing filter product warehouse transfer, cannot take from population

This commit is contained in:
ragilap
2026-03-11 15:10:49 +07:00
parent 333cb9e136
commit 9dcccabc6a
8 changed files with 136 additions and 155 deletions
@@ -2409,15 +2409,10 @@ func (s *recordingService) reflowResetRecordingDepletionsOut(
return errors.New("stock log repository is not available")
}
logState := newRecordingStockLogState()
stockAllocationRepo := commonRepo.NewStockAllocationRepository(tx)
for _, depletion := range depletions {
if depletion.Id == 0 {
continue
}
if err := stockAllocationRepo.ReleaseByUsable(ctx, fifo.UsableKeyRecordingDepletion.String(), depletion.Id, nil, nil); err != nil {
return err
}
s.logDepletionTrace("reflow_reset:start", depletion, "")
sourceWarehouseID := uint(0)