DBA Data[Home] [Help]

PACKAGE BODY: APPS.AR_IREC_PAYMENTS_W

Source


1 package body ar_irec_payments_w as
2   /* $Header: ARIPMTWB.pls 120.0.12000000.1 2007/03/13 06:43:54 abathini noship $ */
3   procedure rosetta_table_copy_in_p34(t out nocopy ar_irec_payments.inv_list_table_type, a0 JTF_NUMBER_TABLE) as
4     ddindx binary_integer; indx binary_integer;
5   begin
6   if a0 is not null and a0.count > 0 then
7       if a0.count > 0 then
8         indx := a0.first;
9         ddindx := 1;
10         while true loop
11           t(ddindx) := a0(indx);
12           ddindx := ddindx+1;
13           if a0.last =indx
14             then exit;
15           end if;
16           indx := a0.next(indx);
17         end loop;
18       end if;
19    end if;
20   end rosetta_table_copy_in_p34;
21   procedure rosetta_table_copy_out_p34(t ar_irec_payments.inv_list_table_type, a0 out nocopy JTF_NUMBER_TABLE) as
22     ddindx binary_integer; indx binary_integer;
23   begin
24   if t is null or t.count = 0 then
25     a0 := JTF_NUMBER_TABLE();
26   else
27       a0 := JTF_NUMBER_TABLE();
28       if t.count > 0 then
29         a0.extend(t.count);
30         ddindx := t.first;
31         indx := 1;
32         while true loop
33           a0(indx) := t(ddindx);
34           indx := indx+1;
35           if t.last =ddindx
36             then exit;
37           end if;
38           ddindx := t.next(ddindx);
39         end loop;
40       end if;
41    end if;
42   end rosetta_table_copy_out_p34;
43 
44   procedure allow_payment(p_payment_schedule_id  NUMBER
45     , p_customer_id  NUMBER
46     , p_customer_site_id  NUMBER
47     , ddrosetta_retval_bool OUT NOCOPY NUMBER
48   )
49 
50   as
51     ddindx binary_integer; indx binary_integer;
52     ddrosetta_retval boolean;
53   begin
54 
55     -- copy data to the local IN or IN-OUT args, if any
56 
57 
58 
59     -- here's the delegated call to the old PL/SQL routine
60     ddrosetta_retval := ar_irec_payments.allow_payment(p_payment_schedule_id,
61       p_customer_id,
62       p_customer_site_id);
63 
64     -- copy data back from the local variables to OUT or IN-OUT args, if any
65     if ddrosetta_retval is null
66       then ddrosetta_retval_bool := null;
67     elsif ddrosetta_retval
68       then ddrosetta_retval_bool := 1;
69     else ddrosetta_retval_bool := 0;
70     end if;
71 
72 
73   end;
74 
75   procedure update_invoice_payment_status(p_payment_schedule_id_list JTF_NUMBER_TABLE
76     , p_inv_pay_status  VARCHAR2
77     , x_return_status out nocopy  VARCHAR2
78     , x_msg_count out nocopy  NUMBER
79     , x_msg_data out nocopy  VARCHAR2
80   )
81 
82   as
83     ddp_payment_schedule_id_list ar_irec_payments.inv_list_table_type;
84     ddindx binary_integer; indx binary_integer;
85   begin
86 
87     -- copy data to the local IN or IN-OUT args, if any
88     ar_irec_payments_w.rosetta_table_copy_in_p34(ddp_payment_schedule_id_list, p_payment_schedule_id_list);
89 
90 
91 
92 
93 
94     -- here's the delegated call to the old PL/SQL routine
95     ar_irec_payments.update_invoice_payment_status(ddp_payment_schedule_id_list,
96       p_inv_pay_status,
97       x_return_status,
98       x_msg_count,
99       x_msg_data);
100 
101     -- copy data back from the local variables to OUT or IN-OUT args, if any
102 
103 
104 
105 
106   end;
107 
108 end ar_irec_payments_w;