DBA Data[Home] [Help]

APPS.JAI_CMN_RGM_PROCESSING_PKG dependencies on JAI_OM_WSH_LINES_ALL

Line 3028: p_organization_id JAI_OM_WSH_LINES_ALL.ORGANIZATION_ID%TYPE,

3024: retcode OUT NOCOPY VARCHAR2,
3025: errbuf OUT NOCOPY VARCHAR2,
3026: p_regime_id JAI_RGM_DEFINITIONS.REGIME_ID%TYPE,
3027: p_registration_num JAI_RGM_TRX_RECORDS.REGIME_PRIMARY_REGNO%TYPE,
3028: p_organization_id JAI_OM_WSH_LINES_ALL.ORGANIZATION_ID%TYPE,
3029: p_location_id JAI_OM_WSH_LINES_ALL.LOCATION_ID%TYPE,
3030: -- added by Allen Yang for bug 9485355 (12.1.3 non-shippable Enhancement), begin
3031: p_order_number_from OE_ORDER_HEADERS_ALL.ORDER_NUMBER%TYPE,
3032: p_order_number_to OE_ORDER_HEADERS_ALL.ORDER_NUMBER%TYPE,

Line 3029: p_location_id JAI_OM_WSH_LINES_ALL.LOCATION_ID%TYPE,

3025: errbuf OUT NOCOPY VARCHAR2,
3026: p_regime_id JAI_RGM_DEFINITIONS.REGIME_ID%TYPE,
3027: p_registration_num JAI_RGM_TRX_RECORDS.REGIME_PRIMARY_REGNO%TYPE,
3028: p_organization_id JAI_OM_WSH_LINES_ALL.ORGANIZATION_ID%TYPE,
3029: p_location_id JAI_OM_WSH_LINES_ALL.LOCATION_ID%TYPE,
3030: -- added by Allen Yang for bug 9485355 (12.1.3 non-shippable Enhancement), begin
3031: p_order_number_from OE_ORDER_HEADERS_ALL.ORDER_NUMBER%TYPE,
3032: p_order_number_to OE_ORDER_HEADERS_ALL.ORDER_NUMBER%TYPE,
3033: -- added by Allen Yang for bug 9485355 (12.1.3 non-shippable Enhancement), end

Line 3034: p_delivery_id_from JAI_OM_WSH_LINES_ALL.DELIVERY_ID%TYPE,

3030: -- added by Allen Yang for bug 9485355 (12.1.3 non-shippable Enhancement), begin
3031: p_order_number_from OE_ORDER_HEADERS_ALL.ORDER_NUMBER%TYPE,
3032: p_order_number_to OE_ORDER_HEADERS_ALL.ORDER_NUMBER%TYPE,
3033: -- added by Allen Yang for bug 9485355 (12.1.3 non-shippable Enhancement), end
3034: p_delivery_id_from JAI_OM_WSH_LINES_ALL.DELIVERY_ID%TYPE,
3035: p_delivery_id_to JAI_OM_WSH_LINES_ALL.DELIVERY_ID%TYPE,
3036: pv_delivery_date_from VARCHAR2, --DATE, Harshita for Bug 4918870
3037: pv_delivery_date_to VARCHAR2, --DATE, Harshita for Bug 4918870
3038: p_process_action VARCHAR2,

Line 3035: p_delivery_id_to JAI_OM_WSH_LINES_ALL.DELIVERY_ID%TYPE,

3031: p_order_number_from OE_ORDER_HEADERS_ALL.ORDER_NUMBER%TYPE,
3032: p_order_number_to OE_ORDER_HEADERS_ALL.ORDER_NUMBER%TYPE,
3033: -- added by Allen Yang for bug 9485355 (12.1.3 non-shippable Enhancement), end
3034: p_delivery_id_from JAI_OM_WSH_LINES_ALL.DELIVERY_ID%TYPE,
3035: p_delivery_id_to JAI_OM_WSH_LINES_ALL.DELIVERY_ID%TYPE,
3036: pv_delivery_date_from VARCHAR2, --DATE, Harshita for Bug 4918870
3037: pv_delivery_date_to VARCHAR2, --DATE, Harshita for Bug 4918870
3038: p_process_action VARCHAR2,
3039: p_single_invoice_num VARCHAR2,

Line 3176: ln_order_type_id JAI_OM_WSH_LINES_ALL.ORDER_TYPE_ID%TYPE;

3172: ln_failure_delivery_ctr NUMBER;
3173: ln_success_delivery_Ctr NUMBER;
3174: ln_regime_id NUMBER;
3175: lv_debug VARCHAR2(5); -- := jai_constants.no /* This should be either 'Y' or 'N' */ File.Sql.35 by Brathod
3176: ln_order_type_id JAI_OM_WSH_LINES_ALL.ORDER_TYPE_ID%TYPE;
3177: lv_inv_num_already_generated VARCHAR2(10); --:= jai_constants.value_false File.Sql.35 by Brathod
3178: ln_batch_id NUMBER;
3179: lv_regime_code JAI_RGM_DEFINITIONS.REGIME_CODE%TYPE;
3180: ln_current_party_id NUMBER;

Line 3187: lv_excise_invoice_no JAI_OM_WSH_LINES_ALL.EXCISE_INVOICE_NO%TYPE;

3183: ln_conc_progam_id NUMBER;
3184: ln_conc_request_id NUMBER;
3185: ln_conc_prog_appl_id NUMBER;
3186: lv_Same_invoice_no VARCHAR2(100);
3187: lv_excise_invoice_no JAI_OM_WSH_LINES_ALL.EXCISE_INVOICE_NO%TYPE;
3188: ld_excise_invoice_date JAI_OM_WSH_LINES_ALL.EXCISE_INVOICE_DATE%TYPE;
3189: lb_completion_status BOOLEAN;
3190: ld_override_invoice_date DATE; /* aiyer for the bug 5369250 */
3191: lv_doc_type_class varchar2(2); /*kunkumar for bug #5233925*/

Line 3188: ld_excise_invoice_date JAI_OM_WSH_LINES_ALL.EXCISE_INVOICE_DATE%TYPE;

3184: ln_conc_request_id NUMBER;
3185: ln_conc_prog_appl_id NUMBER;
3186: lv_Same_invoice_no VARCHAR2(100);
3187: lv_excise_invoice_no JAI_OM_WSH_LINES_ALL.EXCISE_INVOICE_NO%TYPE;
3188: ld_excise_invoice_date JAI_OM_WSH_LINES_ALL.EXCISE_INVOICE_DATE%TYPE;
3189: lb_completion_status BOOLEAN;
3190: ld_override_invoice_date DATE; /* aiyer for the bug 5369250 */
3191: lv_doc_type_class varchar2(2); /*kunkumar for bug #5233925*/
3192:

Line 3217: CURSOR c_shipment_info(cp_Delivery_id JAI_OM_WSH_LINES_ALL.DELIVERY_ID%TYPE

3213: FROM JAI_RGM_DEFINITIONS
3214: WHERE regime_code = jai_constants.vat_regime;
3215:
3216: -- modified by Allen Yang for bug 9485355 (12.1.3 non-shippable Enhancement), begin
3217: CURSOR c_shipment_info(cp_Delivery_id JAI_OM_WSH_LINES_ALL.DELIVERY_ID%TYPE
3218: , cp_order_line_id JAI_OM_WSH_LINES_ALL.ORDER_LINE_ID%TYPE)
3219: IS
3220: SELECT order_type_id , excise_invoice_no
3221: FROM JAI_OM_WSH_LINES_ALL

Line 3218: , cp_order_line_id JAI_OM_WSH_LINES_ALL.ORDER_LINE_ID%TYPE)

3214: WHERE regime_code = jai_constants.vat_regime;
3215:
3216: -- modified by Allen Yang for bug 9485355 (12.1.3 non-shippable Enhancement), begin
3217: CURSOR c_shipment_info(cp_Delivery_id JAI_OM_WSH_LINES_ALL.DELIVERY_ID%TYPE
3218: , cp_order_line_id JAI_OM_WSH_LINES_ALL.ORDER_LINE_ID%TYPE)
3219: IS
3220: SELECT order_type_id , excise_invoice_no
3221: FROM JAI_OM_WSH_LINES_ALL
3222: --WHERE delivery_id = cp_delivery_id;

Line 3221: FROM JAI_OM_WSH_LINES_ALL

3217: CURSOR c_shipment_info(cp_Delivery_id JAI_OM_WSH_LINES_ALL.DELIVERY_ID%TYPE
3218: , cp_order_line_id JAI_OM_WSH_LINES_ALL.ORDER_LINE_ID%TYPE)
3219: IS
3220: SELECT order_type_id , excise_invoice_no
3221: FROM JAI_OM_WSH_LINES_ALL
3222: --WHERE delivery_id = cp_delivery_id;
3223: WHERE delivery_id = cp_delivery_id
3224: OR (delivery_id IS NULL AND order_line_id = cp_order_line_id);
3225: -- modified by Allen Yang for bug 9485355 (12.1.3 non-shippable Enhancement), end

Line 3227: CURSOR c_same_inv_no(cp_organization_id JAI_OM_WSH_LINES_ALL.ORGANIZATION_ID%TYPE , cp_location_id JAI_OM_WSH_LINES_ALL.location_id%TYPE ) IS

3223: WHERE delivery_id = cp_delivery_id
3224: OR (delivery_id IS NULL AND order_line_id = cp_order_line_id);
3225: -- modified by Allen Yang for bug 9485355 (12.1.3 non-shippable Enhancement), end
3226:
3227: CURSOR c_same_inv_no(cp_organization_id JAI_OM_WSH_LINES_ALL.ORGANIZATION_ID%TYPE , cp_location_id JAI_OM_WSH_LINES_ALL.location_id%TYPE ) IS
3228: SELECT attribute_Value
3229: FROM JAI_RGM_ORG_REGNS_V
3230: WHERE regime_id = p_regime_id
3231: AND attribute_type_code = jai_constants.regn_type_others

Line 3236: CURSOR c_excise_invoice_not_done ( cp_Delivery_id JAI_OM_WSH_LINES_ALL.DELIVERY_ID%TYPE)IS

3232: AND attribute_code = jai_constants.attr_code_same_inv_no
3233: AND organization_id = cp_organization_id
3234: AND location_id = cp_location_id;
3235:
3236: CURSOR c_excise_invoice_not_done ( cp_Delivery_id JAI_OM_WSH_LINES_ALL.DELIVERY_ID%TYPE)IS
3237: SELECT 1
3238: FROM JAI_OM_OE_GEN_TAXINV_T
3239: WHERE delivery_id = cp_delivery_id;
3240:

Line 3281: , JAI_OM_WSH_LINES_ALL jowla

3277: IS
3278: SELECT jowla.excise_invoice_no
3279: ,jowla.excise_invoice_date
3280: FROM JAI_RGM_INVOICE_GEN_T jrigt
3281: , JAI_OM_WSH_LINES_ALL jowla
3282: WHERE jrigt.program_id = ln_conc_progam_id
3283: AND jrigt.delivery_id = jowla.delivery_id
3284: AND jowla.excise_invoice_no IS NOT NULL
3285: AND EXISTS (SELECT 1

Line 3613: Fnd_File.PUT_LINE(Fnd_File.LOG, ' before updating jai_om_wsh_lines_all for ex inv num');

3609: -- Excise invoice number is not null - so the same excise invoice number needs to be used as VAT invoice number
3610: lv_vat_invoice_number := lv_excise_invoice_no;
3611: IF lv_debug = 'Y' THEN
3612: Fnd_File.PUT_LINE(Fnd_File.LOG, ' Excise Invoice number - ' || lv_vat_invoice_number || ' Will be used as VAT Invoice number for delivery : ' || mainrec.delivery_id);
3613: Fnd_File.PUT_LINE(Fnd_File.LOG, ' before updating jai_om_wsh_lines_all for ex inv num');
3614: END IF; -- lv_debug = 'Y'
3615:
3616: UPDATE JAI_OM_WSH_LINES_ALL
3617: SET vat_invoice_no = excise_invoice_no

Line 3616: UPDATE JAI_OM_WSH_LINES_ALL

3612: Fnd_File.PUT_LINE(Fnd_File.LOG, ' Excise Invoice number - ' || lv_vat_invoice_number || ' Will be used as VAT Invoice number for delivery : ' || mainrec.delivery_id);
3613: Fnd_File.PUT_LINE(Fnd_File.LOG, ' before updating jai_om_wsh_lines_all for ex inv num');
3614: END IF; -- lv_debug = 'Y'
3615:
3616: UPDATE JAI_OM_WSH_LINES_ALL
3617: SET vat_invoice_no = excise_invoice_no
3618: , vat_invoice_date = excise_invoice_date
3619: WHERE delivery_id = mainrec.delivery_id;
3620:

Line 3663: || API call again and again to the generation api . Just update the JAI_OM_WSH_LINES_ALL table to set the

3659:
3660: /*
3661: || Check if we need to generate vat invoice number and within that check if an invoice number is already generated.
3662: || if an invoice is already generated and if the parameter p_single_invoice_num is set to 'Y' then do not make an
3663: || API call again and again to the generation api . Just update the JAI_OM_WSH_LINES_ALL table to set the
3664: || vat invoice number for the delivery and continue.
3665: */
3666: IF NVL(p_single_invoice_num,jai_constants.No) = jai_constants.yes -- single invoice number is true
3667: THEN

Line 3672: 2. if successful, update VAT invoice number to JAI_OM_WSH_LINES_ALL, and update

3668: IF NVL(lv_party_has_changed,jai_constants.value_false) = jai_constants.value_true -- party has changed
3669: THEN
3670: /* generate new VAT invoice number by document sequence;
3671: 1. jai_cmn_rgm_setup_pkg.Gen_Invoice_number();
3672: 2. if successful, update VAT invoice number to JAI_OM_WSH_LINES_ALL, and update
3673: table JAI_RGM_INVOICE_GEN_T (vat_invoice_no => lv_vat_invoice_number
3674: , vat_inv_gen_status => 'C');
3675: */
3676: IF lv_Debug = 'Y'

Line 3702: -- check the return status and update the JAI_OM_WSH_LINES_ALL table to set the vat invoice number

3698: IF lv_Debug = 'Y' THEN
3699: Fnd_File.PUT_LINE(Fnd_File.LOG, ' after call with lv_vat_invoice_number:' || lv_vat_invoice_number || lv_inv_gen_process_flag ||lv_inv_gen_process_message);
3700: END IF; -- lv_Debug = 'Y'
3701:
3702: -- check the return status and update the JAI_OM_WSH_LINES_ALL table to set the vat invoice number
3703: IF lv_inv_gen_process_flag = jai_constants.successful
3704: THEN
3705: IF lv_vat_invoice_number IS NOT NULL
3706: THEN

Line 3709: UPDATE JAI_OM_WSH_LINES_ALL

3705: IF lv_vat_invoice_number IS NOT NULL
3706: THEN
3707: ln_success_delivery_Ctr := NVL(ln_success_Delivery_Ctr,0) + 1;
3708: lv_inv_num_already_generated := jai_constants.value_true;
3709: UPDATE JAI_OM_WSH_LINES_ALL
3710: SET VAT_INVOICE_NO = lv_vat_invoice_number
3711: , VAT_INVOICE_DATE = nvl(ld_override_invoice_date ,sysdate)
3712: , LAST_UPDATE_DATE = sysdate
3713: , LAST_UPDATE_LOGIN = fnd_global.login_id

Line 3739: 2. update JAI_OM_WSH_LINES_ALL and JAI_RGM_INVOICE_GEN_T;

3735: END IF; -- p_process_action in (jai_constants.om_action_gen_inv_n_accnt ,jai_constants.om_action_gen_invoice)
3736:
3737: ELSE -- party not change
3738: /* 1. use existing VAT invoice number for this record;
3739: 2. update JAI_OM_WSH_LINES_ALL and JAI_RGM_INVOICE_GEN_T;
3740: */
3741: IF lv_vat_invoice_number IS NOT NULL
3742: THEN
3743: -- Update the vat_invoice_num field in JAI_OM_WSH_LINES_ALL table for the current delivery.

Line 3743: -- Update the vat_invoice_num field in JAI_OM_WSH_LINES_ALL table for the current delivery.

3739: 2. update JAI_OM_WSH_LINES_ALL and JAI_RGM_INVOICE_GEN_T;
3740: */
3741: IF lv_vat_invoice_number IS NOT NULL
3742: THEN
3743: -- Update the vat_invoice_num field in JAI_OM_WSH_LINES_ALL table for the current delivery.
3744: UPDATE JAI_OM_WSH_LINES_ALL
3745: SET vat_invoice_no = lv_vat_invoice_number,
3746: VAT_INVOICE_DATE = nvl(ld_override_invoice_date ,sysdate),
3747: last_update_date = sysdate,

Line 3744: UPDATE JAI_OM_WSH_LINES_ALL

3740: */
3741: IF lv_vat_invoice_number IS NOT NULL
3742: THEN
3743: -- Update the vat_invoice_num field in JAI_OM_WSH_LINES_ALL table for the current delivery.
3744: UPDATE JAI_OM_WSH_LINES_ALL
3745: SET vat_invoice_no = lv_vat_invoice_number,
3746: VAT_INVOICE_DATE = nvl(ld_override_invoice_date ,sysdate),
3747: last_update_date = sysdate,
3748: last_update_login = fnd_global.login_id,

Line 3809: 2. if successful, update VAT invoice number to JAI_OM_WSH_LINES_ALL, and update

3805: END IF; -- lv_party_has_changed
3806: ELSE -- single invoice number is false
3807: /* generate new VAT invoice number by document sequence;
3808: 1. jai_cmn_rgm_setup_pkg.Gen_Invoice_number();
3809: 2. if successful, update VAT invoice number to JAI_OM_WSH_LINES_ALL, and update
3810: table JAI_RGM_INVOICE_GEN_T (vat_invoice_no => lv_vat_invoice_number,
3811: vat_inv_gen_status => 'C');
3812: */
3813: IF lv_Debug = 'Y' THEN

Line 3852: UPDATE JAI_OM_WSH_LINES_ALL

3848: THEN
3849: IF lv_vat_invoice_number IS NOT NULL
3850: THEN
3851: ln_success_delivery_Ctr := NVL(ln_success_Delivery_Ctr,0) + 1;
3852: UPDATE JAI_OM_WSH_LINES_ALL
3853: SET vat_invoice_no = lv_vat_invoice_number,
3854: vat_invoice_date = nvl(ld_override_invoice_date ,sysdate),
3855: last_update_date = sysdate,
3856: last_update_login = fnd_global.login_id,

Line 3929: Fnd_File.PUT_LINE(Fnd_File.LOG, ' before updating jai_om_wsh_lines_all for ex inv num');

3925: THEN
3926: -- Excise invoice number is not null - so the same excise invoice number needs to be used as VAT invoice number
3927: IF lv_debug = 'Y' THEN
3928: Fnd_File.PUT_LINE(Fnd_File.LOG, ' Excise Invoice number - ' || lv_excise_invoice_no || ' Will be used as VAT Invoice number for non-shippable order line : ' || mainrec.order_line_id);
3929: Fnd_File.PUT_LINE(Fnd_File.LOG, ' before updating jai_om_wsh_lines_all for ex inv num');
3930: END IF; -- lv_debug = 'Y'
3931:
3932: UPDATE JAI_OM_WSH_LINES_ALL
3933: SET vat_invoice_no = lv_excise_invoice_no

Line 3932: UPDATE JAI_OM_WSH_LINES_ALL

3928: Fnd_File.PUT_LINE(Fnd_File.LOG, ' Excise Invoice number - ' || lv_excise_invoice_no || ' Will be used as VAT Invoice number for non-shippable order line : ' || mainrec.order_line_id);
3929: Fnd_File.PUT_LINE(Fnd_File.LOG, ' before updating jai_om_wsh_lines_all for ex inv num');
3930: END IF; -- lv_debug = 'Y'
3931:
3932: UPDATE JAI_OM_WSH_LINES_ALL
3933: SET vat_invoice_no = lv_excise_invoice_no
3934: , vat_invoice_date = ld_excise_invoice_date
3935: WHERE order_line_id = mainrec.order_line_id
3936: AND delivery_id IS NULL;

Line 3981: 2. if successful, update VAT invoice number to JAI_OM_WSH_LINES_ALL, and update

3977: IF NVL(lv_party_has_changed,jai_constants.value_false) = jai_constants.value_true -- party has changed
3978: THEN
3979: /* generate new VAT invoice number by document sequence;
3980: 1. jai_cmn_rgm_setup_pkg.Gen_Invoice_number();
3981: 2. if successful, update VAT invoice number to JAI_OM_WSH_LINES_ALL, and update
3982: table JAI_RGM_INVOICE_GEN_T (vat_invoice_no => lv_vat_invoice_number,
3983: vat_inv_gen_status => 'C');
3984: */
3985: IF lv_Debug = 'Y'

Line 4011: -- check the return status and update the JAI_OM_WSH_LINES_ALL table to set the vat invoice number

4007: IF lv_Debug = 'Y' THEN
4008: Fnd_File.PUT_LINE(Fnd_File.LOG, ' after call with lv_vat_invoice_number:' || lv_vat_invoice_number || lv_inv_gen_process_flag ||lv_inv_gen_process_message);
4009: END IF; -- lv_Debug = 'Y'
4010:
4011: -- check the return status and update the JAI_OM_WSH_LINES_ALL table to set the vat invoice number
4012: IF lv_inv_gen_process_flag = jai_constants.successful
4013: THEN
4014: IF lv_vat_invoice_number IS NOT NULL
4015: THEN

Line 4018: UPDATE JAI_OM_WSH_LINES_ALL

4014: IF lv_vat_invoice_number IS NOT NULL
4015: THEN
4016: ln_success_delivery_Ctr := NVL(ln_success_Delivery_Ctr,0) + 1;
4017: lv_inv_num_already_generated := jai_constants.value_true;
4018: UPDATE JAI_OM_WSH_LINES_ALL
4019: SET VAT_INVOICE_NO = lv_vat_invoice_number
4020: , VAT_INVOICE_DATE = nvl(ld_override_invoice_date ,sysdate)
4021: , LAST_UPDATE_DATE = sysdate
4022: , LAST_UPDATE_LOGIN = fnd_global.login_id

Line 4048: 2. update JAI_OM_WSH_LINES_ALL and JAI_RGM_INVOICE_GEN_T;

4044: --END IF; -- lv_inv_num_already_generated = jai_constants.value_false
4045: END IF; -- p_process_action in (jai_constants.om_action_gen_inv_n_accnt ,jai_constants.om_action_gen_invoice)
4046: ELSE -- party not change
4047: /* 1. use existing VAT invoice number for this record;
4048: 2. update JAI_OM_WSH_LINES_ALL and JAI_RGM_INVOICE_GEN_T;
4049: */
4050: IF lv_vat_invoice_number IS NOT NULL THEN
4051: -- Update the vat_invoice_num field in JAI_OM_WSH_LINES_ALL table for the current non-shippable line.
4052: UPDATE JAI_OM_WSH_LINES_ALL

Line 4051: -- Update the vat_invoice_num field in JAI_OM_WSH_LINES_ALL table for the current non-shippable line.

4047: /* 1. use existing VAT invoice number for this record;
4048: 2. update JAI_OM_WSH_LINES_ALL and JAI_RGM_INVOICE_GEN_T;
4049: */
4050: IF lv_vat_invoice_number IS NOT NULL THEN
4051: -- Update the vat_invoice_num field in JAI_OM_WSH_LINES_ALL table for the current non-shippable line.
4052: UPDATE JAI_OM_WSH_LINES_ALL
4053: SET vat_invoice_no = lv_vat_invoice_number
4054: , VAT_INVOICE_DATE = nvl(ld_override_invoice_date ,sysdate)
4055: , last_update_date = sysdate

Line 4052: UPDATE JAI_OM_WSH_LINES_ALL

4048: 2. update JAI_OM_WSH_LINES_ALL and JAI_RGM_INVOICE_GEN_T;
4049: */
4050: IF lv_vat_invoice_number IS NOT NULL THEN
4051: -- Update the vat_invoice_num field in JAI_OM_WSH_LINES_ALL table for the current non-shippable line.
4052: UPDATE JAI_OM_WSH_LINES_ALL
4053: SET vat_invoice_no = lv_vat_invoice_number
4054: , VAT_INVOICE_DATE = nvl(ld_override_invoice_date ,sysdate)
4055: , last_update_date = sysdate
4056: , last_update_login = fnd_global.login_id

Line 4080: 2. if successful, update VAT invoice number to JAI_OM_WSH_LINES_ALL, and update

4076: IF NVL(lv_order_has_changed,jai_constants.value_false) = jai_constants.value_true -- order number has changed
4077: THEN
4078: /* generate new VAT invoice number by document sequence;
4079: 1. jai_cmn_rgm_setup_pkg.Gen_Invoice_number();
4080: 2. if successful, update VAT invoice number to JAI_OM_WSH_LINES_ALL, and update
4081: table JAI_RGM_INVOICE_GEN_T (vat_invoice_no => lv_vat_invoice_number,
4082: vat_inv_gen_status => 'C');
4083: */
4084: IF lv_Debug = 'Y'

Line 4110: -- check the return status and update the JAI_OM_WSH_LINES_ALL table to set the vat invoice number

4106: IF lv_Debug = 'Y' THEN
4107: Fnd_File.PUT_LINE(Fnd_File.LOG, ' after call with lv_vat_invoice_number:' || lv_vat_invoice_number || lv_inv_gen_process_flag ||lv_inv_gen_process_message);
4108: END IF; -- lv_Debug = 'Y'
4109:
4110: -- check the return status and update the JAI_OM_WSH_LINES_ALL table to set the vat invoice number
4111: IF lv_inv_gen_process_flag = jai_constants.successful
4112: THEN
4113: IF lv_vat_invoice_number IS NOT NULL
4114: THEN

Line 4117: UPDATE JAI_OM_WSH_LINES_ALL

4113: IF lv_vat_invoice_number IS NOT NULL
4114: THEN
4115: ln_success_delivery_Ctr := NVL(ln_success_Delivery_Ctr,0) + 1;
4116: lv_inv_num_already_generated := jai_constants.value_true;
4117: UPDATE JAI_OM_WSH_LINES_ALL
4118: SET VAT_INVOICE_NO = lv_vat_invoice_number
4119: , VAT_INVOICE_DATE = nvl(ld_override_invoice_date ,sysdate)
4120: , LAST_UPDATE_DATE = sysdate
4121: , LAST_UPDATE_LOGIN = fnd_global.login_id

Line 4147: 2. update JAI_OM_WSH_LINES_ALL and JAI_RGM_INVOICE_GEN_T;

4143: --END IF; -- lv_inv_num_already_generated = jai_constants.value_false
4144: END IF; -- p_process_action in (jai_constants.om_action_gen_inv_n_accnt ,jai_constants.om_action_gen_invoice)
4145: ELSE -- order number not change
4146: /* 1. use existing VAT invoice number for this record;
4147: 2. update JAI_OM_WSH_LINES_ALL and JAI_RGM_INVOICE_GEN_T;
4148: */
4149: IF lv_vat_invoice_number IS NOT NULL THEN
4150: -- Update the vat_invoice_num field in JAI_OM_WSH_LINES_ALL table for the current delivery.
4151: UPDATE JAI_OM_WSH_LINES_ALL

Line 4150: -- Update the vat_invoice_num field in JAI_OM_WSH_LINES_ALL table for the current delivery.

4146: /* 1. use existing VAT invoice number for this record;
4147: 2. update JAI_OM_WSH_LINES_ALL and JAI_RGM_INVOICE_GEN_T;
4148: */
4149: IF lv_vat_invoice_number IS NOT NULL THEN
4150: -- Update the vat_invoice_num field in JAI_OM_WSH_LINES_ALL table for the current delivery.
4151: UPDATE JAI_OM_WSH_LINES_ALL
4152: SET vat_invoice_no = lv_vat_invoice_number
4153: , VAT_INVOICE_DATE = nvl(ld_override_invoice_date ,sysdate)
4154: , last_update_date = sysdate

Line 4151: UPDATE JAI_OM_WSH_LINES_ALL

4147: 2. update JAI_OM_WSH_LINES_ALL and JAI_RGM_INVOICE_GEN_T;
4148: */
4149: IF lv_vat_invoice_number IS NOT NULL THEN
4150: -- Update the vat_invoice_num field in JAI_OM_WSH_LINES_ALL table for the current delivery.
4151: UPDATE JAI_OM_WSH_LINES_ALL
4152: SET vat_invoice_no = lv_vat_invoice_number
4153: , VAT_INVOICE_DATE = nvl(ld_override_invoice_date ,sysdate)
4154: , last_update_date = sysdate
4155: , last_update_login = fnd_global.login_id