Fix HPP
This commit is contained in:
@@ -155,16 +155,22 @@ func ProductAnalyticsModelToContract(resp *models.ProductAnalyticsResponse) *con
|
||||
var data []contract.ProductAnalyticsData
|
||||
for _, item := range resp.Data {
|
||||
data = append(data, contract.ProductAnalyticsData{
|
||||
ProductID: item.ProductID,
|
||||
ProductName: item.ProductName,
|
||||
ProductSku: item.ProductSku,
|
||||
CategoryID: item.CategoryID,
|
||||
CategoryName: item.CategoryName,
|
||||
CategoryOrder: item.CategoryOrder,
|
||||
QuantitySold: item.QuantitySold,
|
||||
Revenue: item.Revenue,
|
||||
AveragePrice: item.AveragePrice,
|
||||
OrderCount: item.OrderCount,
|
||||
ProductID: item.ProductID,
|
||||
ProductName: item.ProductName,
|
||||
ProductSku: item.ProductSku,
|
||||
CategoryID: item.CategoryID,
|
||||
CategoryName: item.CategoryName,
|
||||
CategoryOrder: item.CategoryOrder,
|
||||
QuantitySold: item.QuantitySold,
|
||||
Revenue: item.Revenue,
|
||||
AveragePrice: item.AveragePrice,
|
||||
OrderCount: item.OrderCount,
|
||||
StandardHppPerUnit: item.StandardHppPerUnit,
|
||||
StandardHppTotal: item.StandardHppTotal,
|
||||
FifoHppPerUnit: item.FifoHppPerUnit,
|
||||
FifoHppTotal: item.FifoHppTotal,
|
||||
MovingAverageHppPerUnit: item.MovingAverageHppPerUnit,
|
||||
MovingAverageHppTotal: item.MovingAverageHppTotal,
|
||||
})
|
||||
}
|
||||
|
||||
@@ -208,12 +214,15 @@ func ProductAnalyticsPerCategoryModelToContract(resp *models.ProductAnalyticsPer
|
||||
var data []contract.ProductAnalyticsPerCategoryData
|
||||
for _, item := range resp.Data {
|
||||
data = append(data, contract.ProductAnalyticsPerCategoryData{
|
||||
CategoryID: item.CategoryID,
|
||||
CategoryName: item.CategoryName,
|
||||
TotalRevenue: item.TotalRevenue,
|
||||
TotalQuantity: item.TotalQuantity,
|
||||
ProductCount: item.ProductCount,
|
||||
OrderCount: item.OrderCount,
|
||||
CategoryID: item.CategoryID,
|
||||
CategoryName: item.CategoryName,
|
||||
TotalRevenue: item.TotalRevenue,
|
||||
TotalQuantity: item.TotalQuantity,
|
||||
ProductCount: item.ProductCount,
|
||||
OrderCount: item.OrderCount,
|
||||
TotalStandardHpp: item.TotalStandardHpp,
|
||||
TotalFifoHpp: item.TotalFifoHpp,
|
||||
TotalMovingAverageHpp: item.TotalMovingAverageHpp,
|
||||
})
|
||||
}
|
||||
|
||||
@@ -257,14 +266,20 @@ func DashboardAnalyticsModelToContract(resp *models.DashboardAnalyticsResponse)
|
||||
var topProducts []contract.ProductAnalyticsData
|
||||
for _, item := range resp.TopProducts {
|
||||
topProducts = append(topProducts, contract.ProductAnalyticsData{
|
||||
ProductID: item.ProductID,
|
||||
ProductName: item.ProductName,
|
||||
CategoryID: item.CategoryID,
|
||||
CategoryName: item.CategoryName,
|
||||
QuantitySold: item.QuantitySold,
|
||||
Revenue: item.Revenue,
|
||||
AveragePrice: item.AveragePrice,
|
||||
OrderCount: item.OrderCount,
|
||||
ProductID: item.ProductID,
|
||||
ProductName: item.ProductName,
|
||||
CategoryID: item.CategoryID,
|
||||
CategoryName: item.CategoryName,
|
||||
QuantitySold: item.QuantitySold,
|
||||
Revenue: item.Revenue,
|
||||
AveragePrice: item.AveragePrice,
|
||||
OrderCount: item.OrderCount,
|
||||
StandardHppPerUnit: item.StandardHppPerUnit,
|
||||
StandardHppTotal: item.StandardHppTotal,
|
||||
FifoHppPerUnit: item.FifoHppPerUnit,
|
||||
FifoHppTotal: item.FifoHppTotal,
|
||||
MovingAverageHppPerUnit: item.MovingAverageHppPerUnit,
|
||||
MovingAverageHppTotal: item.MovingAverageHppTotal,
|
||||
})
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user