DBA Data[Home] [Help]

APPS.PO_PRICE_BREAK_S SQL Statements

The following lines contain the word 'select', 'insert', 'update' or 'delete':

Line: 31

        SELECT  poll.price_override
        ,       round(poll.price_override * decode(poh.rate, 0, 1, null, 1, poh.rate), 5 )
        ,       poh.rate_date
        ,       poh.rate
        ,       poh.currency_code
        ,       poh.rate_type
        ,       poll.price_discount
        ,       poll.price_override
        ,       decode(	poll.line_location_id,
			null, pol.unit_meas_lookup_code,
                       	poll.unit_meas_lookup_code)
        FROM    po_headers poh
        ,       po_lines pol
        ,       po_line_locations poll
        WHERE   poh.po_header_id = source_document_header_id
        and     poh.po_header_id = pol.po_header_id
        and     pol.line_num = source_document_line_num
        and     pol.po_line_id = poll.po_line_id (+)
        and     (   required_currency is null
                 or poh.currency_code = required_currency )
        and     (   required_rate_type is null
                 or poh.rate_type = required_rate_type )
        and     nvl(poll.unit_meas_lookup_code, nvl(unit_of_measure,
                                                pol.unit_meas_lookup_code))
                = nvl(unit_of_measure, pol.unit_meas_lookup_code)
        and     trunc(sysdate) between nvl(poll.start_date, trunc(sysdate))
                         and     nvl(poll.end_date, trunc(sysdate))
        and     poll.quantity <= in_quantity
        and     poll.ship_to_location_id = v_ship_to_location_id
        and     poll.shipment_type in ('PRICE BREAK', 'QUOTATION')
        order by 1 asc;
Line: 64

        SELECT 	decode(	poll.shipment_type,
			'PRICE BREAK', 	decode(	poll.ship_to_location_id,
						null, poll.price_override,
						pol.unit_price) ,
			'QUOTATION', 	decode(	poll.ship_to_location_id,
						null, poll.price_override,
						pol.unit_price) ,
			pol.unit_price)
        ,       round( decode(	poll.shipment_type,
				'PRICE BREAK', 	decode(	poll.ship_to_location_id,
							null, poll.price_override,
							pol.unit_price) ,
				'QUOTATION', 	decode(	poll.ship_to_location_id,
							null, poll.price_override,
							pol.unit_price) ,
				pol.unit_price)
                	* decode(poh.rate, 0, 1, null, 1, poh.rate), 5 )
        ,       poh.rate_date
        ,       poh.rate
        ,       poh.currency_code
        ,       poh.rate_type
        ,       poll.price_discount
        ,       decode(	poll.shipment_type,
			'PRICE BREAK', 	decode(	poll.ship_to_location_id,
						null, poll.price_override ,
						pol.unit_price) ,
			'QUOTATION', 	decode(	poll.ship_to_location_id,
						null, poll.price_override ,
						pol.unit_price) ,
			pol.unit_price)
        ,       decode(	poll.line_location_id,
			null, pol.unit_meas_lookup_code,
                       	poll.unit_meas_lookup_code)
        FROM    po_headers poh
        ,       po_lines pol
        ,       po_line_locations poll
        WHERE   poh.po_header_id = source_document_header_id
        and     poh.po_header_id = pol.po_header_id
        and     pol.line_num = source_document_line_num
        and     pol.po_line_id = poll.po_line_id (+)
        and     (   required_currency is null
                 or poh.currency_code = required_currency )
        and     (   required_rate_type is null
                 or poh.rate_type = required_rate_type )
        and     nvl(poll.unit_meas_lookup_code, nvl(	unit_of_measure,
                                                	pol.unit_meas_lookup_code))
                	 = nvl(unit_of_measure, pol.unit_meas_lookup_code)
        and 	trunc(sysdate) BETWEEN nvl(poll.start_date,trunc(sysdate) )   AND nvl(poll.end_date,trunc(sysdate))
        and     poll.quantity (+) <= in_quantity
        order by 1 asc ;
Line: 118

        SELECT ship_to_location_id
        INTO   v_ship_to_location_id
        FROM   hr_locations
        WHERE  location_id = deliver_to_location_id ;
Line: 126

               	select 	location_id
               	into 	v_ship_to_location_id
               	from 	hz_locations
               	where 	location_id = deliver_to_location_id;
Line: 147

        SELECT pol.unit_price,
               round(pol.unit_price * decode(poh.rate, 0, 1, null, 1, poh.rate), 5 )
        INTO   base_price,
               currency_price
        FROM   po_lines pol,
               po_headers poh
        WHERE pol.po_header_id = poh.po_header_id
        AND   pol.po_header_id =  source_document_header_id
        AND   pol.line_num = source_document_line_num;