The following lines contain the word 'select', 'insert', 'update' or 'delete':
SELECT PLL.quantity,
PLL.amount, -- Bug 5409088
PLL.ship_to_location_id,
PLL.promised_date,
PLL.need_by_date,
PLL.shipment_num,
PLL.last_accept_date,
PLL.price_discount,
PLL.price_override,
PLL.ship_to_organization_id,
PLL.taxable_flag,
PLL.start_date, /* */
PLL.end_date, /* */
PLL.days_early_receipt_allowed --
INTO X_temp_quantity,
X_temp_amount, -- Bug 5409088
X_temp_ship_to_location_id,
X_temp_promised_date,
X_temp_need_by_date,
X_temp_shipment_num,
X_temp_last_accept_date,
X_temp_price_discount,
X_temp_price_override,
X_temp_ship_to_organization_id,
X_temp_taxable_flag,
l_temp_start_date, /* */
l_temp_end_date, /* */
l_days_early_receipt_allowed --
FROM PO_LINE_LOCATIONS PLL
WHERE PLL.line_location_id = X_shipment_id;
select routing_name
into X_rcv_routing_name
from rcv_routing_headers
where routing_header_id = X_rcv_routing_id;
select nvl(sum(quantity_ordered),0),nvl(sum(quantity_ordered),0)
into X_total, X_total_rtot_db
from po_distributions pod
where pod.line_location_id = X_line_location_id;
Procedure get_price_update_flag
Description: Decides whether shipment price should be updatable or not.
==============================================================================*/
procedure get_price_update_flag(X_line_location_id IN NUMBER,
X_expense_accrual_code in varchar2,
X_quantity_received in number,
X_quantity_billed in number,
X_prevent_price_update_flag in out NOCOPY varchar2) is
--
l_retroactive_update VARCHAR2(30) := 'NEVER';
l_retroactive_update := PO_RETROACTIVE_PRICING_PVT.Get_Retro_Mode;
SELECT 'Y'
INTO x_prevent_price_update_flag
FROM DUAL
WHERE EXISTS
(SELECT 'prevent price udpate'
FROM po_distributions
WHERE line_location_id = x_line_location_id
AND
(
(
(destination_type_code in ('INVENTORY','SHOP FLOOR')
OR (destination_type_code='EXPENSE'
AND (x_expense_accrual_code = 'RECEIPT'
OR X_quantity_billed > 0)))
AND (x_quantity_received > 0 OR
x_quantity_billed > 0)
--
AND (l_retroactive_update <> 'ALL_RELEASES' OR
(l_retroactive_update = 'ALL_RELEASES' AND
l_encumbrance_on = 'Y' ) OR -- Bug 3573266
(l_retroactive_update = 'ALL_RELEASES' AND
l_archive_mode_rel <> 'APPROVE') OR -- Bug 3565522
(l_retroactive_update = 'ALL_RELEASES' AND
l_retro_prj_allowed = 'N')) ) -- Bug 3231062
--
--
OR (encumbered_flag = 'Y')
)
);
end get_price_update_flag;