add export excel and pdf report penjualan

This commit is contained in:
giovanni
2026-04-29 11:52:03 +07:00
parent 196bbf4277
commit 16ac54ff39
5 changed files with 794 additions and 0 deletions
@@ -246,6 +246,16 @@ func (c *RepportController) GetMarketing(ctx *fiber.Ctx) error {
if err != nil {
return err
}
if isMarketingExcelExportRequest(ctx) {
return exportMarketingReportExcel(ctx, result)
}
if isMarketingPdfExportRequest(ctx) {
meta := buildMarketingPdfMeta(query.StartDate, query.EndDate)
return exportMarketingReportPdf(ctx, result, meta)
}
total := dto.ToSummaryFromDTOItems(result)
return ctx.Status(fiber.StatusOK).