/*API To Generate GST TAX_INVOICE_NUM in AR*/
DECLARE
v_process_status VARCHAR2 (30);
v_process_message VARCHAR2 (2000);
CURSOR c IS
SELECT a.entity_code,
a.event_class_ code,
a.event_type_code ,
a.tax_event_ class_code,
a.tax_event_type_ code,
a.trx_id,
SYSDATE TAX_ INVOICE_DATE
FROM jai_tax_det_ factors A,
jai_tax_lines X
WHERE A.det_factor_id = X.det_factor_id
AND A.trx_id = 31 51442 --CUSTOMER_TRX_ID
AND A.application _id = 222
AND A.entity_code = 'TRANSACTIONS'
HAVING Max(X.tax_ invoice_num) IS NULL
GROUP BY A.entity_code,
A.event_class_ code,
A.event_type_ code,
A.tax_event_ class_code,
A.tax_event_ type_code,
A.trx_id;
BEGIN
FOR c1 IN c LOOP
jai_inv_num_gen_pkg.Pr ocess_generation(pn_ application_id => 222,
pv_entity_code => c1.e ntity_code,
pv_event_class_code => c1.event_class_code,
pv_event_type_code => c1.event_type_code,
pv_tax_event_class_ code => c1.tax_event_class_ code,
pv_tax_event_type_code => c1.tax_event_type_code,
pv_interface_flag => N ULL,
pn_trx_id => c1.trx_id ,
pn_delivery_id => c1.t rx_id, pd_invoice_date => c1.t ax_invoice_date,
pv_process_status => v _process_status,
pv_process_message => v_process_message);
dbms_output.Put_line(' Status=>'
| |v_process_status
| |':'
| |v_process_message);
--FND_FILE.PUT_LINE( FND_FILE.LOG,'Status=>'||v_ process_status||':'||v_ process_message);
COMMIT;
END LOOP;
END;
v_process_status VARCHAR2
v_process_message VARCHAR2
CURSOR c IS
SELECT a.entity_code,
a.event_class_
a.event_type_code
a.tax_event_
a.tax_event_type_
a.trx_id,
SYSDATE TAX_
FROM jai_tax_det_
jai_tax_lines X
WHERE A.det_factor_id =
AND A.trx_id = 31
AND A.application
AND A.entity_code
HAVING Max(X.tax_
GROUP BY A.entity_code,
A.event_class_
A.event_type_
A.tax_event_
A.tax_event_
A.trx_id;
BEGIN
FOR c1 IN c LOOP
jai_inv_num_gen_pkg.Pr
pv_entity_code => c1.e
pv_event_class_code =>
pv_event_type_code =>
pv_tax_event_class_
pv_tax_event_type_code
pv_interface_flag => N
pn_trx_id => c1.trx_id
pn_delivery_id => c1.t
pv_process_status => v
pv_process_message =>
dbms_output.Put_line('
|
|
|
--FND_FILE.PUT_LINE(
COMMIT;
END LOOP;
END;
Metalink Reference:- DATAFIX: GST Tax Invoice Number Not Generated For AR Transactions (Doc ID 2556466.1)
No comments:
Post a Comment