DBA Data[Home] [Help]

APPS.PO_AUTO_LINE_LOC_PROCESS_PVT dependencies on PO_AUTOCREATE_PARAMS

Line 226: IF (p_lines.from_line_id_tbl(i) IS NOT NULL) AND (po_autocreate_params.g_document_subtype = 'STANDARD') THEN

222: p_message => 'from line id :'||p_lines.from_line_id_tbl(i)||'from header id:'||p_lines.from_header_id_tbl(i));
223: END IF;
224:
225: l_progress :='030';
226: IF (p_lines.from_line_id_tbl(i) IS NOT NULL) AND (po_autocreate_params.g_document_subtype = 'STANDARD') THEN
227: l_progress := '040';
228:
229: BEGIN
230: SELECT poh.type_lookup_code

Line 261: IF ((po_autocreate_params.g_document_subtype='STANDARD') AND (p_lines.from_line_id_tbl(i) IS NOT NULL)) THEN

257: END IF;
258:
259: IF (NVL(x_uom_convert,'N') = 'Y') THEN
260: -- Convert UOM when autocreating a PO that references a GA
261: IF ((po_autocreate_params.g_document_subtype='STANDARD') AND (p_lines.from_line_id_tbl(i) IS NOT NULL)) THEN
262: /* Get the uom from the PO . This will be used for uom conversion */
263: BEGIN
264: --Autocreating a PO that references a GA
265: l_progress := '050';

Line 270: AND draft_id =po_autocreate_params.g_draft_id;

266: SELECT unit_meas_lookup_code
267: INTO x_po_uom
268: FROM po_lines_draft_all
269: WHERE po_line_id = p_lines.from_line_id_tbl(i)
270: AND draft_id =po_autocreate_params.g_draft_id;
271: EXCEPTION
272: WHEN OTHERS THEN
273: IF g_debug_unexp THEN
274: PO_DEBUG.debug_exc(p_log_head => g_log_head||l_api_name, p_progress => l_progress);

Line 320: IF(po_autocreate_params.g_document_subtype='STANDARD' OR po_autocreate_params.g_document_subtype='PLANNED' )THEN

316: */
317:
318: x_ship_to_location_id := po_autocreate_mainproc_pvt.get_ship_to_loc(p_lines.deliver_to_loc_id_tbl(i)); -- FPI
319:
320: IF(po_autocreate_params.g_document_subtype='STANDARD' OR po_autocreate_params.g_document_subtype='PLANNED' )THEN
321: l_progress := '070';
322:
323: BEGIN
324: SELECT poll.line_location_id,

Line 331: AND pol.draft_id =po_autocreate_params.g_draft_id

327: x_secondary_unit_of_measure
328: FROM po_line_locations_draft_all poll, --
329: po_lines_draft_all pol --
330: WHERE poll.po_header_id = p_lines.po_header_id_tbl(i)
331: AND pol.draft_id =po_autocreate_params.g_draft_id
332: AND poll.po_line_id = p_lines.po_line_id_tbl(i)
333: AND poll.shipment_num = p_lines.shipment_num_tbl(i)
334: AND pol.line_num = p_lines.line_num_tbl(i)
335: AND poll.shipment_type IN ('STANDARD','PLANNED', 'RFQ')

Line 360: IF (po_autocreate_params.g_interface_source_code = 'CONSUMPTION_ADVICE') THEN

356: raise;
357: END;
358: END IF;
359:
360: IF (po_autocreate_params.g_interface_source_code = 'CONSUMPTION_ADVICE') THEN
361: x_price := p_lines.unit_price_tbl(i);
362: ELSE
363: l_progress := '080';
364:

Line 370: AND draft_id =po_autocreate_params.g_draft_id;

366: SELECT unit_price
367: INTO x_price
368: FROM po_lines_draft_all --
369: WHERE po_line_id=p_lines.po_line_id_tbl(i)
370: AND draft_id =po_autocreate_params.g_draft_id;
371:
372: EXCEPTION
373: WHEN OTHERS THEN
374: IF g_debug_stmt THEN

Line 386: IF PO_AUTOCREATE_PARAMS.g_mode = 'ADD' AND PO_AUTOCREATE_PARAMS.g_is_mod_exists THEN -- this is a Add PR lines to mod case.

382: IF(x_line_location_id is not null) THEN
383:
384: /*Autocreate grouping. In case of ADD_TO_MOD action, there can be concurrent modifications.
385: Hence lock has to be taken on the current modification to which the line is grouped to*/
386: IF PO_AUTOCREATE_PARAMS.g_mode = 'ADD' AND PO_AUTOCREATE_PARAMS.g_is_mod_exists THEN -- this is a Add PR lines to mod case.
387:
388: l_entity_name_tbl.EXTEND(1);
389: l_pk1_tbl.EXTEND(1);
390: l_pk2_tbl.EXTEND(1);

Line 402: p_draft_id => PO_AUTOCREATE_PARAMS.g_draft_id,

398: l_pk4_tbl(1) := NULL;
399:
400: PO_DRAFTS_PVT.lock_entities(
401: p_entity_name_tbl => l_entity_name_tbl,
402: p_draft_id => PO_AUTOCREATE_PARAMS.g_draft_id,
403: p_pk1_tbl => l_pk1_tbl,
404: p_pk2_tbl => l_pk2_tbl,
405: p_pk3_tbl => l_pk3_tbl,
406: p_pk4_tbl => l_pk4_tbl,

Line 450: p_interface_source_code => po_autocreate_params.g_interface_source_code,

446: l_cc_amount := p_lines.amount_tbl(i);
447: l_progress:='120';
448:
449: po_auto_line_process_pvt.do_currency_conversion( p_order_type_lookup_code => 'AMOUNT',
450: p_interface_source_code => po_autocreate_params.g_interface_source_code,
451: p_rate => p_lines.rate_for_req_fields_tbl(i), --
452: p_po_currency_code => p_lines.hd_currency_code_tbl(i),
453: p_requisition_line_id => p_lines.requisition_line_id_tbl(i),
454: x_quantity => x_quantity,-- IN/OUT

Line 493: price_override = DECODE(po_autocreate_params.g_document_type, 'RFQ', price_override, DECODE( NVL(x_price, -1), -1, price_override,

489: approved_flag = DECODE(approved_flag, 'N','N', 'R'),
490: last_update_date = p_lines.last_update_date_tbl(i),
491: last_update_login = p_lines.last_update_login_tbl(i),
492: last_updated_by = p_lines.last_updated_by_tbl(i),
493: price_override = DECODE(po_autocreate_params.g_document_type, 'RFQ', price_override, DECODE( NVL(x_price, -1), -1, price_override,
494: -- Use precision in rounding
495: ROUND(x_price, NVL(x_ext_precision,15)))),
496: -- Setting tax_attribute_update_code to update for
497: -- add_to cases.

Line 498: tax_attribute_update_code = NVL(tax_attribute_update_code, NVL2(po_autocreate_params.g_calculate_tax_flag, 'UPDATE', NULL))

494: -- Use precision in rounding
495: ROUND(x_price, NVL(x_ext_precision,15)))),
496: -- Setting tax_attribute_update_code to update for
497: -- add_to cases.
498: tax_attribute_update_code = NVL(tax_attribute_update_code, NVL2(po_autocreate_params.g_calculate_tax_flag, 'UPDATE', NULL))
499: WHERE line_location_id = x_line_location_id
500: AND draft_id = po_autocreate_params.g_draft_id;
501: /*
502: ** OE Callback function for maintaining so_drop_ship_sources table

Line 500: AND draft_id = po_autocreate_params.g_draft_id;

496: -- Setting tax_attribute_update_code to update for
497: -- add_to cases.
498: tax_attribute_update_code = NVL(tax_attribute_update_code, NVL2(po_autocreate_params.g_calculate_tax_flag, 'UPDATE', NULL))
499: WHERE line_location_id = x_line_location_id
500: AND draft_id = po_autocreate_params.g_draft_id;
501: /*
502: ** OE Callback function for maintaining so_drop_ship_sources table
503: */
504: /*

Line 513: IF (po_autocreate_params.g_document_type = 'PO') THEN

509: /*
510: ** Prepare to call pocupdate_close: - call auto close.
511: */
512: -- Need to change - draft? serukull or move code to post proc?
513: IF (po_autocreate_params.g_document_type = 'PO') THEN
514: IF (po_autocreate_params.g_mode = 'ADD') THEN
515: IF (po_autocreate_params.g_document_type = 'PO') THEN
516: IF (po_autocreate_params.g_document_subtype = 'RELEASE') THEN
517: NULL;

Line 514: IF (po_autocreate_params.g_mode = 'ADD') THEN

510: ** Prepare to call pocupdate_close: - call auto close.
511: */
512: -- Need to change - draft? serukull or move code to post proc?
513: IF (po_autocreate_params.g_document_type = 'PO') THEN
514: IF (po_autocreate_params.g_mode = 'ADD') THEN
515: IF (po_autocreate_params.g_document_type = 'PO') THEN
516: IF (po_autocreate_params.g_document_subtype = 'RELEASE') THEN
517: NULL;
518: ELSE

Line 515: IF (po_autocreate_params.g_document_type = 'PO') THEN

511: */
512: -- Need to change - draft? serukull or move code to post proc?
513: IF (po_autocreate_params.g_document_type = 'PO') THEN
514: IF (po_autocreate_params.g_mode = 'ADD') THEN
515: IF (po_autocreate_params.g_document_type = 'PO') THEN
516: IF (po_autocreate_params.g_document_subtype = 'RELEASE') THEN
517: NULL;
518: ELSE
519: x_doctype := 'PO';

Line 516: IF (po_autocreate_params.g_document_subtype = 'RELEASE') THEN

512: -- Need to change - draft? serukull or move code to post proc?
513: IF (po_autocreate_params.g_document_type = 'PO') THEN
514: IF (po_autocreate_params.g_mode = 'ADD') THEN
515: IF (po_autocreate_params.g_document_type = 'PO') THEN
516: IF (po_autocreate_params.g_document_subtype = 'RELEASE') THEN
517: NULL;
518: ELSE
519: x_doctype := 'PO';
520: IF NOT po_actions.close_po(p_lines.po_header_id_tbl(i),

Line 522: po_autocreate_params.g_document_subtype,

518: ELSE
519: x_doctype := 'PO';
520: IF NOT po_actions.close_po(p_lines.po_header_id_tbl(i),
521: x_doctype,
522: po_autocreate_params.g_document_subtype,
523: p_lines.po_line_id_tbl(i),
524: x_line_location_id,
525: 'CLOSE',
526: '',

Line 541: po_autocreate_params.g_document_subtype,

537: p_message => 'Create shipment: Before calling Auto close');
538: END IF;
539: IF NOT po_actions.close_po(p_lines.po_header_id_tbl(i),
540: x_doctype,
541: po_autocreate_params.g_document_subtype,
542: p_lines.po_line_id_tbl(i),
543: x_line_location_id,
544: 'CLOSE',
545: '',

Line 559: IF (po_autocreate_params.g_document_type = 'PO') THEN

555:
556: ELSIF(x_line_location_id IS NULL) THEN
557: l_progress := '160';
558:
559: IF (po_autocreate_params.g_document_type = 'PO') THEN
560: /*
561: ** Prepare to call pocupdate_close: - call manual close
562: ** for the line level.
563: */

Line 564: IF (po_autocreate_params.g_mode = 'ADD') THEN

560: /*
561: ** Prepare to call pocupdate_close: - call manual close
562: ** for the line level.
563: */
564: IF (po_autocreate_params.g_mode = 'ADD') THEN
565: IF (po_autocreate_params.g_document_subtype = 'RELEASE') THEN
566: NULL;
567: ELSE
568: x_doctype := 'PO';

Line 565: IF (po_autocreate_params.g_document_subtype = 'RELEASE') THEN

561: ** Prepare to call pocupdate_close: - call manual close
562: ** for the line level.
563: */
564: IF (po_autocreate_params.g_mode = 'ADD') THEN
565: IF (po_autocreate_params.g_document_subtype = 'RELEASE') THEN
566: NULL;
567: ELSE
568: x_doctype := 'PO';
569: IF NOT po_actions.close_po(p_lines.po_header_id_tbl(i),

Line 570: x_doctype, po_autocreate_params.g_document_subtype,

566: NULL;
567: ELSE
568: x_doctype := 'PO';
569: IF NOT po_actions.close_po(p_lines.po_header_id_tbl(i),
570: x_doctype, po_autocreate_params.g_document_subtype,
571: p_lines.po_line_id_tbl(i),
572: x_line_location_id,
573: 'CLOSE',
574: '',

Line 586: po_autocreate_params.g_document_subtype,

582: END IF;
583: l_progress := '180';
584: IF NOT po_actions.close_po(p_lines.po_header_id_tbl(i),
585: x_doctype,
586: po_autocreate_params.g_document_subtype,
587: p_lines.po_line_id_tbl(i),
588: x_line_location_id,
589: 'CLOSE',
590: '',

Line 619: p_interface_source_code => po_autocreate_params.g_interface_source_code,

615: l_cc_unit_price := p_lines.unit_price_tbl(i);
616: l_cc_base_unit_price := p_lines.base_unit_price_tbl(i);
617: l_cc_amount := p_lines.amount_tbl(i);
618: po_auto_line_process_pvt.do_currency_conversion( p_order_type_lookup_code => 'AMOUNT',
619: p_interface_source_code => po_autocreate_params.g_interface_source_code,
620: p_rate => p_lines.rate_for_req_fields_tbl(i), --
621: p_po_currency_code => p_lines.hd_currency_code_tbl(i),
622: p_requisition_line_id => p_lines.requisition_line_id_tbl(i),
623: x_quantity => x_quantity, -- IN/OUT

Line 653: IF (po_autocreate_params.g_interface_source_code = 'CONSUMPTION_ADVICE') THEN

649: -- 3. PO default (po_startup_values.taxable_flag)
650: l_progress :='250';
651: x_item_org_taxable_flag := p_lines.it_taxable_flag_tbl(i);
652:
653: IF (po_autocreate_params.g_interface_source_code = 'CONSUMPTION_ADVICE') THEN
654: -- tax_code_id from the interface table is used for consumption advice
655: l_progress :='260';
656: IF (NVL(p_lines.tax_code_id_tbl(i), -1) = -1) THEN
657: -- FPI inventory code was populating tax_code_id = -1 in some cases

Line 702: IF po_autocreate_params.g_document_type <> 'RFQ' AND l_promised_date IS NULL AND NVL(l_po_promised_def_prf, 'N') = 'Y' THEN

698: ELSE
699: x_closed_reason := NULL;
700: END IF;
701:
702: IF po_autocreate_params.g_document_type <> 'RFQ' AND l_promised_date IS NULL AND NVL(l_po_promised_def_prf, 'N') = 'Y' THEN
703: l_promised_date := p_lines.NEED_BY_DATE_tbl(i);
704: END IF;
705:
706: l_progress := '320';

Line 832: po_autocreate_params.g_draft_id,

828: clm_pop_duration_uom
829: )
830: VALUES
831: (
832: po_autocreate_params.g_draft_id,
833: x_line_location_id,
834: p_lines.last_update_date_tbl(i),
835: p_lines.last_updated_by_tbl(i),
836: p_lines.po_header_id_tbl(i),

Line 859: DECODE(po_autocreate_params.g_document_type, 'RFQ', '', 'N'),

855: l_promised_date,
856: DECODE(p_lines.consigned_flag_tbl(i),'Y',NULL,p_lines.from_header_id_tbl(i)),
857: DECODE(p_lines.consigned_flag_tbl(i),'Y',NULL,p_lines.from_line_id_tbl(i)),
858: p_lines.note_to_receiver_tbl(i),
859: DECODE(po_autocreate_params.g_document_type, 'RFQ', '', 'N'),
860: '',
861: DECODE(p_lines.consigned_flag_tbl(i),
862: 'Y', 'CLOSED FOR INVOICE',
863: DECODE(po_autocreate_params.g_interface_source_code,

Line 863: DECODE(po_autocreate_params.g_interface_source_code,

859: DECODE(po_autocreate_params.g_document_type, 'RFQ', '', 'N'),
860: '',
861: DECODE(p_lines.consigned_flag_tbl(i),
862: 'Y', 'CLOSED FOR INVOICE',
863: DECODE(po_autocreate_params.g_interface_source_code,
864: 'CONSUMPTION_ADVICE', 'CLOSED FOR RECEIVING' ,
865: DECODE(po_autocreate_params.g_document_type, 'RFQ', '', 'OPEN'))),
866: x_closed_reason,
867: NVL(x_price,p_lines.unit_price_tbl(i)),

Line 865: DECODE(po_autocreate_params.g_document_type, 'RFQ', '', 'OPEN'))),

861: DECODE(p_lines.consigned_flag_tbl(i),
862: 'Y', 'CLOSED FOR INVOICE',
863: DECODE(po_autocreate_params.g_interface_source_code,
864: 'CONSUMPTION_ADVICE', 'CLOSED FOR RECEIVING' ,
865: DECODE(po_autocreate_params.g_document_type, 'RFQ', '', 'OPEN'))),
866: x_closed_reason,
867: NVL(x_price,p_lines.unit_price_tbl(i)),
868: DECODE(po_autocreate_params.g_document_type, 'RFQ', '', 'N'),
869: DECODE(po_autocreate_params.g_document_type,

Line 868: DECODE(po_autocreate_params.g_document_type, 'RFQ', '', 'N'),

864: 'CONSUMPTION_ADVICE', 'CLOSED FOR RECEIVING' ,
865: DECODE(po_autocreate_params.g_document_type, 'RFQ', '', 'OPEN'))),
866: x_closed_reason,
867: NVL(x_price,p_lines.unit_price_tbl(i)),
868: DECODE(po_autocreate_params.g_document_type, 'RFQ', '', 'N'),
869: DECODE(po_autocreate_params.g_document_type,
870: 'RFQ', 'RFQ',
871: DECODE(po_autocreate_params.g_document_subtype,'RELEASE','BLANKET',po_autocreate_params.g_document_subtype)),
872: p_lines.shipment_num_tbl(i),

Line 869: DECODE(po_autocreate_params.g_document_type,

865: DECODE(po_autocreate_params.g_document_type, 'RFQ', '', 'OPEN'))),
866: x_closed_reason,
867: NVL(x_price,p_lines.unit_price_tbl(i)),
868: DECODE(po_autocreate_params.g_document_type, 'RFQ', '', 'N'),
869: DECODE(po_autocreate_params.g_document_type,
870: 'RFQ', 'RFQ',
871: DECODE(po_autocreate_params.g_document_subtype,'RELEASE','BLANKET',po_autocreate_params.g_document_subtype)),
872: p_lines.shipment_num_tbl(i),
873: DECODE(po_autocreate_params.g_interface_source_code,

Line 871: DECODE(po_autocreate_params.g_document_subtype,'RELEASE','BLANKET',po_autocreate_params.g_document_subtype)),

867: NVL(x_price,p_lines.unit_price_tbl(i)),
868: DECODE(po_autocreate_params.g_document_type, 'RFQ', '', 'N'),
869: DECODE(po_autocreate_params.g_document_type,
870: 'RFQ', 'RFQ',
871: DECODE(po_autocreate_params.g_document_subtype,'RELEASE','BLANKET',po_autocreate_params.g_document_subtype)),
872: p_lines.shipment_num_tbl(i),
873: DECODE(po_autocreate_params.g_interface_source_code,
874: 'CONSUMPTION_ADVICE', 'N' ,
875: DECODE(p_lines.consigned_flag_tbl(i),

Line 873: DECODE(po_autocreate_params.g_interface_source_code,

869: DECODE(po_autocreate_params.g_document_type,
870: 'RFQ', 'RFQ',
871: DECODE(po_autocreate_params.g_document_subtype,'RELEASE','BLANKET',po_autocreate_params.g_document_subtype)),
872: p_lines.shipment_num_tbl(i),
873: DECODE(po_autocreate_params.g_interface_source_code,
874: 'CONSUMPTION_ADVICE', 'N' ,
875: DECODE(p_lines.consigned_flag_tbl(i),
876: 'Y', 'N',
877: DECODE(p_lines.drop_ship_flag_tbl(i),

Line 882: DECODE(po_autocreate_params.g_document_type,

878: 'Y', 'N',
879: DECODE(x_order_type_lookup_code,
880: 'FIXED PRICE','N',
881: 'RATE','N',
882: DECODE(po_autocreate_params.g_document_type,
883: 'RFQ', NVL(p_lines.it_inspect_req_flag_tbl(i),
884: NVL(po_autocreate_params.g_sys.inspection_required_flag,'N')),
885: NVL(p_lines.it_inspect_req_flag_tbl(i),
886: NVL(po_autocreate_params.g_vendor_inspect_req_flag,

Line 884: NVL(po_autocreate_params.g_sys.inspection_required_flag,'N')),

880: 'FIXED PRICE','N',
881: 'RATE','N',
882: DECODE(po_autocreate_params.g_document_type,
883: 'RFQ', NVL(p_lines.it_inspect_req_flag_tbl(i),
884: NVL(po_autocreate_params.g_sys.inspection_required_flag,'N')),
885: NVL(p_lines.it_inspect_req_flag_tbl(i),
886: NVL(po_autocreate_params.g_vendor_inspect_req_flag,
887: NVL(po_autocreate_params.g_sys.inspection_required_flag,'N'))))) ) ) ),
888: DECODE(po_autocreate_params.g_interface_source_code,

Line 886: NVL(po_autocreate_params.g_vendor_inspect_req_flag,

882: DECODE(po_autocreate_params.g_document_type,
883: 'RFQ', NVL(p_lines.it_inspect_req_flag_tbl(i),
884: NVL(po_autocreate_params.g_sys.inspection_required_flag,'N')),
885: NVL(p_lines.it_inspect_req_flag_tbl(i),
886: NVL(po_autocreate_params.g_vendor_inspect_req_flag,
887: NVL(po_autocreate_params.g_sys.inspection_required_flag,'N'))))) ) ) ),
888: DECODE(po_autocreate_params.g_interface_source_code,
889: 'CONSUMPTION_ADVICE', 'N' , -- CONSIGNED FPI
890: DECODE(p_lines.consigned_flag_tbl(i),

Line 887: NVL(po_autocreate_params.g_sys.inspection_required_flag,'N'))))) ) ) ),

883: 'RFQ', NVL(p_lines.it_inspect_req_flag_tbl(i),
884: NVL(po_autocreate_params.g_sys.inspection_required_flag,'N')),
885: NVL(p_lines.it_inspect_req_flag_tbl(i),
886: NVL(po_autocreate_params.g_vendor_inspect_req_flag,
887: NVL(po_autocreate_params.g_sys.inspection_required_flag,'N'))))) ) ) ),
888: DECODE(po_autocreate_params.g_interface_source_code,
889: 'CONSUMPTION_ADVICE', 'N' , -- CONSIGNED FPI
890: DECODE(p_lines.consigned_flag_tbl(i),
891: 'Y', 'N',

Line 888: DECODE(po_autocreate_params.g_interface_source_code,

884: NVL(po_autocreate_params.g_sys.inspection_required_flag,'N')),
885: NVL(p_lines.it_inspect_req_flag_tbl(i),
886: NVL(po_autocreate_params.g_vendor_inspect_req_flag,
887: NVL(po_autocreate_params.g_sys.inspection_required_flag,'N'))))) ) ) ),
888: DECODE(po_autocreate_params.g_interface_source_code,
889: 'CONSUMPTION_ADVICE', 'N' , -- CONSIGNED FPI
890: DECODE(p_lines.consigned_flag_tbl(i),
891: 'Y', 'N',
892: DECODE(po_autocreate_params.g_document_type,

Line 892: DECODE(po_autocreate_params.g_document_type,

888: DECODE(po_autocreate_params.g_interface_source_code,
889: 'CONSUMPTION_ADVICE', 'N' , -- CONSIGNED FPI
890: DECODE(p_lines.consigned_flag_tbl(i),
891: 'Y', 'N',
892: DECODE(po_autocreate_params.g_document_type,
893: 'RFQ', NVL(p_lines.receipt_required_flag_tbl(i),
894: NVL(p_lines.receipt_required_flag_tbl(i),
895: NVL(po_autocreate_params.g_sys.receiving_flag,'N'))),
896: NVL(p_lines.it_receipt_req_flag_tbl(i), NVL(p_lines.receipt_required_flag_tbl(i),

Line 895: NVL(po_autocreate_params.g_sys.receiving_flag,'N'))),

891: 'Y', 'N',
892: DECODE(po_autocreate_params.g_document_type,
893: 'RFQ', NVL(p_lines.receipt_required_flag_tbl(i),
894: NVL(p_lines.receipt_required_flag_tbl(i),
895: NVL(po_autocreate_params.g_sys.receiving_flag,'N'))),
896: NVL(p_lines.it_receipt_req_flag_tbl(i), NVL(p_lines.receipt_required_flag_tbl(i),
897: NVL(po_autocreate_params.g_vendor_receipt_req_flag, NVL(po_autocreate_params.g_sys.receiving_flag,'N'))))
898: ) ) ),
899: DECODE(po_autocreate_params.g_document_type, 'RFQ', '', p_lines.rc_days_early_recpt_tbl(i)),

Line 897: NVL(po_autocreate_params.g_vendor_receipt_req_flag, NVL(po_autocreate_params.g_sys.receiving_flag,'N'))))

893: 'RFQ', NVL(p_lines.receipt_required_flag_tbl(i),
894: NVL(p_lines.receipt_required_flag_tbl(i),
895: NVL(po_autocreate_params.g_sys.receiving_flag,'N'))),
896: NVL(p_lines.it_receipt_req_flag_tbl(i), NVL(p_lines.receipt_required_flag_tbl(i),
897: NVL(po_autocreate_params.g_vendor_receipt_req_flag, NVL(po_autocreate_params.g_sys.receiving_flag,'N'))))
898: ) ) ),
899: DECODE(po_autocreate_params.g_document_type, 'RFQ', '', p_lines.rc_days_early_recpt_tbl(i)),
900: DECODE(po_autocreate_params.g_document_type, 'RFQ', '', p_lines.rc_days_late_recpt_tbl(i)),
901: DECODE(po_autocreate_params.g_document_type, 'RFQ', '', p_lines.rc_enforce_shipto_loc_code_tbl(i)),

Line 899: DECODE(po_autocreate_params.g_document_type, 'RFQ', '', p_lines.rc_days_early_recpt_tbl(i)),

895: NVL(po_autocreate_params.g_sys.receiving_flag,'N'))),
896: NVL(p_lines.it_receipt_req_flag_tbl(i), NVL(p_lines.receipt_required_flag_tbl(i),
897: NVL(po_autocreate_params.g_vendor_receipt_req_flag, NVL(po_autocreate_params.g_sys.receiving_flag,'N'))))
898: ) ) ),
899: DECODE(po_autocreate_params.g_document_type, 'RFQ', '', p_lines.rc_days_early_recpt_tbl(i)),
900: DECODE(po_autocreate_params.g_document_type, 'RFQ', '', p_lines.rc_days_late_recpt_tbl(i)),
901: DECODE(po_autocreate_params.g_document_type, 'RFQ', '', p_lines.rc_enforce_shipto_loc_code_tbl(i)),
902: p_lines.dest_organization_id_tbl(i), -- ship to org
903: DECODE(p_lines.consigned_flag_tbl(i),

Line 900: DECODE(po_autocreate_params.g_document_type, 'RFQ', '', p_lines.rc_days_late_recpt_tbl(i)),

896: NVL(p_lines.it_receipt_req_flag_tbl(i), NVL(p_lines.receipt_required_flag_tbl(i),
897: NVL(po_autocreate_params.g_vendor_receipt_req_flag, NVL(po_autocreate_params.g_sys.receiving_flag,'N'))))
898: ) ) ),
899: DECODE(po_autocreate_params.g_document_type, 'RFQ', '', p_lines.rc_days_early_recpt_tbl(i)),
900: DECODE(po_autocreate_params.g_document_type, 'RFQ', '', p_lines.rc_days_late_recpt_tbl(i)),
901: DECODE(po_autocreate_params.g_document_type, 'RFQ', '', p_lines.rc_enforce_shipto_loc_code_tbl(i)),
902: p_lines.dest_organization_id_tbl(i), -- ship to org
903: DECODE(p_lines.consigned_flag_tbl(i),
904: 'Y', 100 , -- CONSIGNED FPI

Line 901: DECODE(po_autocreate_params.g_document_type, 'RFQ', '', p_lines.rc_enforce_shipto_loc_code_tbl(i)),

897: NVL(po_autocreate_params.g_vendor_receipt_req_flag, NVL(po_autocreate_params.g_sys.receiving_flag,'N'))))
898: ) ) ),
899: DECODE(po_autocreate_params.g_document_type, 'RFQ', '', p_lines.rc_days_early_recpt_tbl(i)),
900: DECODE(po_autocreate_params.g_document_type, 'RFQ', '', p_lines.rc_days_late_recpt_tbl(i)),
901: DECODE(po_autocreate_params.g_document_type, 'RFQ', '', p_lines.rc_enforce_shipto_loc_code_tbl(i)),
902: p_lines.dest_organization_id_tbl(i), -- ship to org
903: DECODE(p_lines.consigned_flag_tbl(i),
904: 'Y', 100 , -- CONSIGNED FPI
905: (DECODE(po_autocreate_params.g_document_type,

Line 905: (DECODE(po_autocreate_params.g_document_type,

901: DECODE(po_autocreate_params.g_document_type, 'RFQ', '', p_lines.rc_enforce_shipto_loc_code_tbl(i)),
902: p_lines.dest_organization_id_tbl(i), -- ship to org
903: DECODE(p_lines.consigned_flag_tbl(i),
904: 'Y', 100 , -- CONSIGNED FPI
905: (DECODE(po_autocreate_params.g_document_type,
906: 'RFQ', '',
907: (DECODE(p_lines.hd_pcard_id_tbl(i),
908: NULL, NVL(p_lines.it_invoice_tolerance_tbl(i),
909: po_autocreate_params.g_sys.invoice_close_tolerance), 100))))),

Line 909: po_autocreate_params.g_sys.invoice_close_tolerance), 100))))),

905: (DECODE(po_autocreate_params.g_document_type,
906: 'RFQ', '',
907: (DECODE(p_lines.hd_pcard_id_tbl(i),
908: NULL, NVL(p_lines.it_invoice_tolerance_tbl(i),
909: po_autocreate_params.g_sys.invoice_close_tolerance), 100))))),
910: DECODE(po_autocreate_params.g_interface_source_code,
911: 'CONSUMPTION_ADVICE', 100 , -- CONSIGNED FPI
912: (DECODE(po_autocreate_params.g_document_type,
913: 'RFQ', '', NVL(p_lines.it_rcv_tolerance_tbl(i),

Line 910: DECODE(po_autocreate_params.g_interface_source_code,

906: 'RFQ', '',
907: (DECODE(p_lines.hd_pcard_id_tbl(i),
908: NULL, NVL(p_lines.it_invoice_tolerance_tbl(i),
909: po_autocreate_params.g_sys.invoice_close_tolerance), 100))))),
910: DECODE(po_autocreate_params.g_interface_source_code,
911: 'CONSUMPTION_ADVICE', 100 , -- CONSIGNED FPI
912: (DECODE(po_autocreate_params.g_document_type,
913: 'RFQ', '', NVL(p_lines.it_rcv_tolerance_tbl(i),
914: po_autocreate_params.g_sys.receive_close_tolerance)))),

Line 912: (DECODE(po_autocreate_params.g_document_type,

908: NULL, NVL(p_lines.it_invoice_tolerance_tbl(i),
909: po_autocreate_params.g_sys.invoice_close_tolerance), 100))))),
910: DECODE(po_autocreate_params.g_interface_source_code,
911: 'CONSUMPTION_ADVICE', 100 , -- CONSIGNED FPI
912: (DECODE(po_autocreate_params.g_document_type,
913: 'RFQ', '', NVL(p_lines.it_rcv_tolerance_tbl(i),
914: po_autocreate_params.g_sys.receive_close_tolerance)))),
915: DECODE(p_lines.txn_flow_header_id_tbl(i), NULL, --
916: DECODE(p_lines.consigned_flag_tbl(i),

Line 914: po_autocreate_params.g_sys.receive_close_tolerance)))),

910: DECODE(po_autocreate_params.g_interface_source_code,
911: 'CONSUMPTION_ADVICE', 100 , -- CONSIGNED FPI
912: (DECODE(po_autocreate_params.g_document_type,
913: 'RFQ', '', NVL(p_lines.it_rcv_tolerance_tbl(i),
914: po_autocreate_params.g_sys.receive_close_tolerance)))),
915: DECODE(p_lines.txn_flow_header_id_tbl(i), NULL, --
916: DECODE(p_lines.consigned_flag_tbl(i),
917: 'Y', 'N' , -- CONSIGNED FPI
918: DECODE(po_autocreate_params.g_document_type,

Line 918: DECODE(po_autocreate_params.g_document_type,

914: po_autocreate_params.g_sys.receive_close_tolerance)))),
915: DECODE(p_lines.txn_flow_header_id_tbl(i), NULL, --
916: DECODE(p_lines.consigned_flag_tbl(i),
917: 'Y', 'N' , -- CONSIGNED FPI
918: DECODE(po_autocreate_params.g_document_type,
919: 'RFQ', '',
920: DECODE( p_lines.hd_pcard_id_tbl(i),
921: NULL, DECODE(p_lines.destination_type_code_tbl(i),
922: 'EXPENSE',DECODE(NVL(p_lines.it_receipt_req_flag_tbl(i),

Line 924: NVL(po_autocreate_params.g_vendor_receipt_req_flag,

920: DECODE( p_lines.hd_pcard_id_tbl(i),
921: NULL, DECODE(p_lines.destination_type_code_tbl(i),
922: 'EXPENSE',DECODE(NVL(p_lines.it_receipt_req_flag_tbl(i),
923: NVL(p_lines.receipt_required_flag_tbl(i),
924: NVL(po_autocreate_params.g_vendor_receipt_req_flag,
925: NVL(po_autocreate_params.g_sys.receiving_flag,'N')))),
926: 'N', 'N',
927: DECODE(po_autocreate_params.g_sys.expense_accrual_code,
928: 'PERIOD END', 'N', 'Y')),

Line 925: NVL(po_autocreate_params.g_sys.receiving_flag,'N')))),

921: NULL, DECODE(p_lines.destination_type_code_tbl(i),
922: 'EXPENSE',DECODE(NVL(p_lines.it_receipt_req_flag_tbl(i),
923: NVL(p_lines.receipt_required_flag_tbl(i),
924: NVL(po_autocreate_params.g_vendor_receipt_req_flag,
925: NVL(po_autocreate_params.g_sys.receiving_flag,'N')))),
926: 'N', 'N',
927: DECODE(po_autocreate_params.g_sys.expense_accrual_code,
928: 'PERIOD END', 'N', 'Y')),
929: 'Y'),'N'))), 'Y'), --

Line 927: DECODE(po_autocreate_params.g_sys.expense_accrual_code,

923: NVL(p_lines.receipt_required_flag_tbl(i),
924: NVL(po_autocreate_params.g_vendor_receipt_req_flag,
925: NVL(po_autocreate_params.g_sys.receiving_flag,'N')))),
926: 'N', 'N',
927: DECODE(po_autocreate_params.g_sys.expense_accrual_code,
928: 'PERIOD END', 'N', 'Y')),
929: 'Y'),'N'))), 'Y'), --
930: DECODE(po_autocreate_params.g_document_type, 'RFQ','', p_lines.rc_subst_receipt_flag_tbl(i)),
931: DECODE(po_autocreate_params.g_document_type, 'RFQ', '', p_lines.rc_receiving_routing_id_tbl(i)),

Line 930: DECODE(po_autocreate_params.g_document_type, 'RFQ','', p_lines.rc_subst_receipt_flag_tbl(i)),

926: 'N', 'N',
927: DECODE(po_autocreate_params.g_sys.expense_accrual_code,
928: 'PERIOD END', 'N', 'Y')),
929: 'Y'),'N'))), 'Y'), --
930: DECODE(po_autocreate_params.g_document_type, 'RFQ','', p_lines.rc_subst_receipt_flag_tbl(i)),
931: DECODE(po_autocreate_params.g_document_type, 'RFQ', '', p_lines.rc_receiving_routing_id_tbl(i)),
932: p_lines.rc_qty_rcv_tolerance_tbl(i),
933: p_lines.rc_qty_rcv_exception_code_tbl(i),
934: DECODE(po_autocreate_params.g_document_type, 'RFQ', '', p_lines.rc_receipt_days_excep_code_tbl(i)),

Line 931: DECODE(po_autocreate_params.g_document_type, 'RFQ', '', p_lines.rc_receiving_routing_id_tbl(i)),

927: DECODE(po_autocreate_params.g_sys.expense_accrual_code,
928: 'PERIOD END', 'N', 'Y')),
929: 'Y'),'N'))), 'Y'), --
930: DECODE(po_autocreate_params.g_document_type, 'RFQ','', p_lines.rc_subst_receipt_flag_tbl(i)),
931: DECODE(po_autocreate_params.g_document_type, 'RFQ', '', p_lines.rc_receiving_routing_id_tbl(i)),
932: p_lines.rc_qty_rcv_tolerance_tbl(i),
933: p_lines.rc_qty_rcv_exception_code_tbl(i),
934: DECODE(po_autocreate_params.g_document_type, 'RFQ', '', p_lines.rc_receipt_days_excep_code_tbl(i)),
935: '',

Line 934: DECODE(po_autocreate_params.g_document_type, 'RFQ', '', p_lines.rc_receipt_days_excep_code_tbl(i)),

930: DECODE(po_autocreate_params.g_document_type, 'RFQ','', p_lines.rc_subst_receipt_flag_tbl(i)),
931: DECODE(po_autocreate_params.g_document_type, 'RFQ', '', p_lines.rc_receiving_routing_id_tbl(i)),
932: p_lines.rc_qty_rcv_tolerance_tbl(i),
933: p_lines.rc_qty_rcv_exception_code_tbl(i),
934: DECODE(po_autocreate_params.g_document_type, 'RFQ', '', p_lines.rc_receipt_days_excep_code_tbl(i)),
935: '',
936: '',
937: '',
938: '',

Line 940: DECODE(po_autocreate_params.g_document_type,'RFQ',to_date(NULL),l_promised_date+p_lines.rc_days_late_recpt_tbl(i)),

936: '',
937: '',
938: '',
939: NVL(x_po_uom,p_lines.unit_of_measure_tbl(i)),
940: DECODE(po_autocreate_params.g_document_type,'RFQ',to_date(NULL),l_promised_date+p_lines.rc_days_late_recpt_tbl(i)),
941: DECODE(po_autocreate_params.g_interface_source_code,
942: 'CONSUMPTION_ADVICE', 'P' , -- CONSIGNED FPI
943: DECODE(p_lines.consigned_flag_tbl(i),
944: 'Y', 'P',

Line 941: DECODE(po_autocreate_params.g_interface_source_code,

937: '',
938: '',
939: NVL(x_po_uom,p_lines.unit_of_measure_tbl(i)),
940: DECODE(po_autocreate_params.g_document_type,'RFQ',to_date(NULL),l_promised_date+p_lines.rc_days_late_recpt_tbl(i)),
941: DECODE(po_autocreate_params.g_interface_source_code,
942: 'CONSUMPTION_ADVICE', 'P' , -- CONSIGNED FPI
943: DECODE(p_lines.consigned_flag_tbl(i),
944: 'Y', 'P',
945: DECODE(po_autocreate_params.g_document_type,

Line 945: DECODE(po_autocreate_params.g_document_type,

941: DECODE(po_autocreate_params.g_interface_source_code,
942: 'CONSUMPTION_ADVICE', 'P' , -- CONSIGNED FPI
943: DECODE(p_lines.consigned_flag_tbl(i),
944: 'Y', 'P',
945: DECODE(po_autocreate_params.g_document_type,
946: 'RFQ', '',
947: po_autocreate_params.g_vendor_invoice_match_option) ) ),
948: x_country_of_origin_code,
949: x_secondary_unit_of_measure,

Line 947: po_autocreate_params.g_vendor_invoice_match_option) ) ),

943: DECODE(p_lines.consigned_flag_tbl(i),
944: 'Y', 'P',
945: DECODE(po_autocreate_params.g_document_type,
946: 'RFQ', '',
947: po_autocreate_params.g_vendor_invoice_match_option) ) ),
948: x_country_of_origin_code,
949: x_secondary_unit_of_measure,
950: x_secondary_quantity,
951: p_lines.preferred_grade_tbl(i),

Line 960: po_autocreate_params.g_purchasing_ou_id --

956: p_lines.vmi_flag_tbl(i) , -- VMI FPH
957: p_lines.drop_ship_flag_tbl(i), --
958: p_lines.consigned_flag_tbl(i), -- CONSIGNED FPI
959: p_lines.txn_flow_header_id_tbl(i), --
960: po_autocreate_params.g_purchasing_ou_id --
961: ,
962: DECODE(po_autocreate_params.g_interface_source_code,'CONSUMPTION_ADVICE', sysdate,NULL) --- Closed_for_receiving_date
963: ,
964: DECODE(p_lines.consigned_flag_tbl(i), 'Y', sysdate,NULL ) --- Closed_for_invoice_date

Line 962: DECODE(po_autocreate_params.g_interface_source_code,'CONSUMPTION_ADVICE', sysdate,NULL) --- Closed_for_receiving_date

958: p_lines.consigned_flag_tbl(i), -- CONSIGNED FPI
959: p_lines.txn_flow_header_id_tbl(i), --
960: po_autocreate_params.g_purchasing_ou_id --
961: ,
962: DECODE(po_autocreate_params.g_interface_source_code,'CONSUMPTION_ADVICE', sysdate,NULL) --- Closed_for_receiving_date
963: ,
964: DECODE(p_lines.consigned_flag_tbl(i), 'Y', sysdate,NULL ) --- Closed_for_invoice_date
965: ,
966: x_order_type_lookup_code ,

Line 970: nvl2(po_autocreate_params.g_calculate_tax_flag, 'CREATE', NULL) --

966: x_order_type_lookup_code ,
967: l_matching_basis ,
968: l_outsourced_assembly --
969: ,
970: nvl2(po_autocreate_params.g_calculate_tax_flag, 'CREATE', NULL) --
971: ,
972: p_lines.clm_period_perf_end_date_tbl(i) ,
973: p_lines.clm_period_perf_start_date_tbl(i),
974: --CLM Phase4 Changes

Line 1182: AND draft_id = po_autocreate_params.g_draft_id;

1178: l_line_amount ,
1179: l_line_purchase_basis
1180: FROM po_lines_draft_all pol
1181: WHERE pol.po_line_id = p_lines.po_line_id_tbl(i)
1182: AND draft_id = po_autocreate_params.g_draft_id;
1183:
1184: d_progress := 30;
1185: l_isFinancing := PO_COMPLEX_WORK_PVT.is_financing_po( p_po_header_id => l_po_header_id,
1186: p_draft_id => po_autocreate_params.g_draft_id );

Line 1186: p_draft_id => po_autocreate_params.g_draft_id );

1182: AND draft_id = po_autocreate_params.g_draft_id;
1183:
1184: d_progress := 30;
1185: l_isFinancing := PO_COMPLEX_WORK_PVT.is_financing_po( p_po_header_id => l_po_header_id,
1186: p_draft_id => po_autocreate_params.g_draft_id );
1187:
1188: IF (PO_LOG.d_stmt) THEN
1189: PO_LOG.stmt(d_module, d_progress, 'l_isFinancing', l_isFinancing);
1190: END IF;

Line 1203: p_draft_id => po_autocreate_params.g_draft_id ,

1199: -- in sourcing for this line. We need to populate data for the default
1200: -- payitem in the interface tables.
1201:
1202: PO_COMPLEX_WORK_PVT.get_default_payitem_info( p_po_header_id => l_po_header_id ,
1203: p_draft_id => po_autocreate_params.g_draft_id ,
1204: p_po_line_id => p_lines.po_line_id_tbl(i) ,
1205: p_line_value_basis => l_line_value_basis ,
1206: p_line_matching_basis => l_line_matching_basis ,
1207: p_line_qty => ROUND(l_line_quantity, 15) ,

Line 1399: NVL(prl.org_id, po_autocreate_params.g_hdr_requesting_ou_id)

1395: d_progress := 130;
1396: SELECT prl.tax_code_id ,
1397: NVL(prl.tax_user_override_flag,'N') ,
1398: NVL(prl.tax_status_indicator,'SYSTEM') ,
1399: NVL(prl.org_id, po_autocreate_params.g_hdr_requesting_ou_id)
1400: INTO l_req_tax_code_id ,
1401: l_req_tax_user_override_flag ,
1402: l_req_tax_status_indicator ,
1403: g_line_requesting_ou_id

Line 1411: g_line_requesting_ou_id := po_autocreate_params.g_hdr_requesting_ou_id;

1407: l_tax_code_id := l_req_tax_code_id;
1408: ELSE
1409: d_progress := 140;
1410: l_req_tax_status_indicator := 'SYSTEM';
1411: g_line_requesting_ou_id := po_autocreate_params.g_hdr_requesting_ou_id;
1412: END IF; -- if interface.requisition_line_id IS NOT NULL
1413:
1414: d_progress := 150;
1415: -- now iterate over the rows in the interface table

Line 1561: po_autocreate_params.g_draft_id ,

1557: clm_pop_duration_uom
1558: )
1559: VALUES
1560: (
1561: po_autocreate_params.g_draft_id ,
1562: PO_LINE_LOCATIONS_S.nextval ,
1563: p_lines.last_update_date_tbl(i) ,
1564: p_lines.last_updated_by_tbl(i) ,
1565: p_lines.po_header_id_tbl(i) ,

Line 1626: po_autocreate_params.g_vendor_receipt_req_flag,

1622: ,
1623: DECODE(line_location_rec.value_basis, -- receipt_required_flag
1624: 'FIXED_PRICE', 'N',
1625: COALESCE(p_lines.it_receipt_req_flag_tbl(i),
1626: po_autocreate_params.g_vendor_receipt_req_flag,
1627: po_autocreate_params.g_sys.receiving_flag, 'N')) ,
1628: payitem_rcv_ctl_rec.days_early_receipt_allowed ,
1629: payitem_rcv_ctl_rec.days_late_receipt_allowed ,
1630: payitem_rcv_ctl_rec.enforce_ship_to_location_code ,

Line 1627: po_autocreate_params.g_sys.receiving_flag, 'N')) ,

1623: DECODE(line_location_rec.value_basis, -- receipt_required_flag
1624: 'FIXED_PRICE', 'N',
1625: COALESCE(p_lines.it_receipt_req_flag_tbl(i),
1626: po_autocreate_params.g_vendor_receipt_req_flag,
1627: po_autocreate_params.g_sys.receiving_flag, 'N')) ,
1628: payitem_rcv_ctl_rec.days_early_receipt_allowed ,
1629: payitem_rcv_ctl_rec.days_late_receipt_allowed ,
1630: payitem_rcv_ctl_rec.enforce_ship_to_location_code ,
1631: line_location_rec.ship_to_organization_id ,

Line 1632: COALESCE(p_lines.it_invoice_tolerance_tbl(i), po_autocreate_params.g_sys.invoice_close_tolerance, 100) ,

1628: payitem_rcv_ctl_rec.days_early_receipt_allowed ,
1629: payitem_rcv_ctl_rec.days_late_receipt_allowed ,
1630: payitem_rcv_ctl_rec.enforce_ship_to_location_code ,
1631: line_location_rec.ship_to_organization_id ,
1632: COALESCE(p_lines.it_invoice_tolerance_tbl(i), po_autocreate_params.g_sys.invoice_close_tolerance, 100) ,
1633: DECODE(line_location_rec.payment_type,
1634: 'MILESTONE', 0, COALESCE(p_lines.it_rcv_tolerance_tbl(i), po_autocreate_params.g_sys.receive_close_tolerance, 100)) ,
1635: DECODE(line_location_rec.shipment_type, -- acrrue_on_receipt_flag
1636: 'PREPAYMENT', 'N',

Line 1634: 'MILESTONE', 0, COALESCE(p_lines.it_rcv_tolerance_tbl(i), po_autocreate_params.g_sys.receive_close_tolerance, 100)) ,

1630: payitem_rcv_ctl_rec.enforce_ship_to_location_code ,
1631: line_location_rec.ship_to_organization_id ,
1632: COALESCE(p_lines.it_invoice_tolerance_tbl(i), po_autocreate_params.g_sys.invoice_close_tolerance, 100) ,
1633: DECODE(line_location_rec.payment_type,
1634: 'MILESTONE', 0, COALESCE(p_lines.it_rcv_tolerance_tbl(i), po_autocreate_params.g_sys.receive_close_tolerance, 100)) ,
1635: DECODE(line_location_rec.shipment_type, -- acrrue_on_receipt_flag
1636: 'PREPAYMENT', 'N',
1637: DECODE(COALESCE(p_lines.it_receipt_req_flag_tbl(i),
1638: p_lines.receipt_required_flag_tbl(i),

Line 1639: po_autocreate_params.g_vendor_receipt_req_flag,

1635: DECODE(line_location_rec.shipment_type, -- acrrue_on_receipt_flag
1636: 'PREPAYMENT', 'N',
1637: DECODE(COALESCE(p_lines.it_receipt_req_flag_tbl(i),
1638: p_lines.receipt_required_flag_tbl(i),
1639: po_autocreate_params.g_vendor_receipt_req_flag,
1640: po_autocreate_params.g_sys.receiving_flag, 'N'),
1641: 'N', 'N',
1642: DECODE(po_autocreate_params.g_sys.expense_accrual_code,
1643: 'PERIOD END', 'N', 'Y'))) ,

Line 1640: po_autocreate_params.g_sys.receiving_flag, 'N'),

1636: 'PREPAYMENT', 'N',
1637: DECODE(COALESCE(p_lines.it_receipt_req_flag_tbl(i),
1638: p_lines.receipt_required_flag_tbl(i),
1639: po_autocreate_params.g_vendor_receipt_req_flag,
1640: po_autocreate_params.g_sys.receiving_flag, 'N'),
1641: 'N', 'N',
1642: DECODE(po_autocreate_params.g_sys.expense_accrual_code,
1643: 'PERIOD END', 'N', 'Y'))) ,
1644: payitem_rcv_ctl_rec.allow_substitute_receipts_flag ,

Line 1642: DECODE(po_autocreate_params.g_sys.expense_accrual_code,

1638: p_lines.receipt_required_flag_tbl(i),
1639: po_autocreate_params.g_vendor_receipt_req_flag,
1640: po_autocreate_params.g_sys.receiving_flag, 'N'),
1641: 'N', 'N',
1642: DECODE(po_autocreate_params.g_sys.expense_accrual_code,
1643: 'PERIOD END', 'N', 'Y'))) ,
1644: payitem_rcv_ctl_rec.allow_substitute_receipts_flag ,
1645: payitem_rcv_ctl_rec.receiving_routing_id ,
1646: payitem_rcv_ctl_rec.qty_rcv_tolerance ,

Line 1661: po_autocreate_params.g_vendor_invoice_match_option ,

1657: line_location_rec.unit_of_measure -- unit_meas_lookup_code
1658: ,
1659: line_location_rec.promised_date -- last_accept_date
1660: + payitem_rcv_ctl_rec.days_late_receipt_allowed ,
1661: po_autocreate_params.g_vendor_invoice_match_option ,
1662: l_country_of_origin_code ,
1663: NULL -- vmi_flag
1664: ,
1665: NULL -- drop_ship_flag

Line 1670: po_autocreate_params.g_purchasing_ou_id ,

1666: ,
1667: NULL -- consigned_flag
1668: ,
1669: p_lines.txn_flow_header_id_tbl(i) ,
1670: po_autocreate_params.g_purchasing_ou_id ,
1671: NULL -- closed_for_receiving_date
1672: ,
1673: NULL -- closed_for_invoice_date
1674: ,

Line 1683: nvl2(po_autocreate_params.g_calculate_tax_flag, 'CREATE', NULL) --

1679: line_location_rec.work_approver_id ,
1680: line_location_rec.bid_payment_id ,
1681: 2 -- outsourced_assembly
1682: ,
1683: nvl2(po_autocreate_params.g_calculate_tax_flag, 'CREATE', NULL) --
1684: ,
1685: p_lines.clm_period_perf_end_date_tbl(i) ,
1686: p_lines.clm_period_perf_start_date_tbl(i),
1687: --CLM Phase4 Changes

Line 1717: IF (PO_AUTOCREATE_PARAMS.g_document_subtype IN ('STANDARD','PLANNED','BLANKET')) THEN

1713: SELECT PO_LINE_LOCATIONS_S.currval
1714: INTO x_line_location_id
1715: FROM sys.dual;
1716:
1717: IF (PO_AUTOCREATE_PARAMS.g_document_subtype IN ('STANDARD','PLANNED','BLANKET')) THEN
1718: d_progress := 250;
1719: PO_AUTOCREATE_PVT.calculate_local(PO_AUTOCREATE_PARAMS.g_document_subtype, 'SHIPMENT', x_line_location_id);
1720: END IF;
1721:

Line 1719: PO_AUTOCREATE_PVT.calculate_local(PO_AUTOCREATE_PARAMS.g_document_subtype, 'SHIPMENT', x_line_location_id);

1715: FROM sys.dual;
1716:
1717: IF (PO_AUTOCREATE_PARAMS.g_document_subtype IN ('STANDARD','PLANNED','BLANKET')) THEN
1718: d_progress := 250;
1719: PO_AUTOCREATE_PVT.calculate_local(PO_AUTOCREATE_PARAMS.g_document_subtype, 'SHIPMENT', x_line_location_id);
1720: END IF;
1721:
1722: d_progress := 260;
1723:

Line 1847: AND po_autocreate_params.g_sys.sob_id IS NOT NULL) THEN

1843: -- Check that price break ship_to_organization_id and ship_to_location_id match
1844: -- (if both are provided)
1845: IF (p_lines.line_ship_to_org_id_tbl(i) IS NOT NULL
1846: AND p_lines.line_ship_to_loc_id_tbl(i) IS NOT NULL
1847: AND po_autocreate_params.g_sys.sob_id IS NOT NULL) THEN
1848: l_progress := '050';
1849:
1850: po_locations_s.get_loc_org(p_lines.line_ship_to_loc_id_tbl(i),
1851: po_autocreate_params.g_sys.sob_id,

Line 1851: po_autocreate_params.g_sys.sob_id,

1847: AND po_autocreate_params.g_sys.sob_id IS NOT NULL) THEN
1848: l_progress := '050';
1849:
1850: po_locations_s.get_loc_org(p_lines.line_ship_to_loc_id_tbl(i),
1851: po_autocreate_params.g_sys.sob_id,
1852: l_ship_org_id_line,
1853: l_ship_org_code,
1854: l_ship_org_name);
1855: -- if the orgs do match raise an error

Line 1859: po_autocreate_params.g_sourcing_errorcode := 3;

1855: -- if the orgs do match raise an error
1856:
1857: IF (l_ship_org_id_line <> p_lines.line_ship_to_org_id_tbl(i)) THEN
1858: --Create an error code 4 for price break ship_to_loc and ship_to_org do not match
1859: po_autocreate_params.g_sourcing_errorcode := 3;
1860: END IF;
1861: END IF;
1862:
1863: /*check ship_loc and ship_org */

Line 2030: po_autocreate_params.g_draft_id,

2026: clm_pop_duration_uom
2027: )
2028: VALUES
2029: (
2030: po_autocreate_params.g_draft_id,
2031: x_Line_Location_Id,
2032: p_lines.last_update_date_tbl(i),
2033: p_lines.last_updated_by_tbl(i),
2034: p_lines.Po_Header_Id_tbl(i),

Line 2048: po_autocreate_params.g_vendor_Ship_Via_Lookup_Code,

2044: 0, --Quantity_Cancelled,
2045: p_lines.unit_of_measure_tbl(i), --unit of measure
2046: NULL, -- release_id
2047: p_lines.line_Ship_To_Loc_Id_tbl(i),
2048: po_autocreate_params.g_vendor_Ship_Via_Lookup_Code,
2049: NULL, --Need_By_Date
2050: NULL, --Promised_Date
2051: NULL, --Last_Accept_Date
2052: p_lines.unit_price_tbl(i), --Price_override

Line 2276: po_line_id = Decode(PO_AUTOCREATE_PARAMS.g_interface_source_code,'SOURCING',

2272: */
2273: UPDATE po_requisition_lines_all l
2274: SET
2275: -- po_line_id = p_lines.po_line_id_tbl(i)),
2276: po_line_id = Decode(PO_AUTOCREATE_PARAMS.g_interface_source_code,'SOURCING',
2277: Decode(Nvl(po_line_id, -999),-999, p_lines.po_line_id_tbl(i),-1), p_lines.po_line_id_tbl(i)),
2278: --line_location_id = p_lines.line_loc_id_tbl(i),
2279: line_location_id = Decode(PO_AUTOCREATE_PARAMS.g_interface_source_code,'SOURCING',
2280: Decode(Nvl(line_location_id, -999),-999, p_lines.line_loc_id_tbl(i),-1), p_lines.line_loc_id_tbl(i)),

Line 2279: line_location_id = Decode(PO_AUTOCREATE_PARAMS.g_interface_source_code,'SOURCING',

2275: -- po_line_id = p_lines.po_line_id_tbl(i)),
2276: po_line_id = Decode(PO_AUTOCREATE_PARAMS.g_interface_source_code,'SOURCING',
2277: Decode(Nvl(po_line_id, -999),-999, p_lines.po_line_id_tbl(i),-1), p_lines.po_line_id_tbl(i)),
2278: --line_location_id = p_lines.line_loc_id_tbl(i),
2279: line_location_id = Decode(PO_AUTOCREATE_PARAMS.g_interface_source_code,'SOURCING',
2280: Decode(Nvl(line_location_id, -999),-999, p_lines.line_loc_id_tbl(i),-1), p_lines.line_loc_id_tbl(i)),
2281: -- Bug: 13948625, update linked_po_count, should be equal to number of req dist if autocreated.
2282: -- Updating count to 1 for Info lines(Funded and NonFunded) and Option lines.
2283: -- Updating count to number of distributions for Priced lines

Line 2303: IF (po_autocreate_params.g_is_clm_po ='Y' AND po_autocreate_params.g_process_code = 'ADD_FUNDS') THEN

2299: PO_DEBUG.debug_stmt(p_log_head => g_log_head||l_api_name, p_token => l_progress,
2300: p_message => 'Upadte the req lines with '||p_lines.line_loc_id_tbl(i));
2301: END IF;
2302: -- added for Linking requisition to modification project
2303: IF (po_autocreate_params.g_is_clm_po ='Y' AND po_autocreate_params.g_process_code = 'ADD_FUNDS') THEN
2304:
2305: l_progress := '020';
2306: UPDATE po_requisition_lines_all
2307: SET po_draft_id = po_autocreate_params.g_draft_id,

Line 2307: SET po_draft_id = po_autocreate_params.g_draft_id,

2303: IF (po_autocreate_params.g_is_clm_po ='Y' AND po_autocreate_params.g_process_code = 'ADD_FUNDS') THEN
2304:
2305: l_progress := '020';
2306: UPDATE po_requisition_lines_all
2307: SET po_draft_id = po_autocreate_params.g_draft_id,
2308: LINKED_TO_FUND = 'Y'
2309: WHERE requisition_line_id = p_lines.requisition_line_id_tbl(i);
2310:
2311: IF g_debug_stmt THEN --< Bug 3210331: use proper debugging >