mirror of
https://gitlab.com/mbugroup/lti-api.git
synced 2026-05-24 15:25:43 +00:00
FIX(BE): fix closing marketing 500
This commit is contained in:
@@ -153,7 +153,17 @@ func (s closingService) GetPenjualan(c *fiber.Ctx, projectFlockID uint) ([]entit
|
||||
if len(realisasi) == 0 {
|
||||
return []entity.MarketingDeliveryProduct{}, nil
|
||||
}
|
||||
return realisasi, nil
|
||||
|
||||
filtered := make([]entity.MarketingDeliveryProduct, 0, len(realisasi))
|
||||
for _, item := range realisasi {
|
||||
|
||||
if item.UsageQty != 0 || item.TotalWeight != 0 || item.AvgWeight != 0 ||
|
||||
item.UnitPrice != 0 || item.TotalPrice != 0 {
|
||||
filtered = append(filtered, item)
|
||||
}
|
||||
}
|
||||
|
||||
return filtered, nil
|
||||
}
|
||||
|
||||
func (s closingService) GetClosingSummary(c *fiber.Ctx, projectFlockID uint) (*dto.ClosingSummaryDTO, error) {
|
||||
|
||||
Reference in New Issue
Block a user