38: --
39:
40: PROCEDURE Insert_AWT_Default(
41: P_Invoice_Id IN ap_invoices_all.invoice_id%TYPE,
42: P_Inv_Dist_Id IN ap_invoice_distributions_all.invoice_distribution_id%TYPE,
43: P_Supp_Awt_Code_Id IN jl_zz_ap_sup_awt_cd.supp_awt_code_id%TYPE,
44: p_calling_sequence IN VARCHAR2,
45: P_Org_Id IN jl_zz_ap_sup_awt_cd.org_id%TYPE) IS
46:
208: The Following function return the vendor_id for the Distribution Line.
209: If tax_payerid is not null find the vendor_id for this tax_payerid Else
210: return the vendor id from the invoice.
211: ------------------------------------------------------------------------------------------------*/
212: FUNCTION Get_Vendor_Id ( P_Tax_Payer_Id ap_invoice_distributions_all.global_attribute2%TYPE
213: , P_Invoice_Id ap_invoices_all.invoice_id%TYPE
214: )
215: return number is
216: --------------------------------------------------------------------
482: -- R12 KI
483: --
484: PROCEDURE Del_Wh_Def
485: (
486: p_inv_dist_id ap_invoice_distributions_all.invoice_distribution_id%TYPE
487: ) IS
488: Begin
489: /*
490: DELETE JL_ZZ_AP_INV_DIS_WH
792:
793: PROCEDURE Supp_Wh_Def
794: ( P_Invoice_Id ap_invoices_all.invoice_id%TYPE
795: , P_Inv_Line_Num ap_invoice_lines_all.line_number%TYPE
796: , P_Inv_Dist_Id ap_invoice_distributions_all.invoice_distribution_id%TYPE
797: , P_Calling_Module VARCHAR2
798: , P_Parent_Dist_ID IN Number Default null
799: ) IS
800:
816: AND invoice_distribution_id = p_related_dist_id;
817:
818: -- The following variables are used to get the information from the invoice
819: -- ditribution lines.
820: v_tax_payer_id ap_invoice_distributions_all.global_attribute2%TYPE;
821: v_ship_to_loc ap_invoice_distributions_all.global_attribute3%TYPE;
822: v_line_type ap_invoice_distributions_all.line_type_lookup_code %TYPE;
823: v_last_update_login number := FND_GLOBAL.Login_Id;
824: v_last_update_by number := FND_GLOBAL.User_ID;
817:
818: -- The following variables are used to get the information from the invoice
819: -- ditribution lines.
820: v_tax_payer_id ap_invoice_distributions_all.global_attribute2%TYPE;
821: v_ship_to_loc ap_invoice_distributions_all.global_attribute3%TYPE;
822: v_line_type ap_invoice_distributions_all.line_type_lookup_code %TYPE;
823: v_last_update_login number := FND_GLOBAL.Login_Id;
824: v_last_update_by number := FND_GLOBAL.User_ID;
825: DistWithholdings Number := 0;
818: -- The following variables are used to get the information from the invoice
819: -- ditribution lines.
820: v_tax_payer_id ap_invoice_distributions_all.global_attribute2%TYPE;
821: v_ship_to_loc ap_invoice_distributions_all.global_attribute3%TYPE;
822: v_line_type ap_invoice_distributions_all.line_type_lookup_code %TYPE;
823: v_last_update_login number := FND_GLOBAL.Login_Id;
824: v_last_update_by number := FND_GLOBAL.User_ID;
825: DistWithholdings Number := 0;
826: -- Variable added for bug 6869263
823: v_last_update_login number := FND_GLOBAL.Login_Id;
824: v_last_update_by number := FND_GLOBAL.User_ID;
825: DistWithholdings Number := 0;
826: -- Variable added for bug 6869263
827: v_related_dist_id ap_invoice_distributions_all.related_id%TYPE;
828:
829: Begin
830: IF (G_LEVEL_PROCEDURE >= G_CURRENT_RUNTIME_LEVEL ) THEN
831: FND_LOG.STRING(G_LEVEL_PROCEDURE, 'JL.plsql.JL_ZZ_AP_AWT_DEFAULT_PKG.Supp_Wh_Def','Start PROCEDURE Supp_Wh_Def');
1305: FROM ap_invoice_distributions
1306: WHERE invoice_id = P_Invoice_ID;
1307: -- The following variables are used to get the information from the invoice
1308: -- ditribution lines.
1309: v_tax_payer_id ap_invoice_distributions_all.global_attribute2%TYPE;
1310: v_ship_to_loc ap_invoice_distributions_all.global_attribute3%TYPE;
1311: v_line_type ap_invoice_distributions_all. line_type_lookup_code%TYPE;
1312:
1313: Begin
1306: WHERE invoice_id = P_Invoice_ID;
1307: -- The following variables are used to get the information from the invoice
1308: -- ditribution lines.
1309: v_tax_payer_id ap_invoice_distributions_all.global_attribute2%TYPE;
1310: v_ship_to_loc ap_invoice_distributions_all.global_attribute3%TYPE;
1311: v_line_type ap_invoice_distributions_all. line_type_lookup_code%TYPE;
1312:
1313: Begin
1314: IF (G_LEVEL_PROCEDURE >= G_CURRENT_RUNTIME_LEVEL ) THEN
1307: -- The following variables are used to get the information from the invoice
1308: -- ditribution lines.
1309: v_tax_payer_id ap_invoice_distributions_all.global_attribute2%TYPE;
1310: v_ship_to_loc ap_invoice_distributions_all.global_attribute3%TYPE;
1311: v_line_type ap_invoice_distributions_all. line_type_lookup_code%TYPE;
1312:
1313: Begin
1314: IF (G_LEVEL_PROCEDURE >= G_CURRENT_RUNTIME_LEVEL ) THEN
1315: FND_LOG.STRING(G_LEVEL_PROCEDURE, 'JL.plsql.JL_ZZ_AP_AWT_DEFAULT_PKG.Supp_Wh_ReDefault','Start PROCEDURE Supp_Wh_ReDefault');