create api get depresiasi v2

This commit is contained in:
giovanni
2026-06-05 13:51:09 +07:00
parent 6d2b6a0cb8
commit 1ef32407f1
5 changed files with 270 additions and 0 deletions
@@ -152,6 +152,29 @@ func (c *RepportController) GetExpenseDepreciation(ctx *fiber.Ctx) error {
return ctx.Status(fiber.StatusOK).JSON(resp)
}
func (c *RepportController) GetExpenseDepreciationV2(ctx *fiber.Ctx) error {
rows, meta, err := c.RepportService.GetExpenseDepreciationV2(ctx)
if err != nil {
return err
}
resp := struct {
Code int `json:"code"`
Status string `json:"status"`
Message string `json:"message"`
Meta dto.ExpenseDepreciationV2MetaDTO `json:"meta"`
Data []dto.ExpenseDepreciationV2RowDTO `json:"data"`
}{
Code: fiber.StatusOK,
Status: "success",
Message: "Get expense depreciation report v2 successfully",
Meta: *meta,
Data: rows,
}
return ctx.Status(fiber.StatusOK).JSON(resp)
}
func (c *RepportController) GetExpenseDepreciationManualInputs(ctx *fiber.Ctx) error {
rows, meta, err := c.RepportService.GetExpenseDepreciationManualInputs(ctx)
if err != nil {