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)
|
||||
}
|
||||
}
|
||||
var grandTotalSO float64
|
||||
var grandTotalSO, grandTotalDO float64
|
||||
for _, p := range marketing.Products {
|
||||
grandTotalSO += p.TotalPrice
|
||||
if p.DeliveryProduct != nil && p.DeliveryProduct.DeliveryDate != nil {
|
||||
grandTotalDO += p.DeliveryProduct.TotalPrice
|
||||
}
|
||||
}
|
||||
|
||||
return MarketingListDTO{
|
||||
@@ -211,7 +214,7 @@ func ToMarketingListDTO(marketing *entity.Marketing, deliveryProducts []entity.M
|
||||
SalesPerson: salesPerson,
|
||||
SoDocs: marketing.SoDocs,
|
||||
GrandTotalSO: grandTotalSO,
|
||||
GrandTotalDO: marketing.GrandTotal,
|
||||
GrandTotalDO: grandTotalDO,
|
||||
SalesOrder: salesOrderProducts,
|
||||
DeliveryOrder: extractDeliveryGroupsFromProducts(marketing),
|
||||
CreatedUser: createdUser,
|
||||
|
||||
Reference in New Issue
Block a user