init add function command for create seed depretitaion standard

This commit is contained in:
giovanni
2026-06-01 21:07:30 +07:00
parent 09b1f19d19
commit 44b82a8e38
8 changed files with 747 additions and 9 deletions
@@ -1390,7 +1390,7 @@ func (s *hppV2Service) buildNormalTransferDepreciationPart(
}
houseType := NormalizeDepreciationHouseType(contextRow.HouseType)
multiplicationByHouseType, effectiveDates, err := s.hppRepo.GetMultiplicationPercentages(context.Background(), []string{houseType}, scheduleDay)
multiplicationByHouseType, effectiveDates, err := s.hppRepo.GetMultiplicationPercentages(context.Background(), []string{houseType}, scheduleDay, contextRow.ProjectFlockID)
if err != nil {
return nil, err
}
@@ -1499,7 +1499,7 @@ func (s *hppV2Service) buildManualCutoverDepreciationPart(
}
houseType := NormalizeDepreciationHouseType(contextRow.HouseType)
multiplicationByHouseType, effectiveDates, err := s.hppRepo.GetMultiplicationPercentages(context.Background(), []string{houseType}, reportScheduleDay)
multiplicationByHouseType, effectiveDates, err := s.hppRepo.GetMultiplicationPercentages(context.Background(), []string{houseType}, reportScheduleDay, contextRow.ProjectFlockID)
if err != nil {
return nil, err
}
@@ -103,7 +103,7 @@ func (s *hppV2RepoStub) GetDepreciationPercents(_ context.Context, houseTypes []
// GetMultiplicationPercentages — alias yang sama dengan GetDepreciationPercents untuk match
// interface HppV2CostRepository (interface dipakai method name baru ini).
func (s *hppV2RepoStub) GetMultiplicationPercentages(ctx context.Context, houseTypes []string, maxDay int) (map[string]map[int]float64, map[string]*time.Time, error) {
func (s *hppV2RepoStub) GetMultiplicationPercentages(ctx context.Context, houseTypes []string, maxDay int, _ uint) (map[string]map[int]float64, map[string]*time.Time, error) {
vals, err := s.GetDepreciationPercents(ctx, houseTypes, maxDay)
return vals, make(map[string]*time.Time), err
}