Index: src/main/groovy/com/lemans/pricecalc/services/catalog/CatalogPartService.groovy =================================================================== diff -u -r5a379d6aefd50843eacb83849dabc45c0ccfae88 -rc8916200dfda2e501b67f76eba3372c9469cfde2 --- src/main/groovy/com/lemans/pricecalc/services/catalog/CatalogPartService.groovy (.../CatalogPartService.groovy) (revision 5a379d6aefd50843eacb83849dabc45c0ccfae88) +++ src/main/groovy/com/lemans/pricecalc/services/catalog/CatalogPartService.groovy (.../CatalogPartService.groovy) (revision c8916200dfda2e501b67f76eba3372c9469cfde2) @@ -209,7 +209,7 @@ if (criteria.isActive) { clauses << 'vp.isActive = :isActive AND vp.isActive IS NOT NULL' } if (criteria.sectionId) { clauses << 'sp.sectionId = :sectionId' } if (criteria.statusCodeId) { clauses << 'cp.statusCodeId = :statusCodeId' } - if (criteria.buyer) { clauses << 'v.buyerGlobalId = :buyer' } + if (criteria.buyer) { clauses << 'vp.buyerGlobalId = :buyer' } if (criteria.catalogCode) { clauses << "vp.catalogCode like '%${criteria.catalogCode}%'" } clauses } @@ -270,7 +270,7 @@ break case 'buyer': //joins << 'INNER JOIN vwVendor v WITH(NOLOCK) ON v.vendorId = vp.vendorId' - select = "[filter] = 'buyer', id = v.buyerGlobalId, code = v.buyerGlobalId, descr = v.buyerName" + select = "[filter] = 'buyer', id = vp.buyerGlobalId, code = vp.buyerGlobalId, descr = vp.buyerName" break case 'catalogCode': joins << 'INNER JOIN [Common].dbo.TypeXref t WITH(NOLOCK) ON t.typeId = c.catalogCodeId AND t.dateDeleted IS NULL'