dbo.plm_get_user_display(a.site, a.tracker) as trackerName,
quoter,
dbo.plm_get_user_display(a.site, a.quoter) as quoterName,
a.quotation_status,
a.test_part_no,
dbo.plm_get_test_part_desc(a.site, a.test_part_no) as partName,
a.priority_level,
a.required_completion_date,
a.remark,
a.technical_considerations,
a.customer_responsible_person,
a.customer_responsible_person_phone,
a.create_date,
a.create_by,
a.update_date,
a.update_by,
a.next_to_do,
a.actuality_quotation_date,
a.quotation_result_information,
a.actuality_submission_date,
a.submission_method,
a.submission_remark,
a.actuality_reply_date,
a.confirm_results,
a.confirm_by,
a.confirm_information,
a.quotation_result_status,
a.quotation_batch_no,
a.quotation_item_no,
a.delivery_terms,
a.quote_type,
dbo.plm_get_dictDataLabel('quote_type', a.quote_type, a.site) as quoteTypeLabel,
dbo.plm_get_dictDataLabel('delivery_terms', a.delivery_terms, a.site) as deliveryTermsLabel,
a.quotation_amount,
a.customer_quote_no,
a.sourcing,
a.step_id,
a.reject_flag,
a.reject_step_id,
a.place,
vpp.plm_part_no,
<iftest="query.menuId != null and query.menuId != ''">
d.is_reject,
d.node_id,
d.node_name,
dbo.plm_get_user_display(d.site, d.create_by) as node_create_by,
dbo.get_plm_Approval_username(a.site, d.workflow_id, d.node_id, a.quotation_batch_no) as approvalUsername,
</if>
vpp.bu_no,
b.bu_desc,
vpp.final_part_no,
pcpi.customer_part_no
FROM plm_quotation_information as a
<iftest="query.menuId != null and query.menuId != ''">
left join plm_request_header as prh on a.site = prh.site and prh.menu_id = #{query.menuId}
left join plm_request_node as d on a.site = d.site and prh.classification_no = d.classification_no and prh.workflow_id = d.workflow_id and a.step_id = d.step_id
</if>
left join view_Project_Part vpp on vpp.site = a.site and vpp.test_part_no = a.test_part_no and vpp.project_id = a.project_id
left join BU b on vpp.bu_no = b.bu_no and a.site = b.site
left join plm_customer_part_info pcpi on a.site = pcpi.site and a.test_part_no = pcpi.part_no and a.customer_no = pcpi.customer_no
<where>
a.site = #{query.site}
and a.quotation_no not in (select inside_inquiry_no from plm_quote where site = #{query.site})