Feat(BE-334):Fixing dto closing hpp expedisi

This commit is contained in:
ragilap
2025-12-18 16:02:57 +07:00
parent 3bfc401206
commit 14a4d9e944
4 changed files with 1 additions and 16 deletions
@@ -398,17 +398,9 @@ func (s closingService) GetExpeditionHPP(c *fiber.Ctx, projectFlockID uint, proj
var totalHPP float64
for idx, row := range rows {
unitPrice := 0.0
if row.Qty > 0 {
unitPrice = row.TotalAmount / row.Qty
}
expeditionCosts = append(expeditionCosts, dto.ExpeditionCostItemDTO{
Id: uint64(idx + 1),
ExpeditionVendorID: row.SupplierID,
ExpeditionVendorName: row.SupplierName,
Qty: row.Qty,
UnitPrice: unitPrice,
HPPAmount: row.TotalAmount,
})