add migration for seed to standar depresiasi and update data cutover sesuai excel ebitda

This commit is contained in:
giovanni
2026-06-03 22:08:26 +07:00
parent 968305fad0
commit a51e5302c3
22 changed files with 1580 additions and 265 deletions
@@ -487,8 +487,8 @@ func (r *HppV2RepositoryImpl) GetMultiplicationPercentages(
house_type::text AS house_type, day, multiplication_percentage, effective_date
FROM house_depreciation_standards
WHERE house_type::text IN ? AND day <= ?
AND (project_flock_id = ? OR project_flock_id IS NULL)
ORDER BY house_type, day, (project_flock_id IS NOT NULL) DESC, effective_date DESC NULLS LAST
AND (project_flock_ids IS NULL OR ? = ANY(project_flock_ids))
ORDER BY house_type, day, (project_flock_ids IS NOT NULL) DESC, effective_date DESC NULLS LAST
`, houseTypes, maxDay, projectFlockID).Scan(&rows).Error
if err != nil {
return nil, nil, err