feat(certificate): Add SepaConfig to certificate generation and CombinedGroupName to runners
This commit is contained in:
parent
84155b7404
commit
11e8cc5b1d
@ -58,6 +58,12 @@ func (h *DefaultHandler) GenerateCertificate(c *fiber.Ctx) error {
|
|||||||
Footer: h.Config.CertificateFooter,
|
Footer: h.Config.CertificateFooter,
|
||||||
CurrencySymbol: h.Config.CurrencySymbol,
|
CurrencySymbol: h.Config.CurrencySymbol,
|
||||||
Locale: certificateRequest.Locale,
|
Locale: certificateRequest.Locale,
|
||||||
|
SepaConfig: &models.SepaConfig{
|
||||||
|
BIC: h.Config.SepaBic,
|
||||||
|
HolderName: h.Config.SepaName,
|
||||||
|
IBAN: h.Config.SepaIban,
|
||||||
|
CurrencyIdentifier: h.Config.CurrencyIdentifier,
|
||||||
|
},
|
||||||
}
|
}
|
||||||
|
|
||||||
logger.Info("Generating certificate html")
|
logger.Info("Generating certificate html")
|
||||||
@ -90,6 +96,13 @@ func addUpRunnerDonations(runners []models.RunnerWithDonations) []models.RunnerW
|
|||||||
runners[i].TotalDonations += runners[i].DistanceDonations[j].Amount
|
runners[i].TotalDonations += runners[i].DistanceDonations[j].Amount
|
||||||
runners[i].TotalPerDistance += runners[i].DistanceDonations[j].AmountPerDistance
|
runners[i].TotalPerDistance += runners[i].DistanceDonations[j].AmountPerDistance
|
||||||
}
|
}
|
||||||
|
if runners[i].Group.ParentGroup.Name != "" {
|
||||||
|
runners[i].CombinedGroupName = runners[i].Group.ParentGroup.Name + " - " + runners[i].Group.Name
|
||||||
|
} else {
|
||||||
|
runners[i].CombinedGroupName = runners[i].Group.Name
|
||||||
|
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
return runners
|
return runners
|
||||||
}
|
}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user