DBA Data[Home] [Help]

APPS.JAI_CMN_GST_INV_GEN_PKG dependencies on JAI_RGM_GST_INVOICE_GEN_T

Line 102: || will be flagged as errored in the table JAI_RGM_GST_INVOICE_GEN_T for the delivery_id

98: || and the same value retained for this record set of same cust / cust site
99: || a.2) If the parameter p_single_invoice_num is set to 'N' , then for each delivery a seperate gst invoice number
100: || will be generated.
101: || If the generate gst invoice number api returns error , then the subsection b will not be processed and the delivery
102: || will be flagged as errored in the table JAI_RGM_GST_INVOICE_GEN_T for the delivery_id
103: ||
104: || b) make a call to the api to process accounting
105: ||
106: || b.1 If it returns success then if the p_process_action = 'All' then flag both the fields GST_INV_GEN_STATUS

Line 173: CURSOR c_inv_gen_status (cp_delivery_id JAI_RGM_GST_INVOICE_GEN_T.delivery_id%type,

169: wdd.source_code = 'OE' AND
170: NVL(wdd.inv_interfaced_flag,'N') <> 'Y';
171:
172:
173: CURSOR c_inv_gen_status (cp_delivery_id JAI_RGM_GST_INVOICE_GEN_T.delivery_id%type,
174: cp_order_line_id JAI_RGM_GST_INVOICE_GEN_T.order_line_id%type) IS
175: SELECT gst_inv_gen_status
176: FROM JAI_RGM_GST_INVOICE_GEN_T
177: WHERE delivery_id = NVL(cp_delivery_id, -1)

Line 174: cp_order_line_id JAI_RGM_GST_INVOICE_GEN_T.order_line_id%type) IS

170: NVL(wdd.inv_interfaced_flag,'N') <> 'Y';
171:
172:
173: CURSOR c_inv_gen_status (cp_delivery_id JAI_RGM_GST_INVOICE_GEN_T.delivery_id%type,
174: cp_order_line_id JAI_RGM_GST_INVOICE_GEN_T.order_line_id%type) IS
175: SELECT gst_inv_gen_status
176: FROM JAI_RGM_GST_INVOICE_GEN_T
177: WHERE delivery_id = NVL(cp_delivery_id, -1)
178: OR order_line_id = NVL(cp_order_line_id, -1);

Line 176: FROM JAI_RGM_GST_INVOICE_GEN_T

172:
173: CURSOR c_inv_gen_status (cp_delivery_id JAI_RGM_GST_INVOICE_GEN_T.delivery_id%type,
174: cp_order_line_id JAI_RGM_GST_INVOICE_GEN_T.order_line_id%type) IS
175: SELECT gst_inv_gen_status
176: FROM JAI_RGM_GST_INVOICE_GEN_T
177: WHERE delivery_id = NVL(cp_delivery_id, -1)
178: OR order_line_id = NVL(cp_order_line_id, -1);
179:
180: /*end bug 4702156*/

Line 246: 'FROM JAI_RGM_GST_INVOICE_GEN_T jrigt ' ||

242: := 'SELECT delivery_id , delivery_date , organization_id , location_id , '||
243: 'party_id , party_site_id , party_type , '||
244: 'gst_invoice_no, gst_inv_gen_status, gst_acct_status,'||
245: 'order_line_id, order_number ' ||
246: 'FROM JAI_RGM_GST_INVOICE_GEN_T jrigt ' ||
247: 'WHERE (delivery_id BETWEEN NVL('||NVL(TO_CHAR(p_delivery_id_from), 'NULL')||',delivery_id) AND '||
248: 'NVL('||NVL(TO_CHAR(p_delivery_id_to), 'NULL')||',delivery_id)) '||
249: 'AND EXISTS (SELECT 1 FROM WSH_DELIVERY_DETAILS wdd '||
250: ',WSH_DELIVERY_ASSIGNMENTS wda '||

Line 271: 'FROM JAI_RGM_GST_INVOICE_GEN_T jrigt ' ||

267: := 'SELECT delivery_id , delivery_date , organization_id , location_id , '||
268: 'party_id , party_site_id , party_type , '||
269: 'gst_invoice_no, gst_inv_gen_status, gst_acct_status,'||
270: 'order_line_id, order_number ' ||
271: 'FROM JAI_RGM_GST_INVOICE_GEN_T jrigt ' ||
272: 'WHERE (delivery_id IS NULL OR (delivery_id BETWEEN '||
273: 'NVL('||NVL(TO_CHAR(p_delivery_id_from), 'NULL')||',delivery_id) AND '||
274: 'NVL('||NVL(TO_CHAR(p_delivery_id_to), 'NULL')||',delivery_id) '||
275: 'AND EXISTS (SELECT 1 FROM WSH_DELIVERY_DETAILS wdd '||

Line 415: table JAI_RGM_GST_INVOICE_GEN_T (vat_invoice_no => lv_vat_invoice_number

411: THEN
412: /* generate new GST invoice number by document sequence;
413: 1. jai_cmn_rgm_setup_pkg.Gen_Invoice_number();
414: 2. if successful, update GST invoice number to JAI_OM_WSH_LINES_ALL, and update
415: table JAI_RGM_GST_INVOICE_GEN_T (vat_invoice_no => lv_vat_invoice_number
416: , vat_inv_gen_status => 'C');
417: */
418: IF lv_Debug = 'Y'
419: THEN

Line 459: UPDATE JAI_RGM_GST_INVOICE_GEN_T

455: , LAST_UPDATE_LOGIN = fnd_global.login_id
456: , LAST_UPDATED_BY = fnd_global.user_id
457: WHERE DELIVERY_ID = mainrec.delivery_id;
458:
459: UPDATE JAI_RGM_GST_INVOICE_GEN_T
460: SET gst_invoice_no =lv_invoice_number
461: , gst_inv_gen_status ='C'
462: , gst_inv_gen_err_message = NULL
463: , request_id = ln_conc_request_id

Line 482: 2. update JAI_OM_WSH_LINES_ALL and JAI_RGM_GST_INVOICE_GEN_T;

478: END IF; -- p_process_action in (jai_constants.om_action_gen_inv_n_accnt ,jai_constants.om_action_gen_invoice)
479:
480: ELSE -- party not change
481: /* 1. use existing GST invoice number for this record;
482: 2. update JAI_OM_WSH_LINES_ALL and JAI_RGM_GST_INVOICE_GEN_T;
483: */
484: IF lv_invoice_number IS NOT NULL
485: THEN
486: -- Update the vat_invoice_num field in JAI_OM_WSH_LINES_ALL table for the current delivery.

Line 494: FROM JAI_RGM_GST_INVOICE_GEN_T jrigt

490: last_update_date = sysdate,
491: last_update_login = fnd_global.login_id,
492: last_updated_by = fnd_global.user_id
493: WHERE delivery_id IN (SELECT delivery_id
494: FROM JAI_RGM_GST_INVOICE_GEN_T jrigt
495: WHERE party_id = ln_current_party_id
496: AND party_site_id = ln_current_party_site_id
497: AND party_type = mainrec.party_type
498: AND gst_inv_gen_status <> 'C'

Line 514: UPDATE JAI_RGM_GST_INVOICE_GEN_T

510: NVL(p_order_number_to, ooha.order_number))
511: AND trunc(delivery_Date) BETWEEN NVL(P_DELIVERY_DATE_FROM,Delivery_date)
512: AND NVL(P_DELIVERY_DATE_TO,delivery_date));
513:
514: UPDATE JAI_RGM_GST_INVOICE_GEN_T
515: SET gst_invoice_no = lv_invoice_number,
516: gst_inv_gen_status = 'C',
517: gst_inv_gen_err_message = NULL,
518: request_id = ln_conc_request_id,

Line 523: FROM JAI_RGM_GST_INVOICE_GEN_T jrigt

519: program_id = ln_conc_progam_id,
520: program_application_id = ln_conc_prog_appl_id,
521: last_update_login = fnd_global.conc_login_id
522: WHERE delivery_id IN (SELECT delivery_id
523: FROM JAI_RGM_GST_INVOICE_GEN_T jrigt
524: WHERE party_id = ln_current_party_id
525: AND party_site_id = ln_current_party_site_id
526: AND party_type = mainrec.party_type
527: AND gst_inv_gen_status <> 'C'

Line 554: table JAI_RGM_GST_INVOICE_GEN_T (vat_invoice_no => lv_vat_invoice_number,

550: ELSE -- single invoice number is false
551: /* generate new GST invoice number by document sequence;
552: 1. jai_cmn_rgm_setup_pkg.Gen_Invoice_number();
553: 2. if successful, update GST invoice number to JAI_OM_WSH_LINES_ALL, and update
554: table JAI_RGM_GST_INVOICE_GEN_T (vat_invoice_no => lv_vat_invoice_number,
555: vat_inv_gen_status => 'C');
556: */
557: IF lv_Debug = 'Y' THEN
558: Fnd_File.PUT_LINE(Fnd_File.LOG, 'In the Else when p_single_invoice is not Y ');

Line 608: UPDATE JAI_RGM_GST_INVOICE_GEN_T

604: last_update_login = fnd_global.login_id,
605: last_updated_by = fnd_global.user_id
606: WHERE delivery_id = mainrec.delivery_id;
607:
608: UPDATE JAI_RGM_GST_INVOICE_GEN_T
609: SET gst_invoice_no = lv_invoice_number,
610: gst_inv_gen_status = 'C',
611: gst_inv_gen_err_message = NULL,
612: request_id = ln_conc_request_id,

Line 627: UPDATE JAI_RGM_GST_INVOICE_GEN_T

623: ln_failure_delivery_ctr := NVL(ln_failure_Delivery_ctr,0) + 1;
624: END IF; -- lv_vat_invoice_number IS NOT NULL
625: ELSE
626:
627: UPDATE JAI_RGM_GST_INVOICE_GEN_T
628: SET gst_inv_gen_status = 'E',
629: gst_inv_gen_err_message = substr(lv_inv_gen_process_message,1,1000),
630: request_id = ln_conc_request_id,
631: program_id = ln_conc_progam_id,

Line 663: table JAI_RGM_GST_INVOICE_GEN_T (vat_invoice_no => lv_invoice_number,

659: THEN
660: /* generate new GST invoice number by document sequence;
661: 1. jai_cmn_rgm_setup_pkg.Gen_Invoice_number();
662: 2. if successful, update GST invoice number to JAI_OM_WSH_LINES_ALL, and update
663: table JAI_RGM_GST_INVOICE_GEN_T (vat_invoice_no => lv_invoice_number,
664: vat_inv_gen_status => 'C');
665: */
666: IF lv_Debug = 'Y'
667: THEN

Line 708: UPDATE JAI_RGM_GST_INVOICE_GEN_T

704: , LAST_UPDATED_BY = fnd_global.user_id
705: WHERE order_line_id = mainrec.order_line_id
706: AND delivery_id IS NULL;
707:
708: UPDATE JAI_RGM_GST_INVOICE_GEN_T
709: SET gst_invoice_no = lv_invoice_number
710: , gst_inv_gen_status = 'C'
711: , gst_inv_gen_err_message = NULL
712: , request_id = ln_conc_request_id

Line 730: 2. update JAI_OM_WSH_LINES_ALL and JAI_RGM_GST_INVOICE_GEN_T;

726: --END IF; -- lv_inv_num_already_generated = jai_constants.value_false
727: END IF; -- p_process_action in (jai_constants.om_action_gen_inv_n_accnt ,jai_constants.om_action_gen_invoice)
728: ELSE -- party not change
729: /* 1. use existing invoice number for this record;
730: 2. update JAI_OM_WSH_LINES_ALL and JAI_RGM_GST_INVOICE_GEN_T;
731: */
732: IF lv_invoice_number IS NOT NULL THEN
733: -- Update the vat_invoice_num field in JAI_OM_WSH_LINES_ALL table for the current non-shippable line.
734: UPDATE JAI_OM_WSH_LINES_ALL

Line 743: UPDATE JAI_RGM_GST_INVOICE_GEN_T

739: , last_updated_by = fnd_global.user_id
740: WHERE order_line_id = mainrec.order_line_id
741: AND delivery_id IS NULL;
742:
743: UPDATE JAI_RGM_GST_INVOICE_GEN_T
744: SET gst_invoice_no = lv_invoice_number
745: , gst_inv_gen_status = 'C'
746: , request_id = ln_conc_request_id
747: , program_id = ln_conc_progam_id

Line 763: table JAI_RGM_GST_INVOICE_GEN_T (vat_invoice_no => lv_vat_invoice_number,

759: THEN
760: /* generate new GST invoice number by document sequence;
761: 1. jai_cmn_rgm_setup_pkg.Gen_Invoice_number();
762: 2. if successful, update GST invoice number to JAI_OM_WSH_LINES_ALL, and update
763: table JAI_RGM_GST_INVOICE_GEN_T (vat_invoice_no => lv_vat_invoice_number,
764: vat_inv_gen_status => 'C');
765: */
766: IF lv_Debug = 'Y'
767: THEN

Line 809: UPDATE JAI_RGM_GST_INVOICE_GEN_T

805: , LAST_UPDATED_BY = fnd_global.user_id
806: WHERE order_line_id = mainrec.order_line_id
807: AND delivery_id IS NULL;
808:
809: UPDATE JAI_RGM_GST_INVOICE_GEN_T
810: SET gst_invoice_no = lv_invoice_number
811: ,gst_inv_gen_status = 'C'
812: ,gst_inv_gen_err_message = NULL
813: , request_id = ln_conc_request_id

Line 833: 2. update JAI_OM_WSH_LINES_ALL and JAI_RGM_GST_INVOICE_GEN_T;

829: --END IF; -- lv_inv_num_already_generated = jai_constants.value_false
830: END IF; -- p_process_action in (jai_constants.om_action_gen_inv_n_accnt ,jai_constants.om_action_gen_invoice)
831: ELSE -- order number not change
832: /* 1. use existing gst invoice number for this record;
833: 2. update JAI_OM_WSH_LINES_ALL and JAI_RGM_GST_INVOICE_GEN_T;
834: */
835: IF lv_invoice_number IS NOT NULL THEN
836: -- Update the vat_invoice_num field in JAI_OM_WSH_LINES_ALL table for the current delivery.
837: UPDATE JAI_OM_WSH_LINES_ALL

Line 846: UPDATE JAI_RGM_GST_INVOICE_GEN_T

842: , last_updated_by = fnd_global.user_id
843: WHERE order_line_id = mainrec.order_line_id
844: AND delivery_id IS NULL;
845:
846: UPDATE JAI_RGM_GST_INVOICE_GEN_T
847: SET gst_invoice_no = lv_invoice_number
848: , gst_inv_gen_status = 'C'
849: , gst_inv_gen_err_message = NULL
850: , request_id = ln_conc_request_id

Line 938: UPDATE JAI_RGM_GST_INVOICE_GEN_T

934: \*
935: || Both the activities have been succesfully completed
936: || Can commit the changes made to the delivery.
937: *\
938: UPDATE JAI_RGM_GST_INVOICE_GEN_T
939: SET vat_acct_status = 'C',
940: vat_inv_gen_err_message = NULL, \*following columns added by srjayara for bug 4702156*\
941: request_id = ln_conc_request_id,
942: program_id = ln_conc_progam_id,

Line 966: UPDATE JAI_RGM_GST_INVOICE_GEN_T

962: *\
963: ROLLBACK;
964:
965: IF lv_inv_gen_process_flag <> jai_constants.successful THEN
966: UPDATE JAI_RGM_GST_INVOICE_GEN_T
967: SET vat_inv_gen_err_message = substr(lv_inv_gen_process_message,1,1000),
968: vat_inv_gen_status = 'E',
969: request_id = ln_conc_request_id, \*following columns added by srjayara for bug 4702156*\
970: program_id = ln_conc_progam_id,

Line 982: UPDATE JAI_RGM_GST_INVOICE_GEN_T

978: -- modified by Allen Yang for bug 9485355 (12.1.3 non-shippable Enhancement), end
979: END IF;
980:
981: IF lv_acct_process_flag <> jai_constants.successful THEN
982: UPDATE JAI_RGM_GST_INVOICE_GEN_T
983: SET vat_acct_err_message = substr(lv_acct_process_message,1,1000),
984: vat_acct_status = 'E',
985: request_id = ln_conc_request_id, \*following columns added by srjayara for bug 4702156*\
986: program_id = ln_conc_progam_id,

Line 1006: -- need to purse JAI_RGM_GST_INVOICE_GEN_T at the end of this concurrent

1002: NULL;
1003: END LOOP;
1004:
1005:
1006: -- need to purse JAI_RGM_GST_INVOICE_GEN_T at the end of this concurrent
1007: -- Need to do
1008: /* DELETE FROM JAI_RGM_GST_INVOICE_GEN_T
1009: WHERE vat_inv_gen_status = 'C'
1010: AND vat_acct_status = 'C';*/

Line 1008: /* DELETE FROM JAI_RGM_GST_INVOICE_GEN_T

1004:
1005:
1006: -- need to purse JAI_RGM_GST_INVOICE_GEN_T at the end of this concurrent
1007: -- Need to do
1008: /* DELETE FROM JAI_RGM_GST_INVOICE_GEN_T
1009: WHERE vat_inv_gen_status = 'C'
1010: AND vat_acct_status = 'C';*/
1011:
1012: