mirror of
https://gitlab.com/mbugroup/lti-api.git
synced 2026-05-20 13:31:56 +00:00
Merge branch 'feat/BE/Sprint-8' into dev/gio
This commit is contained in:
@@ -61,7 +61,7 @@ func ToRepportMarketingItemDTO(mdp entity.MarketingDeliveryProduct, hppPricePerK
|
||||
|
||||
doNumber := marketingDTO.GenerateDeliveryOrderNumber(mdp.MarketingProduct.Marketing.SoNumber, mdp.DeliveryDate, mdp.MarketingProduct.ProductWarehouse.WarehouseId)
|
||||
|
||||
totalWeightKg := mdp.Qty * mdp.AvgWeight
|
||||
totalWeightKg := mdp.UsageQty * mdp.AvgWeight
|
||||
salesAmount := totalWeightKg * mdp.UnitPrice
|
||||
|
||||
var hpp float64
|
||||
@@ -78,7 +78,7 @@ func ToRepportMarketingItemDTO(mdp entity.MarketingDeliveryProduct, hppPricePerK
|
||||
AgingDays: agingDays,
|
||||
DoNumber: doNumber,
|
||||
MarketingType: getMarketingType(mdp),
|
||||
Qty: mdp.Qty,
|
||||
Qty: mdp.UsageQty,
|
||||
AverageWeightKg: mdp.AvgWeight,
|
||||
TotalWeightKg: totalWeightKg,
|
||||
SalesPricePerKg: mdp.UnitPrice,
|
||||
@@ -194,8 +194,8 @@ func ToSummary(mdps []entity.MarketingDeliveryProduct, hppPricePerKg float64, ca
|
||||
totalHppAmount := int64(0)
|
||||
|
||||
for _, mdp := range mdps {
|
||||
calculatedTotalWeight := mdp.Qty * mdp.AvgWeight
|
||||
totalQty += int(mdp.Qty)
|
||||
calculatedTotalWeight := mdp.UsageQty * mdp.AvgWeight
|
||||
totalQty += int(mdp.UsageQty)
|
||||
totalWeightKg += calculatedTotalWeight
|
||||
totalSalesAmount += int64(calculatedTotalWeight * mdp.UnitPrice)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user