108:
109:
110: CURSOR c_status (p_status_code NUMBER) IS
111: SELECT 1
112: FROM gmd_qc_status
113: WHERE status_code = p_status_code
114: AND delete_mark = 0;
115:
116:
503:
504: --=========================================================================
505: -- spec_vr_status :
506: --=========================================================================
507: -- Check that Spec VR Status exist in GMD_QC_STATUS
508: OPEN c_status(l_mon_vr.spec_vr_status);
509: FETCH c_status
510: INTO dummy;
511: IF (c_status%NOTFOUND)
604: )
605: AND ( floor(vr.spec_vr_status / 100) = floor(p_mon_vr.spec_vr_status/100) AND
606: /* Bug 3090290; allow duplicate spec vr with "OBSOLUTE" status */
607: p_mon_vr.spec_vr_status <> 1000 )
608: AND vr.spec_vr_status NOT IN (SELECT status_code FROM gmd_qc_status
609: WHERE status_type = 800)
610: AND vr.delete_mark = 0
611: AND s.delete_mark = 0
612: AND vr.spec_vr_id <> NVL(p_mon_vr.spec_vr_id, -1)
1140:
1141: --=========================================================================
1142: -- spec_vr_status :
1143: --=========================================================================
1144: -- Check that Spec VR Status exist in GMD_QC_STATUS
1145: OPEN c_status(l_inv_vr.spec_vr_status);
1146: FETCH c_status
1147: INTO dummy;
1148: IF (c_status%NOTFOUND)
1253: )
1254: AND ( floor(vr.spec_vr_status / 100) = floor(p_inv_vr.spec_vr_status/100) AND
1255: /* Bug 3090290; allow duplicate spec vr with "OBSOLUTE" status */
1256: p_inv_vr.spec_vr_status <> 1000 )
1257: AND vr.spec_vr_status NOT IN (SELECT status_code FROM gmd_qc_status
1258: WHERE status_type = 800)
1259: AND vr.delete_mark = 0
1260: AND s.delete_mark = 0
1261: AND vr.spec_vr_id <> NVL(p_inv_vr.spec_vr_id, -1)
2601: p_wip_vr.spec_vr_status <> 1000 )
2602:
2603: /* Bug 3090290 - Here's the problem - Both spec vr's have the same status 1000 */
2604: /* obsolete */
2605: AND vr.spec_vr_status NOT IN (SELECT status_code FROM gmd_qc_status
2606: WHERE status_type = 800)
2607: AND vr.delete_mark = 0
2608: AND s.delete_mark = 0
2609: AND vr.spec_vr_id <> NVL(p_wip_vr.spec_vr_id, -1)
3249: )
3250: AND ( floor(vr.spec_vr_status/100) = floor(p_cust_vr.spec_vr_status/100) AND
3251: /* Bug 3090290; allow duplicate spec vr with "OBSOLUTE" status */
3252: p_cust_vr.spec_vr_status <> 1000 )
3253: AND vr.spec_vr_status NOT IN (SELECT status_code FROM gmd_qc_status
3254: WHERE status_type = 800)
3255: AND vr.delete_mark = 0
3256: AND s.delete_mark = 0
3257: AND vr.spec_vr_id <> NVL(p_cust_vr.spec_vr_id, -1)
3890: )
3891: AND ( floor(vr.spec_vr_status/100) = floor(p_supp_vr.spec_vr_status/100) AND
3892: /* Bug 3090290; allow duplicate spec vr with "OBSOLUTE" status */
3893: p_supp_vr.spec_vr_status <> 1000 )
3894: AND vr.spec_vr_status NOT IN (SELECT status_code FROM gmd_qc_status
3895: WHERE status_type = 800)
3896: AND vr.delete_mark = 0
3897: AND s.delete_mark = 0
3898: AND vr.spec_vr_id <> NVL(p_supp_vr.spec_vr_id, -1)