3176: -- SQL What: Find out any retroactive pricing change for this PO
3177: -- by comparing the price in the latest revision
3178: SELECT 'Y'
3179: INTO l_retro_change
3180: FROM dual
3181: WHERE EXISTS (SELECT 'retroactive pricing changes'
3182: FROM po_line_locations poll,
3183: po_line_locations_archive polla
3184: WHERE poll.po_header_id = p_document_id
3191: -- by comparing the price in the latest revision
3192:
3193: SELECT 'Y'
3194: INTO l_retro_change
3195: FROM dual
3196: WHERE EXISTS (SELECT 'retroactive pricing changes'
3197: FROM po_line_locations poll,
3198: po_line_locations_archive polla
3199: WHERE poll.po_release_id = p_document_id
4334: -- and is received/invoiced, 0 otherwise.
4335: -- SQL Why: To prevent retro price changes if there are such shipments.
4336: SELECT 'N'
4337: INTO l_retro_proj_allowed
4338: FROM DUAL
4339: WHERE EXISTS (SELECT 'has project information'
4340: FROM PO_LINE_LOCATIONS_ALL pll,
4341: PO_DISTRIBUTIONS_ALL pod
4342: WHERE pll.po_line_id = p_po_line_id
4355: -- and is received/invoiced, 0 otherwise.
4356: -- SQL Why: To prevent retro price changes if there are such shipments.
4357: SELECT 'N'
4358: INTO l_retro_proj_allowed
4359: FROM DUAL
4360: WHERE EXISTS (SELECT 'has project information'
4361: FROM PO_LINE_LOCATIONS_ALL pll,
4362: PO_DISTRIBUTIONS_ALL pod
4363: WHERE pll.line_location_id = p_po_line_loc_id