mirror of
https://gitlab.com/mbugroup/lti-api.git
synced 2026-06-09 15:07:49 +00:00
Merge branch 'feat/hpp-per-farm' into 'development'
adjust list marketing See merge request mbugroup/lti-api!604
This commit is contained in:
@@ -200,9 +200,12 @@ func ToMarketingListDTO(marketing *entity.Marketing, deliveryProducts []entity.M
|
|||||||
salesOrderProducts[i] = ToDeliveryMarketingProductDTO(product, marketing.MarketingType)
|
salesOrderProducts[i] = ToDeliveryMarketingProductDTO(product, marketing.MarketingType)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
var grandTotalSO float64
|
var grandTotalSO, grandTotalDO float64
|
||||||
for _, p := range marketing.Products {
|
for _, p := range marketing.Products {
|
||||||
grandTotalSO += p.TotalPrice
|
grandTotalSO += p.TotalPrice
|
||||||
|
if p.DeliveryProduct != nil && p.DeliveryProduct.DeliveryDate != nil {
|
||||||
|
grandTotalDO += p.DeliveryProduct.TotalPrice
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return MarketingListDTO{
|
return MarketingListDTO{
|
||||||
@@ -211,7 +214,7 @@ func ToMarketingListDTO(marketing *entity.Marketing, deliveryProducts []entity.M
|
|||||||
SalesPerson: salesPerson,
|
SalesPerson: salesPerson,
|
||||||
SoDocs: marketing.SoDocs,
|
SoDocs: marketing.SoDocs,
|
||||||
GrandTotalSO: grandTotalSO,
|
GrandTotalSO: grandTotalSO,
|
||||||
GrandTotalDO: marketing.GrandTotal,
|
GrandTotalDO: grandTotalDO,
|
||||||
SalesOrder: salesOrderProducts,
|
SalesOrder: salesOrderProducts,
|
||||||
DeliveryOrder: extractDeliveryGroupsFromProducts(marketing),
|
DeliveryOrder: extractDeliveryGroupsFromProducts(marketing),
|
||||||
CreatedUser: createdUser,
|
CreatedUser: createdUser,
|
||||||
|
|||||||
Reference in New Issue
Block a user