diff --git a/internal/modules/repports/dto/repportMarketing.dto.go b/internal/modules/repports/dto/repportMarketing.dto.go index 36df7a05..92ee9a77 100644 --- a/internal/modules/repports/dto/repportMarketing.dto.go +++ b/internal/modules/repports/dto/repportMarketing.dto.go @@ -302,6 +302,16 @@ func (p ProductRelationDTOFixed) MarshalJSON() ([]byte, error) { Suppliers []supplierDTO.SupplierRelationDTO `json:"suppliers"` } + suppliers := make([]supplierDTO.SupplierRelationDTO, len(p.ProductRelationDTO.Suppliers)) + for i, ps := range p.ProductRelationDTO.Suppliers { + suppliers[i] = supplierDTO.SupplierRelationDTO{ + Id: ps.Id, + Name: ps.Name, + Alias: ps.Alias, + Category: ps.Category, + } + } + return json.Marshal(&Alias{ Id: p.ProductRelationDTO.Id, Name: p.ProductRelationDTO.Name, @@ -310,6 +320,6 @@ func (p ProductRelationDTOFixed) MarshalJSON() ([]byte, error) { Uom: p.ProductRelationDTO.Uom, Flags: p.ProductRelationDTO.Flags, ProductCategory: p.ProductRelationDTO.ProductCategory, - Suppliers: p.ProductRelationDTO.Suppliers, + Suppliers: suppliers, }) }