142: AND nvl(qpl.END_DATE_ACTIVE,trunc(p_pricing_date));
143: BEGIN
144:
145: -- Get the contexts and attributes
146: QP_UTIL.Get_Context_Attribute('PRICE_LIST_ID',v_qualifier_context,v_qualifier_attribute);
147: QP_UTIL.Get_Context_Attribute('CUSTOMER_CLASS_CODE',v_customer_context,v_customer_class_attr);
148: QP_UTIL.Get_Context_Attribute('SOLD_TO_ORG_ID',v_customer_context,v_sold_to_org_attr);
149: QP_UTIL.Get_Context_Attribute('SITE_ORG_ID',v_customer_context,v_site_org_attr);
150:
143: BEGIN
144:
145: -- Get the contexts and attributes
146: QP_UTIL.Get_Context_Attribute('PRICE_LIST_ID',v_qualifier_context,v_qualifier_attribute);
147: QP_UTIL.Get_Context_Attribute('CUSTOMER_CLASS_CODE',v_customer_context,v_customer_class_attr);
148: QP_UTIL.Get_Context_Attribute('SOLD_TO_ORG_ID',v_customer_context,v_sold_to_org_attr);
149: QP_UTIL.Get_Context_Attribute('SITE_ORG_ID',v_customer_context,v_site_org_attr);
150:
151: FOR i in get_discount_headers(v_qualifier_context,v_qualifier_attribute,p_price_list_id,
144:
145: -- Get the contexts and attributes
146: QP_UTIL.Get_Context_Attribute('PRICE_LIST_ID',v_qualifier_context,v_qualifier_attribute);
147: QP_UTIL.Get_Context_Attribute('CUSTOMER_CLASS_CODE',v_customer_context,v_customer_class_attr);
148: QP_UTIL.Get_Context_Attribute('SOLD_TO_ORG_ID',v_customer_context,v_sold_to_org_attr);
149: QP_UTIL.Get_Context_Attribute('SITE_ORG_ID',v_customer_context,v_site_org_attr);
150:
151: FOR i in get_discount_headers(v_qualifier_context,v_qualifier_attribute,p_price_list_id,
152: v_customer_context,v_customer_class_attr,v_sold_to_org_attr,v_site_org_attr)
145: -- Get the contexts and attributes
146: QP_UTIL.Get_Context_Attribute('PRICE_LIST_ID',v_qualifier_context,v_qualifier_attribute);
147: QP_UTIL.Get_Context_Attribute('CUSTOMER_CLASS_CODE',v_customer_context,v_customer_class_attr);
148: QP_UTIL.Get_Context_Attribute('SOLD_TO_ORG_ID',v_customer_context,v_sold_to_org_attr);
149: QP_UTIL.Get_Context_Attribute('SITE_ORG_ID',v_customer_context,v_site_org_attr);
150:
151: FOR i in get_discount_headers(v_qualifier_context,v_qualifier_attribute,p_price_list_id,
152: v_customer_context,v_customer_class_attr,v_sold_to_org_attr,v_site_org_attr)
153: LOOP
173: -- if v_dummy is not null then it is a line related to a price break line . So ignore it.
174: IF (v_dummy IS NULL) THEN
175:
176: -- Get the context and attribute
177: IF QP_UTIL.Is_qualifier(p_attribute_id) = 'T' THEN
178: QP_UTIL.Get_Context_Attribute(p_attribute_id , v_qualifier_context , v_qualifier_attribute);
179: v_product_context := NULL;
180: v_product_attribute := NULL;
181: ELSIF QP_UTIL.Is_PricingAttr(p_attribute_id) = 'T' THEN
174: IF (v_dummy IS NULL) THEN
175:
176: -- Get the context and attribute
177: IF QP_UTIL.Is_qualifier(p_attribute_id) = 'T' THEN
178: QP_UTIL.Get_Context_Attribute(p_attribute_id , v_qualifier_context , v_qualifier_attribute);
179: v_product_context := NULL;
180: v_product_attribute := NULL;
181: ELSIF QP_UTIL.Is_PricingAttr(p_attribute_id) = 'T' THEN
182: QP_UTIL.Get_Context_Attribute(p_attribute_id , v_product_context , v_product_attribute);
177: IF QP_UTIL.Is_qualifier(p_attribute_id) = 'T' THEN
178: QP_UTIL.Get_Context_Attribute(p_attribute_id , v_qualifier_context , v_qualifier_attribute);
179: v_product_context := NULL;
180: v_product_attribute := NULL;
181: ELSIF QP_UTIL.Is_PricingAttr(p_attribute_id) = 'T' THEN
182: QP_UTIL.Get_Context_Attribute(p_attribute_id , v_product_context , v_product_attribute);
183: v_qualifier_context := NULL;
184: v_qualifier_attribute := NULL;
185: END IF;
178: QP_UTIL.Get_Context_Attribute(p_attribute_id , v_qualifier_context , v_qualifier_attribute);
179: v_product_context := NULL;
180: v_product_attribute := NULL;
181: ELSIF QP_UTIL.Is_PricingAttr(p_attribute_id) = 'T' THEN
182: QP_UTIL.Get_Context_Attribute(p_attribute_id , v_product_context , v_product_attribute);
183: v_qualifier_context := NULL;
184: v_qualifier_attribute := NULL;
185: END IF;
186:
233: --dbms_output.put_line('Discount Line Id: ' || i.list_line_id);
234: --dbms_output.put_line('Discount Line Type Code : ' || 'PBH');
235:
236: -- Get the context and attribute
237: IF QP_UTIL.Is_qualifier(p_attribute_id) = 'T' THEN
238: QP_UTIL.Get_Context_Attribute(p_attribute_id , v_qualifier_context , v_qualifier_attribute);
239: v_product_context := NULL;
240: v_product_attribute := NULL;
241: ELSIF QP_UTIL.Is_PricingAttr(p_attribute_id) = 'T' THEN
234: --dbms_output.put_line('Discount Line Type Code : ' || 'PBH');
235:
236: -- Get the context and attribute
237: IF QP_UTIL.Is_qualifier(p_attribute_id) = 'T' THEN
238: QP_UTIL.Get_Context_Attribute(p_attribute_id , v_qualifier_context , v_qualifier_attribute);
239: v_product_context := NULL;
240: v_product_attribute := NULL;
241: ELSIF QP_UTIL.Is_PricingAttr(p_attribute_id) = 'T' THEN
242: QP_UTIL.Get_Context_Attribute(p_attribute_id , v_product_context , v_product_attribute);
237: IF QP_UTIL.Is_qualifier(p_attribute_id) = 'T' THEN
238: QP_UTIL.Get_Context_Attribute(p_attribute_id , v_qualifier_context , v_qualifier_attribute);
239: v_product_context := NULL;
240: v_product_attribute := NULL;
241: ELSIF QP_UTIL.Is_PricingAttr(p_attribute_id) = 'T' THEN
242: QP_UTIL.Get_Context_Attribute(p_attribute_id , v_product_context , v_product_attribute);
243: v_qualifier_context := NULL;
244: v_qualifier_attribute := NULL;
245: END IF;
238: QP_UTIL.Get_Context_Attribute(p_attribute_id , v_qualifier_context , v_qualifier_attribute);
239: v_product_context := NULL;
240: v_product_attribute := NULL;
241: ELSIF QP_UTIL.Is_PricingAttr(p_attribute_id) = 'T' THEN
242: QP_UTIL.Get_Context_Attribute(p_attribute_id , v_product_context , v_product_attribute);
243: v_qualifier_context := NULL;
244: v_qualifier_attribute := NULL;
245: END IF;
246: