1 PACKAGE JA_CN_AR_RBD_EXPORT_PKG AUTHID CURRENT_USER AS
2 --$Header: JACNRBES.pls 120.0 2010/05/13 05:24:32 weihuang noship $
3 --+=======================================================================+
4 --| Copyright (c) 2010 Oracle Corporation |
5 --| Redwood Shores, CA, USA |
6 --| All rights reserved. |
7 --+=======================================================================+
8 --| FILENAME |
9 --| JACNRBES.pls |
10 --| |
11 --| DESCRIPTION |
12 --| |
13 --| This package contains the following PL/SQL tables/procedures |
14 --| to export receivable balance and details for each customer as per |
15 --| receivable accounts, such as "Account Receivable", "Receivable in |
16 --| Advance", and "Other Receivable". |
17 --| |
18 --| PROCEDURE LIST |
19 --| Add_XML_Node |
20 --| Get_Transaction_Clear_Flag |
21 --| Get_Account_Balance_Side |
22 --| Get_VAT_Invoice_Number |
23 --| Add_Receivables_Balance_Detail |
24 --| |
25 --| HISTORY |
26 --| 06-Apr-2010 Wei Huang Created |
27 --| |
28 --+======================================================================*/
29
30 --==========================================================================
31 -- PROCEDURE NAME:
32 --
33 -- Add_XML_Node Public
34 --
35 -- DESCRIPTION:
36 --
37 -- This procedure is to add receivable balance and details information
38 -- into xml nodes.
39 --
40 -- PARAMETERS:
41 -- In: pv_customer_number customer number
42 -- pv_account_number account number
43 -- pv_journal_created_date journal created date
44 -- pv_journal_date journal date
45 -- pv_accounting_year accounting year
46 -- pv_accounting_period_number accounting period number
47 -- pv_journal_category_number journal category number
48 -- pv_journal_number journal number
49 -- pv_functional_currency functional currency
50 -- pn_exchange_rate exchage rate
51 -- pv_balance_side balance side
52 -- pn_functional_balance functional balance
53 -- pn_entered_balance entered balance
54 -- pn_functional_amount functional amount
55 -- pv_entered_currency entered currency
56 -- pv_entered_amount entered amount
57 -- pv_description description
58 -- pv_due_date due date
59 -- pv_applied_journal_number applied journal number
60 -- pv_applied_date applied date
61 -- pv_document_type_number document type number
62 -- pv_transaction_type_number transaction type number
63 -- pv_transaction_number transaction number
64 -- pv_invoice_number invoice number
65 -- pv_contract_number contract number
66 -- pv_project_number project number
67 -- pv_settlement_method_number settlement method number
68 -- pv_payment_date payment date
69 -- pv_clear_flag clear flag
70 -- pv_remittance_bill_number remittance bill number
71 --
72 -- Out:
73 --
74 -- DESIGN REFERENCES:
75 --
76 --
77 -- CHANGE HISTORY:
78 -- 06-Apr-2010 Wei Huang Created
79 --
80 --==========================================================================
81 PROCEDURE Add_XML_Node
82 (pv_customer_number IN VARCHAR2
83 ,pv_account_number IN VARCHAR2
84 ,pv_journal_created_date IN VARCHAR2
85 ,pv_journal_date IN VARCHAR2
86 ,pv_accounting_year IN VARCHAR2
87 ,pv_accounting_period_number IN VARCHAR2
88 ,pv_journal_category_number IN VARCHAR2
89 ,pv_journal_number IN VARCHAR2
90 ,pv_functional_currency IN VARCHAR2
91 ,pn_exchange_rate IN NUMBER
92 ,pv_balance_side IN VARCHAR2
93 ,pn_functional_balance IN NUMBER
94 ,pn_entered_balance IN NUMBER
95 ,pn_functional_amount IN NUMBER
96 ,pv_entered_currency IN VARCHAR2
97 ,pn_entered_amount IN NUMBER
98 ,pv_description IN VARCHAR2
99 ,pv_due_date IN VARCHAR2
100 ,pv_applied_journal_number IN VARCHAR2
101 ,pv_applied_date IN VARCHAR2
102 ,pv_document_type_number IN VARCHAR2
103 ,pv_transaction_type_number IN VARCHAR2
104 ,pv_transaction_number IN VARCHAR2
105 ,pv_invoice_number IN VARCHAR2
106 ,pv_contract_number IN VARCHAR2
107 ,pv_project_number IN VARCHAR2
108 ,pv_settlement_method_number IN VARCHAR2
109 ,pv_payment_date IN VARCHAR2
110 ,pv_clear_flag IN VARCHAR2
111 ,pv_remittance_bill_number IN VARCHAR2
112 );
113
114 --==========================================================================
115 -- PROCEDURE NAME:
116 --
117 -- Get_Transaction_Clear_Flag Public
118 --
119 -- DESCRIPTION:
120 --
121 -- This function is to get the clear flag of a Transaction in a
122 -- certain accounting period. '1' menas that one transaction has been
123 -- fully paid by customer by the accounting period, '0' means that the
124 -- Transaction is unclear.
125 --
126 -- PARAMETERS:
127 -- In: pn_ledger_id Ledger ID
128 -- pd_period_end_date Accounting period end date
129 -- pn_customer_trx_id Transaction ID
130 --
131 -- Out:
132 --
133 -- DESIGN REFERENCES:
134 --
135 --
136 -- CHANGE HISTORY:
137 -- 06-Apr-2010 Wei Huang Created
138 --
139 --===========================================================================
140 FUNCTION Get_Transaction_Clear_Flag
141 (pn_ledger_id IN NUMBER
142 ,pd_period_end_date IN DATE
143 ,pn_customer_trx_id IN NUMBER
144 ) RETURN VARCHAR2;
145
146 --==========================================================================
147 -- PROCEDURE NAME:
148 --
149 -- Get_Account_Balance_Side Public
150 --
151 -- DESCRIPTION:
152 --
153 -- This function is to get the balance side of a Account.
154 --
155 -- PARAMETERS:
156 -- In: pv_account_number Account Segment
157 -- pn_flex_value_set_id Flex Value Set ID of CN_GL_ACCOUNT
158 -- pv_attribute_column4bal_side Attribute Column to store Balance Side
159 --
160 -- Out:
161 --
162 -- DESIGN REFERENCES:
163 --
164 --
165 -- CHANGE HISTORY:
166 -- 06-Apr-2010 Wei Huang Created
167 --
168 --===========================================================================
169 FUNCTION Get_Account_Balance_Side
170 (pv_account_number IN VARCHAR2
171 ,pn_flex_value_set_id IN NUMBER
172 ,pv_attribute_column4bal_side IN VARCHAR2
173 ) RETURN VARCHAR2;
174
175 --==========================================================================
176 -- PROCEDURE NAME:
177 --
178 -- Get_VAT_Invoice_Number Public
179 --
180 -- DESCRIPTION:
181 --
182 -- This function is to get the VAT invoice number from Golden Tax
183 -- Invoice for transaction.
184 --
185 -- PARAMETERS:
186 -- In: pn_customer_trx_id Transaction ID
187 -- pv_period_name Period Name
188 --
189 -- Out:
190 --
191 -- DESIGN REFERENCES:
192 --
193 --
194 -- CHANGE HISTORY:
195 -- 06-Apr-2010 Wei Huang Created
196 --
197 --===========================================================================
198 FUNCTION Get_VAT_Invoice_Number
199 (pn_customer_trx_id IN NUMBER
200 ,pv_period_name IN VARCHAR2
201 ) RETURN VARCHAR2;
202
203 --==========================================================================
204 -- PROCEDURE NAME:
205 --
206 -- Add_Receivables_Balance_Detail Public
207 --
208 -- DESCRIPTION:
209 --
210 -- This procedure is to export receivable balance and details for
211 -- each customer as per receivable accounts, such as "Account
212 -- Receivable", "Receivable in Advance", and "Other Receivable".
213 --
214 --
215 -- PARAMETERS:
216 -- In: pn_legal_entity_id LEGAL_ENTITY_ID
217 -- pn_ledger_id Ledger ID
218 -- pv_accounting_year Accounting Year
219 -- pn_coa_id Chart of Accounts ID
220 -- pv_period_from Period From
221 -- pv_period_to Period To
222 --
223 -- Out:
224 --
225 -- DESIGN REFERENCES:
226 --
227 --
228 -- CHANGE HISTORY:
229 -- 06-Apr-2010 Wei Huang Created
230 --
231 --===========================================================================
232 PROCEDURE Add_Receivables_Balance_Detail
233 (pn_legal_entity_id IN NUMBER
234 ,pn_ledger_id IN NUMBER
235 ,pv_accounting_year IN VARCHAR2
236 ,pn_coa_id IN NUMBER
237 ,pv_period_from IN VARCHAR2
238 ,pv_period_to IN VARCHAR2
239 );
240
241 END JA_CN_AR_RBD_EXPORT_PKG;