mirror of
https://gitlab.com/mbugroup/lti-api.git
synced 2026-05-25 07:45:44 +00:00
Feat(BE-334):Fixing dto closing hpp expedisi
This commit is contained in:
@@ -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,
|
||||
})
|
||||
|
||||
|
||||
Reference in New Issue
Block a user