refactor/unit-dropping: perbaikan

This commit is contained in:
2025-12-12 09:46:28 +07:00
parent 261f3cdeb3
commit f651a185b3
6 changed files with 20 additions and 16 deletions
@@ -83,15 +83,17 @@ func ReadListData(input e.ReadListDto, event *pl.Event, dbx ...*gorm.DB) ([]e.En
tx = tx.Where("\"Encounter\".\"Status_Code\" = ?", *input.Status_Code)
}
if input.Specialist_Code != nil {
tx = tx.Where("\"Encounter\".\"Specialist_Code\" = ?", *input.Specialist_Code)
}
// if input.Specialist_Code != nil {
// tx = tx.Where("\"Encounter\".\"Specialist_Code\" = ?", *input.Specialist_Code)
// }
if input.PaymentMethod_Code != nil {
tx = tx.Where("\"Encounter\".\"PaymentMethod_Code\" = ?", *input.PaymentMethod_Code)
}
tx = tx.Scopes(gh.Preload(input.Includes)).
tx = tx.Debug().
Scopes(gh.Filter(input.FilterDto)).
Scopes(gh.Preload(input.Includes)).
Count(&count).
Scopes(gh.Paginate(input, &pagination)).
Order("\"CreatedAt\" DESC")