[Home] [Help]
112: -- make ids null or g_miss. this checking should be removed from table handlers
113:
114:
115:
116: -- creating a row in the aso_quote_lines_all table
117: -- set id to null because table handler will not generate a new value.
118: IF aso_debug_pub.g_debug_flag = 'Y' THEN
119: ASO_DEBUG_PUB.add('organization_id is '||nvl(to_char(p_qte_line_rec.organization_id),'null') , 1, 'Y');
120: aso_debug_pub.add('Insert_Quote_lines - Begin ', 1, 'Y');
1217: WHERE quote_line_id = p_qte_line_rec.quote_line_id;
1218:
1219: CURSOR C_header IS
1220: SELECT quote_header_id, organization_id, inventory_item_id
1221: FROM aso_quote_lines_all
1222: WHERE quote_line_id = p_qte_line_rec.quote_line_id;
1223:
1224: CURSOR C_customer IS
1225: SELECT cust_account_id, party_id
1230: SELECT qln.start_date_active, qln.end_date_active,
1231: detail.service_duration, detail.service_period,
1232: detail.service_coterminate_flag,
1233: qhd.cust_account_id, qhd.party_id
1234: FROM aso_quote_lines_all qln,
1235: aso_quote_line_details detail,
1236: aso_quote_headers_all qhd
1237: WHERE detail.quote_line_id = qln.quote_line_id
1238: AND qln.quote_line_id = p_qte_line_rec.quote_line_id
1244: WHERE quote_header_id = p_qte_line_rec.quote_header_id;
1245:
1246: CURSOR c_line_number ( p_quote_line_id NUMBER ) IS
1247: SELECT line_number
1248: FROM aso_quote_lines_all
1249: where quote_line_id = p_quote_line_id;
1250:
1251: cursor c_config_item_id( p_config_header_id number, p_config_revision_num number,
1252: p_component_code varchar2 ) is
1958:
1959: IF (l_qte_line_rec.line_number IS NULL OR l_qte_line_rec.line_number = FND_API.G_MISS_NUM) THEN
1960:
1961: SELECT max(line_number) into l_line_number
1962: FROM aso_quote_lines_all
1963: WHERE quote_header_id = l_qte_line_rec.quote_header_id;
1964:
1965: IF (SQL%NOTFOUND) OR l_line_number is NULL THEN
1966: l_line_number := 0;
2054: l_qte_line_rec.quantity := nvl(fnd_profile.value(name => 'ASO_DEFAULT_QTY'),1);
2055:
2056: ELSIF l_qte_line_rec.quantity = FND_API.G_MISS_NUM THEN
2057:
2058: select quantity into l_qte_line_rec.quantity from aso_quote_lines_All
2059: where quote_line_id = l_qte_line_rec.quote_line_id;
2060:
2061: END IF;
2062:
2622: WHERE quote_header_id = p_qte_line_rec.quote_header_id;
2623:
2624: cursor c_service (p_qln_id number)is
2625: select service_item_flag,serviceable_product_flag
2626: from aso_quote_lines_All
2627: where quote_line_id = p_qln_id;
2628:
2629: --New code for Bug # 2498942 fix
2630:
2629: --New code for Bug # 2498942 fix
2630:
2631: CURSOR C_line_category_code(p_quote_line_id NUMBER) IS
2632: SELECT line_category_code
2633: FROM aso_quote_lines_all
2634: WHERE quote_line_id = p_quote_line_id;
2635:
2636: --End of new code for Bug # 2498942 fix
2637:
4666: Cursor C_Get_quote(c_QUOTE_LINE_ID Number) IS
4667: SELECT head.LAST_UPDATE_DATE, head.QUOTE_STATUS_ID, head.QUOTE_NUMBER,
4668: head.TOTAL_ADJUSTED_PERCENT,head.quote_expiration_date
4669: FROM ASO_QUOTE_HEADERS_ALL head,
4670: ASO_QUOTE_LINES_ALL line
4671: WHERE head.QUOTE_HEADER_ID = line.QUOTE_HEADER_ID
4672: AND line.QUOTE_LINE_ID = c_QUOTE_LINE_ID;
4673:
4674: CURSOR C_Qte_Status(c_qte_status_id NUMBER) IS
4687: -- hyang csi change 1935614
4688: CURSOR C_CSI_Details (X_quote_line_id NUMBER) IS
4689: select b.quantity
4690: from csi_t_transaction_lines a, csi_t_txn_line_details b
4691: where a.source_transaction_table='ASO_QUOTE_LINES_ALL'
4692: and a.source_transaction_id = x_quote_line_id
4693: and a.transaction_line_id = b.transaction_line_id;
4694:
4695: CURSOR C_ship_partial (l_quote_line_id NUMBER) IS
4708: Where QUOTE_HEADER_ID = c_QUOTE_HEADER_ID;
4709:
4710: CURSOR C_org_id IS
4711: SELECT org_id
4712: FROM aso_quote_lines_all
4713: WHERE quote_line_id = p_qte_line_rec.quote_line_id;
4714:
4715: CURSOR c_inventory_item_id IS
4716: select inventory_item_id
4713: WHERE quote_line_id = p_qte_line_rec.quote_line_id;
4714:
4715: CURSOR c_inventory_item_id IS
4716: select inventory_item_id
4717: from aso_quote_lines_all
4718: where quote_line_id = P_Qte_Line_Rec.quote_line_id;
4719:
4720: cursor c_service (p_qln_id number)is
4721: select service_item_flag,serviceable_product_flag
4718: where quote_line_id = P_Qte_Line_Rec.quote_line_id;
4719:
4720: cursor c_service (p_qln_id number)is
4721: select service_item_flag,serviceable_product_flag
4722: from aso_quote_lines_All
4723: where quote_line_id = p_qln_id;
4724:
4725: CURSOR C_qln_exist IS
4726: select quote_line_id from aso_quote_lines_all
4722: from aso_quote_lines_All
4723: where quote_line_id = p_qln_id;
4724:
4725: CURSOR C_qln_exist IS
4726: select quote_line_id from aso_quote_lines_all
4727: where quote_line_id = p_qte_line_rec.quote_line_id;
4728:
4729: -- Cursor declaration for line_category_code and order_line_type_id change bug # 2208195
4730: cursor c_line_category_code(p_quote_line_id NUMBER) is
4728:
4729: -- Cursor declaration for line_category_code and order_line_type_id change bug # 2208195
4730: cursor c_line_category_code(p_quote_line_id NUMBER) is
4731: select line_category_code
4732: from aso_quote_lines_all
4733: where quote_line_id = p_quote_line_id;
4734:
4735: cursor c_order_line_type_id(p_quote_line_id NUMBER) is
4736: select a.line_category_code, a.order_line_type_id, b.config_header_id, b.config_revision_num
4733: where quote_line_id = p_quote_line_id;
4734:
4735: cursor c_order_line_type_id(p_quote_line_id NUMBER) is
4736: select a.line_category_code, a.order_line_type_id, b.config_header_id, b.config_revision_num
4737: from aso_quote_lines_all a, aso_quote_line_details b
4738: where a.quote_line_id = b.quote_line_id
4739: and a.quote_line_id = p_quote_line_id;
4740:
4741: cursor c_item_type_code is
4739: and a.quote_line_id = p_quote_line_id;
4740:
4741: cursor c_item_type_code is
4742: select item_type_code
4743: from aso_quote_lines_all
4744: where quote_line_id = p_qte_line_rec.quote_line_id;
4745:
4746: --New code for Bug # 2498942 fix
4747:
4868: where payment_id = l_payment_id;
4869:
4870: cursor get_bill_to_party( l_qte_line_id Number) is
4871: select invoice_to_cust_party_id
4872: from aso_quote_lines_all
4873: where quote_line_id = l_qte_line_id;
4874:
4875: l_service_ref_type_code varchar2(30);
4876:
5583:
5584: IF lx_qte_line_rec.inventory_item_id is NULL OR lx_qte_line_rec.inventory_item_id = FND_API.G_MISS_NUM THEN
5585:
5586: SELECT inventory_item_id INTO l_inventory_item_id
5587: FROM aso_quote_lines_all
5588: WHERE quote_line_id = lx_qte_line_rec.quote_line_id;
5589:
5590: ELSE
5591:
6734: end if;
6735:
6736: if l_config_header_id is not null and l_config_revision_num is not null then
6737:
6738: update aso_quote_lines_all
6739: set line_category_code = l_line_category_code,
6740: order_line_type_id = l_order_line_type_id,
6741: last_update_date = sysdate,
6742: last_updated_by = fnd_global.user_id,
8686: CLOSE C_ship_partial;
8687:
8688: IF l_ship_count > 1 THEN
8689:
8690: update aso_quote_lines_all
8691: set split_shipment_flag = 'T',
8692: last_update_date = sysdate,
8693: last_updated_by = fnd_global.user_id,
8694: last_update_login = fnd_global.conc_login_id
8695: where quote_line_id = l_Qte_Line_Rec.quote_line_id;
8696:
8697: ELSIF l_ship_count = 1 THEN
8698:
8699: update aso_quote_lines_all
8700: set split_shipment_flag = 'F',
8701: last_update_date = sysdate,
8702: last_updated_by = fnd_global.user_id,
8703: last_update_login = fnd_global.conc_login_id
9097: Cursor C_Get_quote(c_QUOTE_LINE_ID Number) IS
9098: Select head.LAST_UPDATE_DATE, head.QUOTE_STATUS_ID, head.QUOTE_NUMBER,
9099: head.TOTAL_ADJUSTED_PERCENT, head.quote_header_id
9100: From ASO_QUOTE_HEADERS_ALL head,
9101: ASO_QUOTE_LINES_ALL line
9102: Where head.QUOTE_HEADER_ID = line.QUOTE_HEADER_ID
9103: And line.QUOTE_LINE_ID = c_QUOTE_LINE_ID;
9104:
9105: CURSOR C_Qte_Status(c_qte_status_id NUMBER) IS
9125: cursor c_csi_details is
9126: select transaction_line_id
9127: from csi_t_transaction_lines
9128: where source_transaction_id = p_qte_line_rec.quote_line_id
9129: and source_transaction_table = 'ASO_QUOTE_LINES_ALL';
9130:
9131: CURSOR C_config IS
9132: SELECT qln.item_type_code, dtl.config_header_id, dtl.config_revision_num, dtl.ref_type_code
9133: FROM aso_quote_lines_all qln, aso_quote_line_details dtl
9129: and source_transaction_table = 'ASO_QUOTE_LINES_ALL';
9130:
9131: CURSOR C_config IS
9132: SELECT qln.item_type_code, dtl.config_header_id, dtl.config_revision_num, dtl.ref_type_code
9133: FROM aso_quote_lines_all qln, aso_quote_line_details dtl
9134: WHERE qln.quote_line_id = p_qte_line_rec.quote_line_id
9135: AND qln.quote_line_id = dtl.quote_line_id;
9136:
9137: CURSOR C_Children(l_quote_line_id NUMBER) IS
9141: AND ref_type_code = 'TOP_MODEL';
9142:
9143: cursor c_pricing_line_type_indicator is
9144: select pricing_line_type_indicator
9145: from aso_quote_lines_all
9146: where quote_line_id = P_qte_line_Rec.quote_line_id;
9147:
9148: cursor c_prg_lines is
9149: select modifier_line_type_code
10113: WHERE instance_id = p_instance_id;
10114:
10115: CURSOR C_quantity(p_quote_line_id NUMBER) IS
10116: SELECT quantity
10117: FROM aso_quote_lines_all
10118: WHERE quote_line_id = p_quote_line_id;
10119:
10120: l_serviceable_product_flag VARCHAR2(1);
10121: l_qte_line_rec ASO_QUOTE_PUB.QTE_LINE_REC_TYPE;
10138: end if;
10139:
10140: l_qte_line_rec := ASO_UTILITY_PVT.Query_Qte_Line_Row(p_qte_line_rec.quote_line_id);
10141: begin
10142: UPDATE aso_quote_lines_all
10143: set quantity = l_qte_line_rec.quantity,
10144: last_update_date = sysdate,
10145: last_updated_by = fnd_global.user_id,
10146: last_update_login = fnd_global.conc_login_id
10238: IF x_return_status <> FND_API.G_RET_STS_ERROR AND l_update_flag = FND_API.G_TRUE THEN
10239:
10240: Begin
10241:
10242: UPDATE aso_quote_lines_all
10243: set quantity = l_quantity,
10244: last_update_date = sysdate,
10245: last_updated_by = fnd_global.user_id,
10246: last_update_login = fnd_global.conc_login_id