4041: AND lines.date_cancelled is null --LLC BUG FIX 4742661
4042: And lines.date_terminated is null
4043: And lines.cle_id is null
4044: And hdr.sts_code <> 'QA_HOLD'
4045: AND (exists ( SELECT 1 from okc_assents a
4046: where Hdr.scs_code = a.scs_code
4047: and lines.sts_code = a.sts_code
4048: and lines.sts_code <> 'HOLD'
4049: and a.opn_code = 'INVOICE'
4066: okc_k_lines_b lines
4067: WHERE lines.id = p_line_id
4068: AND hdr.id = lines.dnz_chr_id
4069: AND hdr.sts_code <> 'QA_HOLD'
4070: AND (exists ( SELECT 1 from okc_assents a
4071: where Hdr.scs_code = a.scs_code
4072: and lines.sts_code = a.sts_code
4073: and lines.sts_code <> 'HOLD'
4074: and a.opn_code = 'INVOICE'
8139: AND line2.id = line1.cle_id
8140: AND rline.cle_id = line2.id
8141: AND hdr.id = line1.dnz_chr_id
8142: AND hdr.sts_code <> 'QA_HOLD'
8143: AND (exists ( SELECT 1 from okc_assents a
8144: where Hdr.scs_code = a.scs_code
8145: and line1.sts_code = a.sts_code
8146: and line1.sts_code <> 'HOLD'
8147: and a.opn_code = 'INVOICE'