375: /* Get Vendor Information. May be required for
376: ** defaulting values if the vendor site info
377: ** is invalid */
378:
379: po_vendors_sv.get_vendor_info (X_vendor_id ,
380: X_ship_to_location_id ,
381: X_bill_to_location_id ,
382: X_ship_via_lookup_code ,
383: X_fob_lookup_code ,
422: /* Validating FOB lookup code from vendor site if available.
423: ** If not available or vendor site fob is inactive, validate the vendor fob */
424:
425: if X_vs_fob_lookup_code is not null then
426: po_vendors_sv.val_fob(X_vs_fob_lookup_code , X_res_fob);
427: end if;
428: if ((X_res_fob is null) and (X_fob_lookup_code is not null)) then
429: po_vendors_sv.val_fob(X_fob_lookup_code , X_res_fob);
430: end if;
425: if X_vs_fob_lookup_code is not null then
426: po_vendors_sv.val_fob(X_vs_fob_lookup_code , X_res_fob);
427: end if;
428: if ((X_res_fob is null) and (X_fob_lookup_code is not null)) then
429: po_vendors_sv.val_fob(X_fob_lookup_code , X_res_fob);
430: end if;
431:
432: /* Validating Freight Terms lookup code from vendor site if available.
433: ** If not available or vendor site Freight Terms is inactive,
433: ** If not available or vendor site Freight Terms is inactive,
434: ** validate the vendor Freight Terms */
435:
436: if X_vs_freight_terms_lookup_code is not null then
437: po_vendors_sv.val_freight_terms( X_vs_freight_terms_lookup_code,
438: X_res_freight_terms);
439: end if;
440:
441: if ((X_res_freight_terms is null) and
439: end if;
440:
441: if ((X_res_freight_terms is null) and
442: (X_freight_terms_lookup_code is not null)) then
443: po_vendors_sv.val_freight_terms( X_freight_terms_lookup_code,
444: X_res_freight_terms);
445: end if;
446:
447: /* Validating Ship Via lookup code from vendor site if available.
448: ** If not available or vendor site Ship Via is inactive,
449: ** validate the vendor Ship Via */
450:
451: if X_vs_ship_via_lookup_code is not null then
452: po_vendors_sv.val_freight_carrier(X_vs_ship_via_lookup_code,
453: X_org_id,
454: X_res_ship_via);
455: end if;
456: if ((X_res_ship_via is null) and
454: X_res_ship_via);
455: end if;
456: if ((X_res_ship_via is null) and
457: (X_ship_via_lookup_code is not null)) then
458: po_vendors_sv.val_freight_carrier(X_ship_via_lookup_code,
459: X_org_id,
460: X_res_ship_via);
461: end if;
462:
474: end if;
475:
476:
477: /* Validating shipping control from vendor site */
478: PO_VENDORS_SV.val_shipping_control
479: (
480: p_temp_shipping_control => l_vs_shipping_control,
481: x_res_shipping_control => x_res_shipping_control
482: ); --
482: ); --
483:
484: /* Obtain displayed values for the valid ids */
485:
486: po_vendors_sv.get_displayed_values(X_res_fob,
487: X_res_freight_terms,
488: X_res_ship_via,
489: X_res_terms_id,
490: X_fob_dsp,
509: ** If it is invalid/null, use the vendor info to get it.
510: ** Also bring in the appropriate atrributes */
511:
512: if X_vs_ship_to_location_id is not null then
513: po_vendors_sv.get_ship_to_loc_attributes (X_vs_ship_to_location_id,
514: X_ship_to_loc_dsp,
515: X_ship_org_code, X_ship_org_name ,
516: X_ship_org_id, X_set_of_books_id );
517: X_res_ship_to_loc_id := X_vs_ship_to_location_id;
518: end if;
519:
520: if (X_ship_to_loc_dsp is null)
521: and (X_ship_to_location_id is not null) then
522: po_vendors_sv.get_ship_to_loc_attributes ( X_ship_to_location_id ,
523: X_ship_to_loc_dsp ,
524: X_ship_org_code , X_ship_org_name ,
525: X_ship_org_id ,X_set_of_books_id );
526: X_res_ship_to_loc_id := X_ship_to_location_id;
531: ** Also bring in the appropriate atrributes */
532:
533:
534: if X_vs_bill_to_location_id is not null then
535: po_vendors_sv.get_bill_to_loc_attributes ( X_vs_bill_to_location_id ,
536: X_bill_to_loc_dsp );
537: X_res_bill_to_loc_id := X_vs_bill_to_location_id;
538: end if;
539:
539:
540:
541: if (X_bill_to_loc_dsp is null)
542: and (X_bill_to_location_id is not null) then
543: po_vendors_sv.get_bill_to_loc_attributes ( X_bill_to_location_id ,
544: X_bill_to_loc_dsp);
545: X_res_bill_to_loc_id := X_bill_to_location_id;
546: end if;
547:
1394: into l_tp_header_id, l_edi_flag
1395: from
1396: (select pvs.tp_header_id, ph.authorization_status, ph.type_lookup_code
1397: from po_vendor_sites_all pvs,
1398: po_vendors pv,
1399: po_headers_all ph
1400: where ph.vendor_id = pv.vendor_id (+)
1401: and ph.vendor_site_id = pvs.vendor_site_id (+)
1402: and ph.vendor_id = pvs.vendor_id (+)
1414: into l_tp_header_id, l_edi_flag
1415: from
1416: (select pvs.tp_header_id, pr.authorization_status
1417: from po_vendor_sites_all pvs,
1418: po_vendors pv,
1419: po_headers_all ph,
1420: po_releases_all pr
1421: where ph.vendor_id = pv.vendor_id (+)
1422: and ph.vendor_site_id = pvs.vendor_site_id (+)