36 lines
744 B
Go
36 lines
744 B
Go
package queries
|
|
|
|
import "bssapp-backend/models"
|
|
|
|
func getStatementsForPDF(
|
|
accountCode string,
|
|
startDate string,
|
|
endDate string,
|
|
parislemler []string,
|
|
) ([]models.StatementHeader, error) {
|
|
return GetStatements(models.StatementParams{
|
|
AccountCode: accountCode,
|
|
StartDate: startDate,
|
|
EndDate: endDate,
|
|
LangCode: "TR",
|
|
Parislemler: parislemler,
|
|
})
|
|
}
|
|
|
|
func collectBelgeNos(headers []models.StatementHeader) []string {
|
|
seen := make(map[string]struct{}, len(headers))
|
|
out := make([]string, 0, len(headers))
|
|
for _, h := range headers {
|
|
no := h.BelgeNo
|
|
if no == "" || no == "Baslangic_devir" {
|
|
continue
|
|
}
|
|
if _, ok := seen[no]; ok {
|
|
continue
|
|
}
|
|
seen[no] = struct{}{}
|
|
out = append(out, no)
|
|
}
|
|
return out
|
|
}
|