[Home] [Help]
3454: CURSOR c_qte_sum IS
3455: SELECT quote_line_id, line_category_code, nvl(line_list_price * quantity, 0) total_list_price,
3456: nvl(line_adjusted_amount * quantity,
3457: nvl(line_adjusted_percent * line_list_price * quantity, 0)) ln_total_discount
3458: FROM ASO_QUOTE_LINES_ALL
3459: WHERE quote_header_id = p_qte_header_id
3460: and charge_periodicity_code is null; -- Recurring charges Change
3461:
3462:
4051: and quote_line_id IS NULL ;
4052:
4053: Cursor get_line_qte_price( p_quote_line_id NUMBER) IS
4054: select line_quote_price,quantity
4055: from aso_quote_lines_all
4056: where quote_line_id = p_quote_line_id;
4057:
4058: Cursor c_inv_org_id(l_main_org_id Number) IS
4059: select master_organization_id
6009: last_update_login = fnd_global.conc_login_id
6010: where config_header_id is not null
6011: and config_revision_num is not null
6012: and ref_type_code is null
6013: and quote_line_id in (select quote_line_id from aso_quote_lines_all
6014: where item_type_code = 'MDL'
6015: and quote_header_id = x_qte_header_rec.quote_header_id);
6016:
6017:
6378: END IF;
6379:
6380:
6381: -- Update the corresponding columns in the line table
6382: update aso_quote_lines_all
6383: set line_paynow_charges = l_paynow_charges,
6384: line_paynow_tax = l_paynow_tax,
6385: line_paynow_subtotal = l_paynow_amount,
6386: last_update_date = sysdate,
6644: AND quote_line_id IS NULL
6645: AND ORIG_TAX_CODE IS NOT NULL;
6646:
6647: CURSOR c_qte_line(l_d_qte_line NUMBER) IS
6648: SELECT quote_line_id FROM ASO_QUOTE_LINES_ALL
6649: where quote_line_id= l_d_qte_line;
6650:
6651: --ovn
6652: cursor c_last_update_date( p_qte_hdr_id number) is
6655: where quote_header_id = p_qte_hdr_id;
6656:
6657: cursor c_quote_lines( p_qte_hdr_id number) is
6658: select quote_line_id,order_line_type_id,line_category_code,price_list_id,line_quote_price,quantity
6659: from aso_quote_lines_all
6660: where quote_header_id = p_qte_hdr_id;
6661:
6662: cursor c_related_obj_id (p_qte_hdr_id number) is
6663: select related_object_id,last_update_date
10018: last_update_login = g_login_id
10019: where config_header_id is not null
10020: and config_revision_num is not null
10021: and ref_type_code is null
10022: and quote_line_id in (select quote_line_id from aso_quote_lines_all
10023: where item_type_code = 'MDL'
10024: and quote_header_id = x_qte_header_rec.quote_header_id);
10025:
10026: IF aso_debug_pub.g_debug_flag = 'Y' THEN
10193: COUNT(QUOTE_HEADER_ID)
10194: INTO
10195: l_lines
10196: FROM
10197: ASO_QUOTE_LINES_ALL
10198: WHERE
10199: QUOTE_HEADER_ID=x_qte_header_rec.quote_header_id;
10200: END IF;
10201:
10449: END IF;
10450:
10451:
10452: -- Update the corresponding columns in the line table
10453: update aso_quote_lines_all
10454: set line_paynow_charges = l_paynow_charges,
10455: line_paynow_tax = l_paynow_tax,
10456: line_paynow_subtotal = l_paynow_amount,
10457: last_update_date = sysdate,
10581: l_api_name CONSTANT VARCHAR2(30) := 'Delete_quote';
10582: l_api_version_number CONSTANT NUMBER := 1.0;
10583: l_qln_id NUMBER;
10584: CURSOR c_qte_lines IS
10585: SELECT quote_line_id FROM ASO_QUOTE_LINES_ALL
10586: WHERE quote_header_id = p_qte_header_id;
10587:
10588: l_qte_line_rec ASO_QUOTE_PUB.Qte_Line_Rec_Type;
10589: CURSOR c_qte_line(l_d_qte_line NUMBER) IS
10586: WHERE quote_header_id = p_qte_header_id;
10587:
10588: l_qte_line_rec ASO_QUOTE_PUB.Qte_Line_Rec_Type;
10589: CURSOR c_qte_line(l_d_qte_line NUMBER) IS
10590: SELECT quote_line_id FROM ASO_QUOTE_LINES_ALL
10591: where quote_line_id= l_qte_line_rec.quote_line_id;
10592: BEGIN
10593: -- Standard Start of API savepoint
10594: SAVEPOINT DELETE_quote_PVT;
10814: RELATED_QUOTE_LINE_ID,
10815: RELATIONSHIP_TYPE_CODE,
10816: RECIPROCAL_FLAG FROM ASO_LINE_RELATIONSHIPS
10817: WHERE quote_line_id IN
10818: (SELECT quote_line_id FROM aso_quote_lines_all
10819: WHERE quote_header_id = x_quote_header_id)
10820: AND related_quote_line_id IN
10821: (SELECT quote_line_id FROM aso_quote_lines_all
10822: WHERE quote_header_id = x_quote_header_id);
10817: WHERE quote_line_id IN
10818: (SELECT quote_line_id FROM aso_quote_lines_all
10819: WHERE quote_header_id = x_quote_header_id)
10820: AND related_quote_line_id IN
10821: (SELECT quote_line_id FROM aso_quote_lines_all
10822: WHERE quote_header_id = x_quote_header_id);
10823: */ -- original copy_qte
10824:
10825: /* Commented by Biplabi Mishra to change the EXISTS to IN 07/09/01
10840: RELATED_QUOTE_LINE_ID,
10841: RELATIONSHIP_TYPE_CODE,
10842: RECIPROCAL_FLAG FROM ASO_LINE_RELATIONSHIPS
10843: WHERE EXISTS
10844: (SELECT 'x' FROM aso_quote_lines_all aql
10845: WHERE aql.quote_header_id = x_quote_header_id
10846: AND aql.quote_line_id = aso_line_relationships.quote_line_id)
10847: AND EXISTS
10848: (SELECT 'x' FROM aso_quote_lines_all aql
10844: (SELECT 'x' FROM aso_quote_lines_all aql
10845: WHERE aql.quote_header_id = x_quote_header_id
10846: AND aql.quote_line_id = aso_line_relationships.quote_line_id)
10847: AND EXISTS
10848: (SELECT 'x' FROM aso_quote_lines_all aql
10849: WHERE aql.quote_header_id = x_quote_header_id
10850: AND aql.quote_line_id = aso_line_relationships.related_quote_line_id);
10851:
10852: */
10876: WHERE price_adjustment_id IN
10877: (SELECT price_adjustment_id FROM aso_price_adjustments
10878: WHERE quote_header_id = x_quote_header_id)
10879: AND quote_line_id IN
10880: (SELECT quote_line_id FROM aso_quote_lines_all
10881: WHERE quote_header_id = x_quote_header_id);
10882: */
10883: /*
10884: CURSOR c_price_adj_rel (x_quote_header_id NUMBER) IS
10902: FROM ASO_PRICE_ADJ_RELATIONSHIPS apr,
10903: ASO_PRICE_ADJUSTMENTS apa
10904: WHERE apr.price_adjustment_id = apa.price_adjustment_id
10905: AND apa.quote_header_id = x_quote_header_id
10906: AND EXISTS (select 'x' from aso_quote_lines_all aql
10907: where aql.quote_header_id = x_quote_header_id
10908: and aql.quote_line_id = apr.quote_line_id);
10909: */
10910:
12109: IS
12110:
12111: CURSOR line_id_from_config IS
12112: SELECT ASO_Quote_Line_Details.QUOTE_LINE_ID
12113: FROM ASO_Quote_Line_Details, ASO_Quote_Lines_all
12114: WHERE ASO_Quote_Line_Details.config_header_id = p_old_config_header_id
12115: AND ASO_Quote_Line_Details.config_revision_num = p_old_config_revision_num
12116: AND ASO_quote_line_details.quote_line_id = ASO_Quote_Lines_all.quote_line_id
12117: AND ASO_Quote_Lines_all.item_type_code <> 'MDL'
12112: SELECT ASO_Quote_Line_Details.QUOTE_LINE_ID
12113: FROM ASO_Quote_Line_Details, ASO_Quote_Lines_all
12114: WHERE ASO_Quote_Line_Details.config_header_id = p_old_config_header_id
12115: AND ASO_Quote_Line_Details.config_revision_num = p_old_config_revision_num
12116: AND ASO_quote_line_details.quote_line_id = ASO_Quote_Lines_all.quote_line_id
12117: AND ASO_Quote_Lines_all.item_type_code <> 'MDL'
12118: AND aso_quote_lines_all.quote_header_id = qte_header_id;
12119:
12120: l_payment_tbl ASO_QUOTE_PUB.Payment_Tbl_Type;
12113: FROM ASO_Quote_Line_Details, ASO_Quote_Lines_all
12114: WHERE ASO_Quote_Line_Details.config_header_id = p_old_config_header_id
12115: AND ASO_Quote_Line_Details.config_revision_num = p_old_config_revision_num
12116: AND ASO_quote_line_details.quote_line_id = ASO_Quote_Lines_all.quote_line_id
12117: AND ASO_Quote_Lines_all.item_type_code <> 'MDL'
12118: AND aso_quote_lines_all.quote_header_id = qte_header_id;
12119:
12120: l_payment_tbl ASO_QUOTE_PUB.Payment_Tbl_Type;
12121: l_payment_tbl_out ASO_QUOTE_PUB.Payment_Tbl_Type;
12114: WHERE ASO_Quote_Line_Details.config_header_id = p_old_config_header_id
12115: AND ASO_Quote_Line_Details.config_revision_num = p_old_config_revision_num
12116: AND ASO_quote_line_details.quote_line_id = ASO_Quote_Lines_all.quote_line_id
12117: AND ASO_Quote_Lines_all.item_type_code <> 'MDL'
12118: AND aso_quote_lines_all.quote_header_id = qte_header_id;
12119:
12120: l_payment_tbl ASO_QUOTE_PUB.Payment_Tbl_Type;
12121: l_payment_tbl_out ASO_QUOTE_PUB.Payment_Tbl_Type;
12122: l_shipment_tbl ASO_QUOTE_PUB.Shipment_Tbl_Type;
12296: END IF;
12297:
12298: ASO_ATTACHMENT_INT.Copy_Attachments(
12299: p_api_version => l_api_version,
12300: p_old_object_code => 'ASO_QUOTE_LINES_ALL',
12301: p_new_object_code => 'ASO_QUOTE_LINES_ALL',
12302: p_old_object_id => qte_line_id,
12303: p_new_object_id => lx_qte_line_rec.quote_line_id,
12304: x_return_status => x_return_status ,
12297:
12298: ASO_ATTACHMENT_INT.Copy_Attachments(
12299: p_api_version => l_api_version,
12300: p_old_object_code => 'ASO_QUOTE_LINES_ALL',
12301: p_new_object_code => 'ASO_QUOTE_LINES_ALL',
12302: p_old_object_id => qte_line_id,
12303: p_new_object_id => lx_qte_line_rec.quote_line_id,
12304: x_return_status => x_return_status ,
12305: x_msg_count => x_msg_count,
12587: END IF;
12588:
12589: ASO_ATTACHMENT_INT.Copy_Attachments(
12590: p_api_version => l_api_version,
12591: p_old_object_code => 'ASO_QUOTE_LINES_ALL',
12592: p_new_object_code => 'ASO_QUOTE_LINES_ALL',
12593: p_old_object_id => qte_line_id,
12594: p_new_object_id => lx_qte_line_rec.quote_line_id,
12595: x_return_status => x_return_status ,
12588:
12589: ASO_ATTACHMENT_INT.Copy_Attachments(
12590: p_api_version => l_api_version,
12591: p_old_object_code => 'ASO_QUOTE_LINES_ALL',
12592: p_new_object_code => 'ASO_QUOTE_LINES_ALL',
12593: p_old_object_id => qte_line_id,
12594: p_new_object_id => lx_qte_line_rec.quote_line_id,
12595: x_return_status => x_return_status ,
12596: x_msg_count => x_msg_count,