DBA Data[Home] [Help]

APPS.JAI_CMN_RGM_PROCESSING_PKG dependencies on JAI_CONSTANTS

Line 333: AND accnts.registration_type = jai_constants.regn_type_others

329: SELECT accnts.attribute_value
330: FROM JAI_RGM_ORG_REGNS_V accnts
331: WHERE accnts.regime_id = cp_regime_id
332: AND accnts.attribute_code = 'SERVICE_TAX_REVERSAL_TO_UPDATE'
333: AND accnts.registration_type = jai_constants.regn_type_others
334: AND accnts.organization_type = cp_organization_type
335: AND accnts.organization_id = cp_organization_id
336: AND (cp_location_id IS NULL OR location_id = cp_location_id);
337:

Line 359: OPEN c_regime_id(jai_constants.service_regime);

355:
356: lv_excise_cess := 'EXCISE-CESS';
357:
358: IF p_regime_id IS NULL THEN
359: OPEN c_regime_id(jai_constants.service_regime);
360: FETCH c_regime_id INTO ln_regime_id;
361: CLOSE c_regime_id;
362: lv_regime_code := jai_constants.service_regime;
363: ELSE

Line 362: lv_regime_code := jai_constants.service_regime;

358: IF p_regime_id IS NULL THEN
359: OPEN c_regime_id(jai_constants.service_regime);
360: FETCH c_regime_id INTO ln_regime_id;
361: CLOSE c_regime_id;
362: lv_regime_code := jai_constants.service_regime;
363: ELSE
364: ln_regime_id := p_regime_id;
365: OPEN c_regime_code(ln_regime_id);
366: FETCH c_regime_code INTO lv_regime_code;

Line 373: IF lv_regime_code = jai_constants.service_regime

369:
370:
371: lv_organization_type := p_organization_type;
372: ln_organization_id := p_organization_id;
373: IF lv_regime_code = jai_constants.service_regime
374: AND lv_organization_type = jai_constants.orgn_type_io
375: THEN
376:
377: OPEN c_orgn_tax_type_account(ln_regime_id, lv_organization_type, ln_organization_id,

Line 374: AND lv_organization_type = jai_constants.orgn_type_io

370:
371: lv_organization_type := p_organization_type;
372: ln_organization_id := p_organization_id;
373: IF lv_regime_code = jai_constants.service_regime
374: AND lv_organization_type = jai_constants.orgn_type_io
375: THEN
376:
377: OPEN c_orgn_tax_type_account(ln_regime_id, lv_organization_type, ln_organization_id,
378: p_location_id);

Line 616: WHERE regime_code = jai_constants.service_regime;

612:
613: CURSOR get_regime_cur IS
614: SELECT regime_id
615: FROM jai_rgm_definitions
616: WHERE regime_code = jai_constants.service_regime;
617:
618: CURSOR c_ar_ref_records(cp_source_document_id NUMBER, cp_source_ar VARCHAR2) IS
619: SELECT *
620: FROM jai_rgm_trx_refs rgtf

Line 630: lv_regime_code VARCHAR2(30) := jai_constants.service_regime;

626: ln_rec_total_tax_amount NUMBER;
627:
628: lv_process_message VARCHAR2(200);
629: ln_regime_id NUMBER;
630: lv_regime_code VARCHAR2(30) := jai_constants.service_regime;
631: lv_tax_type VARCHAR2(30);
632: ln_organization_id NUMBER := pn_organization_id;
633: ln_location_id NUMBER := pn_location_id;
634: ln_charge_account_id NUMBER;

Line 703: lv_account_name := jai_constants.recovery_interim;

699: CLOSE get_total_rec_amt_cur;
700: END IF;
701:
702: IF pv_action = 'REVERSAL' THEN--if reversal, assign sum of recoverable tax amount
703: lv_account_name := jai_constants.recovery_interim;
704: ln_total_amount := nvl(ln_total_rec_amount, 0);
705: ln_invoice_dist_id := lr_dist_line.invoice_distribution_id;
706: ELSE --if claim, get sum of all tax amount
707: lv_account_name := jai_constants.recovery;

Line 707: lv_account_name := jai_constants.recovery;

703: lv_account_name := jai_constants.recovery_interim;
704: ln_total_amount := nvl(ln_total_rec_amount, 0);
705: ln_invoice_dist_id := lr_dist_line.invoice_distribution_id;
706: ELSE --if claim, get sum of all tax amount
707: lv_account_name := jai_constants.recovery;
708: OPEN get_total_amt_cur;
709: FETCH get_total_amt_cur INTO ln_total_amount;
710: CLOSE get_total_amt_cur;
711: ln_invoice_dist_id := pn_claim_payment_id;

Line 716: ln_entered_amt := round(pn_adjusted_amount * ln_tax_amount/ln_total_amount, jai_constants.service_rgm_rnd_factor);

712: END IF;
713:
714: lv_tax_type := lr_dist_line.tax_type;
715: ln_tax_amount := lr_dist_line.tax_amt;
716: ln_entered_amt := round(pn_adjusted_amount * ln_tax_amount/ln_total_amount, jai_constants.service_rgm_rnd_factor);
717: ln_accounted_amt := ln_entered_amt * nvl(ln_curr_conv_rate, 1);
718:
719:
720: ln_charge_account_id := jai_cmn_rgm_recording_pkg.get_account(

Line 722: , p_organization_type => jai_constants.service_tax_orgn_type

718:
719:
720: ln_charge_account_id := jai_cmn_rgm_recording_pkg.get_account(
721: p_regime_id => ln_regime_id
722: , p_organization_type => jai_constants.service_tax_orgn_type
723: , p_organization_id => ln_organization_id
724: , p_location_id => ln_location_id
725: , p_tax_type => lv_tax_type
726: , p_account_name => lv_account_name);

Line 738: p_organization_type => jai_constants.service_tax_orgn_type,

734: IF nvl(ln_entered_amt, 0) <> 0 THEN
735: jai_cmn_rgm_recording_pkg.post_accounting(
736: p_regime_code => lv_regime_code,
737: p_tax_type => lv_tax_type,
738: p_organization_type => jai_constants.service_tax_orgn_type,
739: p_organization_id => ln_organization_id,
740: p_source => jai_constants.source_ap,
741: p_source_trx_type => lv_source_trx_type,
742: p_source_table_name => lv_source_table,

Line 740: p_source => jai_constants.source_ap,

736: p_regime_code => lv_regime_code,
737: p_tax_type => lv_tax_type,
738: p_organization_type => jai_constants.service_tax_orgn_type,
739: p_organization_id => ln_organization_id,
740: p_source => jai_constants.source_ap,
741: p_source_trx_type => lv_source_trx_type,
742: p_source_table_name => lv_source_table,
743: p_source_document_id => ln_invoice_dist_id,
744: p_code_combination_id => ln_charge_account_id,

Line 768: , p_organization_type => jai_constants.service_tax_orgn_type

764: --Changed by Qiong for POT reversal begin
765: ------------------------------------------------------------------
766: lv_account_name := jai_cmn_rgm_processing_pkg.get_reversal_account_name(
767: p_regime_id => ln_regime_id
768: , p_organization_type => jai_constants.service_tax_orgn_type
769: , p_organization_id => ln_organization_id
770: , p_location_id => ln_location_id);
771: --lv_account_name := jai_constants.recovery;
772: -------------------------------------------------------------------

Line 771: --lv_account_name := jai_constants.recovery;

767: p_regime_id => ln_regime_id
768: , p_organization_type => jai_constants.service_tax_orgn_type
769: , p_organization_id => ln_organization_id
770: , p_location_id => ln_location_id);
771: --lv_account_name := jai_constants.recovery;
772: -------------------------------------------------------------------
773: --Changed by Qiong for POT reversal End
774: -- code ported from BL12.1.3 by zhiwei.xin on 23-JAN-2013 end.
775: ELSE -- 'CLAIM'

Line 776: lv_account_name := jai_constants.recovery_interim;

772: -------------------------------------------------------------------
773: --Changed by Qiong for POT reversal End
774: -- code ported from BL12.1.3 by zhiwei.xin on 23-JAN-2013 end.
775: ELSE -- 'CLAIM'
776: lv_account_name := jai_constants.recovery_interim;
777: END IF;
778:
779: ln_charge_account_id := jai_cmn_rgm_recording_pkg.get_account(
780: p_regime_id => ln_regime_id

Line 781: , p_organization_type => jai_constants.service_tax_orgn_type

777: END IF;
778:
779: ln_charge_account_id := jai_cmn_rgm_recording_pkg.get_account(
780: p_regime_id => ln_regime_id
781: , p_organization_type => jai_constants.service_tax_orgn_type
782: , p_organization_id => ln_organization_id
783: , p_location_id => ln_location_id
784: , p_tax_type => lv_tax_type
785: , p_account_name => lv_account_name);

Line 795: p_organization_type => jai_constants.service_tax_orgn_type,

791: END IF;
792: jai_cmn_rgm_recording_pkg.post_accounting(
793: p_regime_code => lv_regime_code,
794: p_tax_type => lv_tax_type,
795: p_organization_type => jai_constants.service_tax_orgn_type,
796: p_organization_id => ln_organization_id,
797: p_source => jai_constants.source_ap,
798: p_source_trx_type => lv_source_trx_type,
799: p_source_table_name => lv_source_table,

Line 797: p_source => jai_constants.source_ap,

793: p_regime_code => lv_regime_code,
794: p_tax_type => lv_tax_type,
795: p_organization_type => jai_constants.service_tax_orgn_type,
796: p_organization_id => ln_organization_id,
797: p_source => jai_constants.source_ap,
798: p_source_trx_type => lv_source_trx_type,
799: p_source_table_name => lv_source_table,
800: p_source_document_id => ln_invoice_dist_id,
801: p_code_combination_id => ln_charge_account_id,

Line 843: lv_account_name := jai_constants.liability;

839: ln_invoice_dist_id := service_tax_rec.customer_trx_line_id;
840: ln_tax_amount := service_tax_rec.tax_amt;
841:
842: IF pv_action = 'REVERSAL' THEN --if reversal, assign sum of recoverable tax amount
843: lv_account_name := jai_constants.liability;
844: OPEN get_total_arrec_amt_cur;
845: FETCH get_total_arrec_amt_cur INTO ln_total_amount;
846: CLOSE get_total_arrec_amt_cur;
847:

Line 849: lv_account_name := jai_constants.reversal;

845: FETCH get_total_arrec_amt_cur INTO ln_total_amount;
846: CLOSE get_total_arrec_amt_cur;
847:
848: ELSE --if claim, get sum of all tax amount
849: lv_account_name := jai_constants.reversal;
850: OPEN get_total_ar_amt_cur;
851: FETCH get_total_ar_amt_cur INTO ln_total_amount;
852: CLOSE get_total_ar_amt_cur;
853: END IF;

Line 856: ln_entered_amt := round(pn_adjusted_amount * ln_tax_amount/ln_total_amount, jai_constants.service_rgm_rnd_factor);

852: CLOSE get_total_ar_amt_cur;
853: END IF;
854:
855:
856: ln_entered_amt := round(pn_adjusted_amount * ln_tax_amount/ln_total_amount, jai_constants.service_rgm_rnd_factor);
857: ln_accounted_amt := ln_entered_amt * nvl(lr_ref_records.curr_conv_rate, 1);
858:
859: ln_charge_account_id := jai_cmn_rgm_recording_pkg.get_account(
860: p_regime_id => ln_regime_id

Line 861: , p_organization_type => jai_constants.service_tax_orgn_type

857: ln_accounted_amt := ln_entered_amt * nvl(lr_ref_records.curr_conv_rate, 1);
858:
859: ln_charge_account_id := jai_cmn_rgm_recording_pkg.get_account(
860: p_regime_id => ln_regime_id
861: , p_organization_type => jai_constants.service_tax_orgn_type
862: , p_organization_id => ln_organization_id
863: , p_location_id => ln_location_id
864: , p_tax_type => lv_tax_type
865: , p_account_name => lv_account_name);

Line 875: p_organization_type => jai_constants.service_tax_orgn_type,

871: END IF;
872: jai_cmn_rgm_recording_pkg.post_accounting(
873: p_regime_code => lv_regime_code,
874: p_tax_type => lv_tax_type,
875: p_organization_type => jai_constants.service_tax_orgn_type,
876: p_organization_id => ln_organization_id,
877: p_source => jai_constants.source_ar,
878: p_source_trx_type => lv_source_trx_type,
879: p_source_table_name => 'CUSTOMER_TRX_LINE_ALL',

Line 877: p_source => jai_constants.source_ar,

873: p_regime_code => lv_regime_code,
874: p_tax_type => lv_tax_type,
875: p_organization_type => jai_constants.service_tax_orgn_type,
876: p_organization_id => ln_organization_id,
877: p_source => jai_constants.source_ar,
878: p_source_trx_type => lv_source_trx_type,
879: p_source_table_name => 'CUSTOMER_TRX_LINE_ALL',
880: p_source_document_id => ln_invoice_dist_id,
881: p_code_combination_id => ln_charge_account_id,

Line 900: lv_account_name := jai_constants.reversal;

896: p_curr_conv_rate => nvl(lr_ref_records.curr_conv_rate, ln_curr_conv_rate)
897: );
898:
899: IF pv_action = 'REVERSAL' THEN
900: lv_account_name := jai_constants.reversal;
901: ELSE -- 'CLAIM'
902: lv_account_name := jai_constants.liability;
903: END IF;
904:

Line 902: lv_account_name := jai_constants.liability;

898:
899: IF pv_action = 'REVERSAL' THEN
900: lv_account_name := jai_constants.reversal;
901: ELSE -- 'CLAIM'
902: lv_account_name := jai_constants.liability;
903: END IF;
904:
905: ln_charge_account_id := jai_cmn_rgm_recording_pkg.get_account(
906: p_regime_id => ln_regime_id

Line 907: , p_organization_type => jai_constants.service_tax_orgn_type

903: END IF;
904:
905: ln_charge_account_id := jai_cmn_rgm_recording_pkg.get_account(
906: p_regime_id => ln_regime_id
907: , p_organization_type => jai_constants.service_tax_orgn_type
908: , p_organization_id => ln_organization_id
909: , p_location_id => ln_location_id
910: , p_tax_type => lv_tax_type
911: , p_account_name => lv_account_name);

Line 921: p_organization_type => jai_constants.service_tax_orgn_type,

917: END IF;
918: jai_cmn_rgm_recording_pkg.post_accounting(
919: p_regime_code => lv_regime_code,
920: p_tax_type => lv_tax_type,
921: p_organization_type => jai_constants.service_tax_orgn_type,
922: p_organization_id => ln_organization_id,
923: p_source => jai_constants.source_ar,
924: p_source_trx_type => lv_source_trx_type,
925: p_source_table_name => 'CUSTOMER_TRX_LINE_ALL',

Line 923: p_source => jai_constants.source_ar,

919: p_regime_code => lv_regime_code,
920: p_tax_type => lv_tax_type,
921: p_organization_type => jai_constants.service_tax_orgn_type,
922: p_organization_id => ln_organization_id,
923: p_source => jai_constants.source_ar,
924: p_source_trx_type => lv_source_trx_type,
925: p_source_table_name => 'CUSTOMER_TRX_LINE_ALL',
926: p_source_document_id => ln_invoice_dist_id,
927: p_code_combination_id => ln_charge_account_id,

Line 1153: IF p_inv_accounting_chk_done = jai_constants.no THEN

1149: CLOSE c_get_curr_dtls;
1150: -- Bug 7522584 End
1151:
1152: -- Accounting check for the invoice_distribution, whether it is accounted or not
1153: IF p_inv_accounting_chk_done = jai_constants.no THEN
1154: OPEN c_invoice_distribution(p_inv_dist_id);
1155: FETCH c_invoice_distribution INTO r_dist;
1156: CLOSE c_invoice_distribution;
1157:

Line 1168: p_process_flag := jai_constants.not_accounted;

1164: IF g_debug='Y' THEN
1165: fnd_file.put_line(fnd_file.log,'AccntChkFail. InvId,LineNum,DisNum:'||r_dist.invoice_id||','
1166: ||r_dist.invoice_line_number||','||r_dist.distribution_line_number);
1167: END IF;
1168: p_process_flag := jai_constants.not_accounted;
1169: --p_process_message := 'Invoice is not accounted';
1170: RETURN;
1171: END IF;
1172:

Line 1186: p_process_flag := jai_constants.already_processed;

1182: RETURN;
1183: -- if the following is satisfied then it means this is a reversal of a parent line which is processed and hence should return back
1184: ELSIF r_ref.reversal_flag = 'Y' THEN
1185: lv_codepath := jai_general_pkg.plot_codepath(5, lv_codepath);
1186: p_process_flag := jai_constants.already_processed;
1187: RETURN;
1188: END IF;
1189:
1190: IF g_debug='Y' THEN fnd_file.put_line(fnd_file.log,'ProPay.r_ref:'||r_ref.reference_id||',taxty:'||r_ref.tax_type); END IF;

Line 1199: p_process_flag := jai_constants.already_processed;

1195:
1196: -- if the following is satisfied, then it means the payment against the invoice is already processed
1197: IF ln_rgm_reposotory_id IS NOT NULL THEN
1198: lv_codepath := jai_general_pkg.plot_codepath(6, lv_codepath);
1199: p_process_flag := jai_constants.already_processed;
1200: RETURN;
1201: END IF;
1202:
1203: lv_codepath := jai_general_pkg.plot_codepath(7, lv_codepath);

Line 1211: IF p_payment_table_name = jai_constants.ap_payments THEN

1207: FETCH c_invoice_distribution INTO r_dist;
1208: CLOSE c_invoice_distribution;
1209: END IF;
1210:
1211: IF p_payment_table_name = jai_constants.ap_payments THEN
1212:
1213: lv_codepath := jai_general_pkg.plot_codepath(8, lv_codepath);
1214: OPEN c_invoice_payment(p_payment_document_id);
1215: FETCH c_invoice_payment INTO r_payment;

Line 1234: lv_src_trx_type := jai_constants.future_payment;

1230: -- To Derive Src Trx Type and Transaction Date for Normal Payment
1231: IF r_payment.amount > 0 THEN
1232: IF r_payment.future_pay_due_date IS NOT NULL THEN
1233: lv_codepath := jai_general_pkg.plot_codepath(10, lv_codepath);
1234: lv_src_trx_type := jai_constants.future_payment;
1235: ld_transaction_date := r_payment.future_pay_due_date;
1236: ELSE
1237: lv_codepath := jai_general_pkg.plot_codepath(11, lv_codepath);
1238: lv_src_trx_type := jai_constants.payment;

Line 1238: lv_src_trx_type := jai_constants.payment;

1234: lv_src_trx_type := jai_constants.future_payment;
1235: ld_transaction_date := r_payment.future_pay_due_date;
1236: ELSE
1237: lv_codepath := jai_general_pkg.plot_codepath(11, lv_codepath);
1238: lv_src_trx_type := jai_constants.payment;
1239: ld_transaction_date := r_payment.check_date;
1240: END IF;
1241:
1242: -- Void Case

Line 1246: lv_src_trx_type := jai_constants.payment_voided;

1242: -- Void Case
1243: ELSE
1244: IF r_payment.void_date IS NOT NULL THEN
1245: lv_codepath := jai_general_pkg.plot_codepath(12, lv_codepath);
1246: lv_src_trx_type := jai_constants.payment_voided;
1247: ld_transaction_date := r_payment.void_date;
1248: ELSE
1249: lv_codepath := jai_general_pkg.plot_codepath(13, lv_codepath);
1250: lv_src_trx_type := jai_constants.payment_reversal;

Line 1250: lv_src_trx_type := jai_constants.payment_reversal;

1246: lv_src_trx_type := jai_constants.payment_voided;
1247: ld_transaction_date := r_payment.void_date;
1248: ELSE
1249: lv_codepath := jai_general_pkg.plot_codepath(13, lv_codepath);
1250: lv_src_trx_type := jai_constants.payment_reversal;
1251: ld_transaction_date := r_payment.check_date;
1252: END IF;
1253: END IF;
1254:

Line 1255: ELSIF p_payment_table_name = jai_constants.ap_prepayments THEN

1251: ld_transaction_date := r_payment.check_date;
1252: END IF;
1253: END IF;
1254:
1255: ELSIF p_payment_table_name = jai_constants.ap_prepayments THEN
1256:
1257: lv_codepath := jai_general_pkg.plot_codepath(14, lv_codepath);
1258: OPEN c_invoice_distribution(p_payment_document_id);
1259: FETCH c_invoice_distribution INTO r_prepayment;

Line 1271: lv_src_trx_type := jai_constants.prepay_unapplication;

1267:
1268: -- if the following condition is satisfied, then it means a prepayment unapplication onto invoice
1269: IF r_prepayment.parent_reversal_id IS NOT NULL THEN
1270: lv_codepath := jai_general_pkg.plot_codepath(15, lv_codepath);
1271: lv_src_trx_type := jai_constants.prepay_unapplication;
1272: ELSE
1273: lv_codepath := jai_general_pkg.plot_codepath(16, lv_codepath);
1274: lv_src_trx_type := jai_constants.prepay_application;
1275: END IF;

Line 1274: lv_src_trx_type := jai_constants.prepay_application;

1270: lv_codepath := jai_general_pkg.plot_codepath(15, lv_codepath);
1271: lv_src_trx_type := jai_constants.prepay_unapplication;
1272: ELSE
1273: lv_codepath := jai_general_pkg.plot_codepath(16, lv_codepath);
1274: lv_src_trx_type := jai_constants.prepay_application;
1275: END IF;
1276:
1277: END IF;
1278:

Line 1301: ELSIF lv_src_trx_type = jai_constants.payment_voided THEN

1297: ln_recovered_amount := -r_parent_ref.recovered_amount;
1298: ln_discounted_amount := -r_parent_ref.discounted_amount;
1299:
1300: -- following elsif is added to take care of void scenarios, where in the recovered amt againt the main payment is reversed
1301: ELSIF lv_src_trx_type = jai_constants.payment_voided THEN
1302:
1303: lv_codepath := jai_general_pkg.plot_codepath(18, lv_codepath);
1304: OPEN c_repo_recovered_amt(p_source, p_payment_table_name, r_payment.reversal_inv_pmt_id, r_ref.reference_id);
1305: FETCH c_repo_recovered_amt INTO ln_parent_recovered_amt;

Line 1317: ELSIF lv_src_trx_type = jai_constants.prepay_unapplication THEN

1313:
1314: ln_discounted_amount := -ln_parent_recovered_amt * ( nvl(r_payment.discount_taken,0)/nvl(r_payment.amount,1) );
1315:
1316: -- following elsif is added to take care of Prepay Unapply scenarios, where in the recovered amt againt the main payment is reversed
1317: ELSIF lv_src_trx_type = jai_constants.prepay_unapplication THEN
1318: lv_codepath := jai_general_pkg.plot_codepath(20, lv_codepath);
1319: OPEN c_repo_recovered_amt(p_source, p_payment_table_name, r_prepayment.parent_reversal_id, r_ref.reference_id);
1320: FETCH c_repo_recovered_amt INTO ln_parent_recovered_amt;
1321: CLOSE c_repo_recovered_amt;

Line 1398: IF lv_process_flag <> jai_constants.successful THEN

1394: p_service_type_code => lv_service_type_code,
1395: p_process_flag => lv_process_flag,
1396: p_process_message => lv_process_message
1397: );
1398: IF lv_process_flag <> jai_constants.successful THEN
1399: lv_codepath := jai_general_pkg.plot_codepath(27.1, lv_codepath);
1400: FND_FILE.put_line(fnd_file.log, 'Error Flag:'||lv_process_flag||' Error Message:'||lv_process_message);
1401: return;
1402: END IF;

Line 1424: p_organization_type => jai_constants.orgn_type_io ,/*5694855*/

1420: jai_cmn_rgm_recording_pkg.insert_repository_entry(
1421: p_repository_id => ln_rgm_reposotory_id,
1422: p_regime_id => p_regime_id,
1423: p_tax_type => r_ref.tax_type,
1424: p_organization_type => jai_constants.orgn_type_io ,/*5694855*/
1425: p_organization_id => ln_organization_id ,/*5694855*/
1426: p_location_id => ln_location_id,/*5694855*/
1427: p_service_type_code => lv_service_type_code,/*5694855*/
1428: p_source => p_source,

Line 1447: p_accntg_required_flag => jai_constants.yes,

1443: p_batch_id => p_batch_id,
1444: p_called_from => lv_called_from, --rchandan for bug#4428980
1445: p_process_flag => p_process_flag,
1446: p_process_message => p_process_message,
1447: p_accntg_required_flag => jai_constants.yes,
1448: p_accounting_date => ld_accounting_date,
1449: p_balancing_orgn_type => null,
1450: p_balancing_orgn_id => null,
1451: p_balancing_location_id => null,

Line 1461: IF p_process_flag <> jai_constants.successful THEN

1457: p_curr_conv_type => nvl(r_payment.exchange_rate_type,rec_get_curr_dtls.exchange_rate_type), -- Added for Bug 7522584
1458: p_curr_conv_rate => nvl(r_payment.exchange_rate,rec_get_curr_dtls.exchange_rate) -- Added for Bug 7522584
1459: );
1460:
1461: IF p_process_flag <> jai_constants.successful THEN
1462: lv_codepath := jai_general_pkg.plot_codepath(28, lv_codepath);
1463: RETURN;
1464: END IF;
1465:

Line 1473: p_organization_type => jai_constants.orgn_type_io ,

1469: jai_cmn_rgm_recording_pkg.exc_gain_loss_accounting(
1470: p_repository_id => ln_rgm_reposotory_id ,
1471: p_regime_id => p_regime_id ,
1472: p_tax_type => r_ref.tax_type ,
1473: p_organization_type => jai_constants.orgn_type_io ,
1474: p_organization_id => ln_organization_id ,
1475: p_location_id => ln_location_id ,
1476: p_source => p_source ,
1477: p_source_trx_type => lv_src_trx_type ,

Line 1492: IF lv_process_flag = jai_constants.expected_error OR

1488: p_process_message => lv_process_message ,
1489: p_accounting_date => ld_accounting_date
1490: );
1491:
1492: IF lv_process_flag = jai_constants.expected_error OR
1493: lv_process_flag = jai_constants.unexpected_error
1494: THEN
1495: p_process_flag := lv_process_flag ;
1496: p_process_message := lv_process_message ;

Line 1493: lv_process_flag = jai_constants.unexpected_error

1489: p_accounting_date => ld_accounting_date
1490: );
1491:
1492: IF lv_process_flag = jai_constants.expected_error OR
1493: lv_process_flag = jai_constants.unexpected_error
1494: THEN
1495: p_process_flag := lv_process_flag ;
1496: p_process_message := lv_process_message ;
1497: fnd_file.put_line( fnd_file.log, 'error in call to jai_rgm_trx_recording_pkg.exc_gain_loss_accounting - lv_process_flag '||lv_process_flag

Line 1521: p_process_flag := jai_constants.unexpected_error;

1517: FND_FILE.put_line( fnd_file.log, 'Codepath:'||lv_codepath);
1518: END IF;
1519: EXCEPTION
1520: WHEN OTHERS THEN
1521: p_process_flag := jai_constants.unexpected_error;
1522: p_process_message := 'Process Payment Error:'||SQLERRM;
1523: FND_FILE.put_line( fnd_file.log, p_process_message);
1524: FND_FILE.put_line( fnd_file.log, 'Error Codepath:'||lv_codepath);
1525:

Line 1558: AND registration_type = jai_constants.regn_type_others

1554: CURSOR c_regime_orgs(cp_regime_id IN NUMBER, cp_orgn_type IN VARCHAR2, cp_registration_num IN VARCHAR2,p_att_type_code jai_rgm_registrations.attribute_type_code%TYPE,cp_organization_id IN NUMBER ) IS/*Bug 5879769 bduvarag*/
1555: SELECT a.organization_id org_id,a.location_id /*Bug 5879769 bduvarag*/
1556: FROM JAI_RGM_ORG_REGNS_V a
1557: WHERE regime_id = cp_regime_id
1558: AND registration_type = jai_constants.regn_type_others
1559: AND attribute_type_code = p_att_type_code--rchandan for bug#4428980
1560: AND organization_type = cp_orgn_type
1561: AND attribute_value = cp_registration_num
1562: AND a.organization_id = nvl(cp_organization_id,a.organization_id) /*5694855*/;

Line 1623: retcode := jai_constants.request_error;

1619:
1620: FND_FILE.put_line(fnd_file.log, 'Start Date('||to_char(p_trx_from_Date,'DD-MON-YYYY')
1621: ||') of Transaction Processing cannot be less than Regime Effective Date('||to_char(ld_rgm_effective_from,'DD-MON-YYYY')||')'
1622: );
1623: retcode := jai_constants.request_error;
1624:
1625: RETURN;
1626:
1627: END IF;

Line 1631: FOR loop_io IN c_regime_orgs(p_regime_id, jai_constants.orgn_type_io, p_rgm_registration_num,'PRIMARY',p_organization_id) LOOP/*Bug 5879769 bduvarag*/

1627: END IF;
1628:
1629: ld_trx_start_date := p_trx_from_date;
1630:
1631: FOR loop_io IN c_regime_orgs(p_regime_id, jai_constants.orgn_type_io, p_rgm_registration_num,'PRIMARY',p_organization_id) LOOP/*Bug 5879769 bduvarag*/
1632:
1633: /* start changes by ssumaith - code review comments - bug# 6109941*/
1634: OPEN cur_fetch_ou(loop_io.org_id);
1635: FETCH cur_fetch_ou INTO ln_org_id;

Line 1640: fnd_file.put_line(fnd_file.log,'P_organization_type :' || jai_constants.orgn_type_io);

1636: CLOSE cur_fetch_ou;
1637: /* ends additions by ssumaith - bug#6109941*/
1638:
1639: /*Added by nprashar for bug # 6636517*/
1640: fnd_file.put_line(fnd_file.log,'P_organization_type :' || jai_constants.orgn_type_io);
1641: fnd_file.put_line(fnd_file.log,'P_organization_id :' ||ln_org_id);
1642: fnd_file.put_line(fnd_file.log,'P_Location_id :' ||loop_io.location_id); /*Ends here for bug #6636517*/
1643: /***************** Processing of AP Start Here *********************/
1644: process_payments(

Line 1646: p_organization_type => jai_constants.orgn_type_io, /* ssumaith - bug# 6109941 */

1642: fnd_file.put_line(fnd_file.log,'P_Location_id :' ||loop_io.location_id); /*Ends here for bug #6636517*/
1643: /***************** Processing of AP Start Here *********************/
1644: process_payments(
1645: p_regime_id => p_regime_id,
1646: p_organization_type => jai_constants.orgn_type_io, /* ssumaith - bug# 6109941 */
1647: p_organization_id => loop_io.org_id,/*5694855*/ /* ssumaith 6109941 */
1648: p_trx_from_date => ld_trx_start_date,
1649: p_trx_to_date => p_trx_till_date,
1650: p_org_id => ln_org_id,

Line 1657: IF lv_process_flag IN (jai_constants.expected_error, jai_constants.unexpected_error) THEN

1653: p_process_flag => lv_process_flag,
1654: p_process_message => lv_process_message
1655: );
1656:
1657: IF lv_process_flag IN (jai_constants.expected_error, jai_constants.unexpected_error) THEN
1658: GOTO end_of_batch;
1659: END IF;
1660:
1661: /***************** Processing of AR Start Here *********************/

Line 1664: p_organization_type => jai_constants.orgn_type_io,

1660:
1661: /***************** Processing of AR Start Here *********************/
1662: jai_ar_rgm_processing_pkg.process_records(
1663: p_regime_id => p_regime_id,
1664: p_organization_type => jai_constants.orgn_type_io,
1665: p_organization_id => loop_io.org_id ,/*5694855*/
1666: p_from_date => ld_trx_start_date,
1667: p_to_date => p_trx_till_date,
1668: p_org_id => ln_org_id,

Line 1674: IF lv_process_flag IN (jai_constants.expected_error, jai_constants.unexpected_error) THEN

1670: p_process_flag => lv_process_flag,
1671: p_process_message => lv_process_message
1672: );
1673:
1674: IF lv_process_flag IN (jai_constants.expected_error, jai_constants.unexpected_error) THEN
1675: GOTO end_of_batch;
1676: END IF;
1677:
1678: END LOOP; -- Operating Units loop of Registration Number

Line 1682: IF lv_process_flag IN (jai_constants.expected_error, jai_constants.unexpected_error) THEN

1678: END LOOP; -- Operating Units loop of Registration Number
1679:
1680: <>
1681:
1682: IF lv_process_flag IN (jai_constants.expected_error, jai_constants.unexpected_error) THEN
1683: FND_FILE.put_line( FND_FILE.log, 'Problem Message:'||lv_process_message);
1684: fnd_file.put_line(fnd_file.log,'Problem Message:'||lv_process_message);
1685: retcode := jai_constants.request_warning;
1686: errbuf := lv_process_message;

Line 1685: retcode := jai_constants.request_warning;

1681:
1682: IF lv_process_flag IN (jai_constants.expected_error, jai_constants.unexpected_error) THEN
1683: FND_FILE.put_line( FND_FILE.log, 'Problem Message:'||lv_process_message);
1684: fnd_file.put_line(fnd_file.log,'Problem Message:'||lv_process_message);
1685: retcode := jai_constants.request_warning;
1686: errbuf := lv_process_message;
1687: END IF;
1688:
1689: -- FINAL Commit to permanently save the transactions

Line 1695: retcode := jai_constants.request_error;

1691:
1692: EXCEPTION
1693: WHEN OTHERS THEN
1694: ROLLBACK;
1695: retcode := jai_constants.request_error;
1696: errbuf := 'Unexpected Error Occured:'||SQLERRM;
1697: FND_FILE.put_line( fnd_file.log, 'Unexpected Error Occured:'||SQLERRM);
1698:
1699: END process_batch;

Line 1863: AND ( aid.line_type_lookup_code = jai_constants.misc_line

1859: AND aid.invoice_id = ai.invoice_id
1860: and aid.accounting_event_id = xah.event_id
1861: AND ai.invoice_type_lookup_code IN (lv_standard_lookup, lv_debit_lookup,lv_credit_lookup) --lv_credit_lookup is added by Eric Ma for bug#10376849 on 14-Dec-2010
1862: --AND ai.cancelled_date IS NULL --Commented out by Xiao, for POT cancellation, reg bug#12533434
1863: AND ( aid.line_type_lookup_code = jai_constants.misc_line
1864: or exists (select 1 from jai_rcv_tp_invoices jtp where AID.invoice_id = jtp.invoice_id)) /* modified by vumaasha for bug 8965721 */
1865: AND aid.posted_flag = 'Y'
1866: /*bug 7347127 - moved the trunc in following 2 expressions to the RHS, so that
1867: * the indec on accounting_date would be used in the two tables. In some cases,

Line 1913: AND line_type_lookup_code = jai_constants.prepay_line

1909: invoice_line_number ,/*Bug 12805386*/
1910: po_distribution_id /*Bug 12805386*/
1911: FROM ap_invoice_distributions_all
1912: WHERE org_id = p_org_id
1913: AND line_type_lookup_code = jai_constants.prepay_line
1914: AND invoice_id IN ( SELECT invoice_id
1915: FROM ap_invoice_distributions_all
1916: WHERE po_distribution_id IN ( SELECT pda.po_distribution_id
1917: FROM po_line_locations_all pll,

Line 1974: a.line_type_lookup_code = jai_constants.misc_line -- <> 'PREPAY'

1970: /*Added the below or condition for bug#11666653*/
1971: AND (
1972: (a.line_type_lookup_code <> 'PREPAY' And exists (select '1' from jai_rcv_tp_invoices where invoice_id=a.invoice_id))
1973: OR
1974: a.line_type_lookup_code = jai_constants.misc_line -- <> 'PREPAY'
1975: )
1976:
1977: AND b.source = jai_constants.source_ap
1978: and b.invoice_id = a.invoice_id

Line 1977: AND b.source = jai_constants.source_ap

1973: OR
1974: a.line_type_lookup_code = jai_constants.misc_line -- <> 'PREPAY'
1975: )
1976:
1977: AND b.source = jai_constants.source_ap
1978: and b.invoice_id = a.invoice_id
1979: and b.line_id = a.invoice_distribution_id
1980: ORDER BY a.invoice_distribution_id;
1981:

Line 1993: and c.registration_type = jai_constants.regn_type_tax_types

1989: AND a.invoice_distribution_id = cp_inv_distribution_id
1990: AND a.tax_id = b.tax_id
1991: AND b.tax_type = c.attribute_code
1992: and c.regime_id = cp_regime_id
1993: and c.registration_type = jai_constants.regn_type_tax_types
1994: -- 5763527, modified and condition as below
1995: AND ( mod_cr_percentage > 0 and mod_cr_percentage <= 100 and nvl(recoverable_flag,'Y') <> 'N')
1996: -- Added by qiong for Reverse Charge code port begin
1997: UNION

Line 2020: and rgm.registration_type = jai_constants.regn_type_tax_types

2016: AND match_tax.parent_invoice_distribution_id IS NOT NULL
2017: AND tax.reverse_charge_flag = 'Y'
2018: AND tax.tax_type = rgm.attribute_code
2019: and rgm.regime_id = cp_regime_id
2020: and rgm.registration_type = jai_constants.regn_type_tax_types
2021: -- Added by Qiong for Reverse Charge code port begin
2022: UNION --Added this union for bug#8943349 by JMEENA
2023: SELECT 2 chk, a.tax_id, b.tax_rate, a.tax_amt,null, b.tax_type,
2024: /*Bug 9854974 - Item Line ID in JAI_RGM_TRX_REFS should refer to the Item Line to which Service Tax is attached

Line 2037: and c.registration_type = jai_constants.regn_type_tax_types

2033: AND d.invoice_line_number = a.source_doc_line_id
2034: AND a.tax_id = b.tax_id
2035: AND b.tax_type = c.attribute_code
2036: and c.regime_id = cp_regime_id
2037: and c.registration_type = jai_constants.regn_type_tax_types
2038: AND ( mod_cr_percentage > 0 and mod_cr_percentage <= 100 and nvl(modvat_flag,'Y') <> 'N')
2039: -- Added by Qiong for Reverse Charge Code port begin
2040: UNION
2041: SELECT 2 chk, b.tax_id,

Line 2066: And c.registration_type = jai_constants.regn_type_tax_types;

2062: AND a.tax_id = b.tax_id
2063: AND b.reverse_charge_flag = 'Y'
2064: AND b.tax_type = c.attribute_code
2065: And c.regime_id = cp_regime_id
2066: And c.registration_type = jai_constants.regn_type_tax_types;
2067: -- Added by Qiong for Reverse Charge Code port End
2068:
2069:
2070: -- AND b.mod_cr_percentage > 0;

Line 2085: AND d.registration_type = jai_constants.regn_type_tax_types

2081: AND a.tax_id = b.tax_id
2082: AND a.line_number = cp_line_number /*INVOICE LINES UPTAKE cp_dist_line_number */
2083: AND b.tax_type = attribute_code
2084: and d.regime_id = cp_regime_id
2085: AND d.registration_type = jai_constants.regn_type_tax_types
2086: AND b.mod_cr_percentage > 0
2087: /*start additions for bug#10085619
2088: ,the below union clause will fetch the misc lines attached to the TP invoice**/
2089: UNION

Line 2102: and c.registration_type = jai_constants.regn_type_tax_types

2098: AND d.invoice_line_number = a.source_doc_line_id
2099: AND a.tax_id = b.tax_id
2100: AND b.tax_type = c.attribute_code
2101: and c.regime_id = cp_regime_id
2102: and c.registration_type = jai_constants.regn_type_tax_types
2103: AND ( nvl(mod_cr_percentage,0) > 0 and nvl(modvat_flag,'Y') <> 'N')
2104: /* Added below union by Avanija for bug 16246654 */
2105: union
2106: SELECT 2 chk, b.tax_id,

Line 2131: And c.registration_type = jai_constants.regn_type_tax_types;

2127: AND a.tax_id = b.tax_id
2128: AND b.reverse_charge_flag = 'Y'
2129: AND b.tax_type = c.attribute_code
2130: And c.regime_id = cp_regime_id
2131: And c.registration_type = jai_constants.regn_type_tax_types;
2132:
2133:
2134:
2135:

Line 2158: where source = jai_constants.source_ap

2154: AND a.creation_date < cp_start_date
2155: AND nvl(b.future_pay_due_date, v_today) <= v_today
2156: AND a.amount <> 0 /* ssumaith bug# 6104491 */
2157: AND a.invoice_payment_id NOT IN (select source_document_id from jai_rgm_trx_records -- CHK is this required
2158: where source = jai_constants.source_ap
2159: and source_table_name = jai_constants.ap_payments
2160: and source_document_id = a.invoice_payment_id
2161: )
2162: ORDER BY invoice_payment_id;

Line 2159: and source_table_name = jai_constants.ap_payments

2155: AND nvl(b.future_pay_due_date, v_today) <= v_today
2156: AND a.amount <> 0 /* ssumaith bug# 6104491 */
2157: AND a.invoice_payment_id NOT IN (select source_document_id from jai_rgm_trx_records -- CHK is this required
2158: where source = jai_constants.source_ap
2159: and source_table_name = jai_constants.ap_payments
2160: and source_document_id = a.invoice_payment_id
2161: )
2162: ORDER BY invoice_payment_id;
2163:

Line 2236: AND ( ainvd.line_type_lookup_code = jai_constants.misc_line

2232: -- and aia.source='Manual Invoice Entry' /*commented the condition by vkaranam for bug#12360337*/
2233: and jail.organization_id = p_organization_id
2234: )/*5694855*/
2235:
2236: AND ( ainvd.line_type_lookup_code = jai_constants.misc_line
2237: /* modified by vumaasha for bug 8965721 */
2238: OR exists (select 1 from jai_rcv_tp_invoices jtp where jtp.invoice_id=ainvd.invoice_id ) )
2239: AND jrtr.source = jai_constants.source_ap
2240: AND jrtr.invoice_id = ainvd.invoice_id

Line 2239: AND jrtr.source = jai_constants.source_ap

2235:
2236: AND ( ainvd.line_type_lookup_code = jai_constants.misc_line
2237: /* modified by vumaasha for bug 8965721 */
2238: OR exists (select 1 from jai_rcv_tp_invoices jtp where jtp.invoice_id=ainvd.invoice_id ) )
2239: AND jrtr.source = jai_constants.source_ap
2240: AND jrtr.invoice_id = ainvd.invoice_id
2241: AND apinvp.invoice_id = ainvd.invoice_id --added by csahoo for bug#6436576
2242: AND jrtr.line_id = ainvd.invoice_distribution_id
2243: ORDER BY

Line 2263: WHERE source = jai_constants.source_ap

2259: */
2260: CURSOR c_payment_chk(cp_source IN VARCHAR2, cp_source_table_name IN VARCHAR2, cp_source_document_id IN NUMBER) IS
2261: SELECT 1
2262: FROM jai_rgm_trx_records
2263: WHERE source = jai_constants.source_ap
2264: AND source_table_name = jai_constants.ap_payments
2265: AND source_document_id = cp_source_document_id;
2266:
2267: /*OPEN c_payment_chk(jai_constants.source_ap, jai_constants.ap_payments, inv_payment.invoice_payment_id);

Line 2264: AND source_table_name = jai_constants.ap_payments

2260: CURSOR c_payment_chk(cp_source IN VARCHAR2, cp_source_table_name IN VARCHAR2, cp_source_document_id IN NUMBER) IS
2261: SELECT 1
2262: FROM jai_rgm_trx_records
2263: WHERE source = jai_constants.source_ap
2264: AND source_table_name = jai_constants.ap_payments
2265: AND source_document_id = cp_source_document_id;
2266:
2267: /*OPEN c_payment_chk(jai_constants.source_ap, jai_constants.ap_payments, inv_payment.invoice_payment_id);
2268: FETCH c_payment_chk INTO ln_chk;

Line 2267: /*OPEN c_payment_chk(jai_constants.source_ap, jai_constants.ap_payments, inv_payment.invoice_payment_id);

2263: WHERE source = jai_constants.source_ap
2264: AND source_table_name = jai_constants.ap_payments
2265: AND source_document_id = cp_source_document_id;
2266:
2267: /*OPEN c_payment_chk(jai_constants.source_ap, jai_constants.ap_payments, inv_payment.invoice_payment_id);
2268: FETCH c_payment_chk INTO ln_chk;
2269: CLOSE c_payment_chk; */
2270:
2271: r_ref c_reference%ROWTYPE;

Line 2312: WHERE regime_code = jai_constants.service_regime)

2308: select to_date(attribute_value, 'DD/MM/YYYY')
2309: from JAI_RGM_ORG_REGNS_V
2310: where regime_id = (SELECT regime_id
2311: FROM JAI_RGM_DEFINITIONS
2312: WHERE regime_code = jai_constants.service_regime)
2313: and organization_id = p_organization_id
2314: and location_id = p_location_id
2315: AND attribute_code = 'EFF_DATE_ST_PT'
2316: AND attribute_type_code = 'OTHERS'

Line 2381: WHERE regime_code = jai_constants.service_regime;

2377: cursor get_regime_id
2378: is
2379: SELECT regime_id
2380: FROM JAI_RGM_DEFINITIONS
2381: WHERE regime_code = jai_constants.service_regime;
2382: ----------------------------------------------------------------------------------
2383: --Added by zhiwei for POT change bug#13435283 on 20111201 end
2384:
2385: BEGIN

Line 2427: OPEN c_reference(jai_constants.source_ap, ap_acc_dist.invoice_id, ap_acc_dist.invoice_distribution_id); -- , r_tax_dist_dtl.tax_id);

2423: r_tax_dist_dtl := null;
2424: r_parent_dist := null;
2425: r_parent_ref := null;
2426:
2427: OPEN c_reference(jai_constants.source_ap, ap_acc_dist.invoice_id, ap_acc_dist.invoice_distribution_id); -- , r_tax_dist_dtl.tax_id);
2428: FETCH c_reference INTO r_ref;
2429: CLOSE c_reference;
2430:
2431: -- following condition is satisfied if the invoice line is already inserted into REFERENCEs table

Line 2526: OPEN c_reference(jai_constants.source_ap, ap_acc_dist.invoice_id, ap_acc_dist.parent_reversal_id); -- , r_tax_dist_dtl.tax_id);

2522: FETCH c_item_id INTO ln_item_id;
2523: CLOSE c_item_id;
2524:
2525: IF ap_acc_dist.parent_reversal_id is not null then /* condition introduced for AP LINES Uptake Project */
2526: OPEN c_reference(jai_constants.source_ap, ap_acc_dist.invoice_id, ap_acc_dist.parent_reversal_id); -- , r_tax_dist_dtl.tax_id);
2527: FETCH c_reference INTO r_parent_ref;
2528: CLOSE c_reference;
2529: END IF;
2530:

Line 2581: WHERE regime_code = jai_constants.service_regime;

2577: /*
2578: SELECT regime_id
2579: into ln_regime_id
2580: FROM JAI_RGM_DEFINITIONS
2581: WHERE regime_code = jai_constants.service_regime;
2582: */--Commented by Zhiwei.Hou for Bug#13435283.
2583:
2584:
2585: if nvl(ln_regime_id,-1) = p_regime_id

Line 2601: p_source => jai_constants.source_ap,

2597:
2598: jai_cmn_rgm_recording_pkg.insert_reference(
2599: p_reference_id => ln_reference_id, -- OUT Variable
2600: p_organization_id => p_organization_id,/*5694855*/
2601: p_source => jai_constants.source_ap,
2602: p_invoice_id => ap_acc_dist.invoice_id,
2603: p_line_id => ap_acc_dist.invoice_distribution_id,
2604: p_tax_type => r_tax_dist_dtl.tax_type,
2605: p_tax_id => r_tax_dist_dtl.tax_id,

Line 2609: p_party_type => jai_constants.party_type_vendor,

2605: p_tax_id => r_tax_dist_dtl.tax_id,
2606: p_tax_rate => r_tax_dist_dtl.tax_rate,
2607: p_recoverable_ptg => r_tax_dist_dtl.recoverable_ptg,
2608: p_recoverable_amount => ln_recoverable_amount,
2609: p_party_type => jai_constants.party_type_vendor,
2610: p_party_id => ap_acc_dist.vendor_id,
2611: p_party_site_id => ap_acc_dist.vendor_site_id,
2612: p_tax_amount => nvl(ap_acc_dist.base_amount, ap_acc_dist.amount), /*Bug 12839287 - Tax Amount should hold Amount in Functional currency*/
2613: p_recovered_amount => 0,

Line 2628: IF lv_process_flag IN (jai_constants.expected_error, jai_constants.unexpected_error) THEN

2624: p_process_flag => lv_process_flag,
2625: p_process_message => lv_process_message
2626: );
2627:
2628: IF lv_process_flag IN (jai_constants.expected_error, jai_constants.unexpected_error) THEN
2629: -- RAISE_APPLICATION_ERROR( -20201, p_process_flag||':'||p_process_message);
2630: -- ERROR RECORDING should be there for all errored records, so that we can code the processing in future. CHK
2631: ROLLBACK TO start_of_ref;
2632: p_process_flag := lv_process_flag;

Line 2715: FOR invo IN c_batch_references(p_batch_id, jai_constants.source_ap) LOOP

2711: --Add by Xiao for POT change, reg bug#12533434 on 10-May-2011, end
2712:
2713: -- Logic to Make Register Entry for the Invoice Distributions that are populated into REFERENCES table and which are PAID
2714: -- Prior to the start date of this concurrent program. This is because localization only considers invoices that are accounted
2715: FOR invo IN c_batch_references(p_batch_id, jai_constants.source_ap) LOOP
2716:
2717: -- Logic to Process the PAST DATED PAYMENTS that are not processed due to Invoice Accounting did not happen
2718: FOR inv_payment IN c_previous_payments_of_inv(invo.invoice_id, p_trx_from_date) LOOP
2719:

Line 2720: FOR dist IN c_invoice_batch_refs(jai_constants.source_ap, p_batch_id, invo.invoice_id) LOOP

2716:
2717: -- Logic to Process the PAST DATED PAYMENTS that are not processed due to Invoice Accounting did not happen
2718: FOR inv_payment IN c_previous_payments_of_inv(invo.invoice_id, p_trx_from_date) LOOP
2719:
2720: FOR dist IN c_invoice_batch_refs(jai_constants.source_ap, p_batch_id, invo.invoice_id) LOOP
2721:
2722: lv_process_flag := null;
2723: -- Add by Xiao for POT change, reg bug#12533434 on 29-May-2011, begin
2724: ----------------------------------------------------------------------------------------------

Line 2747: p_source => jai_constants.source_ap,

2743: process_payment(
2744: p_batch_id => p_batch_id,
2745: p_regime_id => p_regime_id,
2746: p_org_id => inv_payment.org_id,
2747: p_source => jai_constants.source_ap,
2748: p_payment_table_name => jai_constants.ap_payments,
2749: p_payment_document_id => inv_payment.invoice_payment_id,
2750: p_invoice_id => dist.invoice_id,
2751: p_inv_dist_id => dist.line_id,

Line 2748: p_payment_table_name => jai_constants.ap_payments,

2744: p_batch_id => p_batch_id,
2745: p_regime_id => p_regime_id,
2746: p_org_id => inv_payment.org_id,
2747: p_source => jai_constants.source_ap,
2748: p_payment_table_name => jai_constants.ap_payments,
2749: p_payment_document_id => inv_payment.invoice_payment_id,
2750: p_invoice_id => dist.invoice_id,
2751: p_inv_dist_id => dist.line_id,
2752: p_inv_accounting_chk_done => jai_constants.yes,

Line 2752: p_inv_accounting_chk_done => jai_constants.yes,

2748: p_payment_table_name => jai_constants.ap_payments,
2749: p_payment_document_id => inv_payment.invoice_payment_id,
2750: p_invoice_id => dist.invoice_id,
2751: p_inv_dist_id => dist.line_id,
2752: p_inv_accounting_chk_done => jai_constants.yes,
2753: p_process_flag => lv_process_flag,
2754: p_process_message => lv_process_message
2755: );
2756:

Line 2761: IF lv_process_flag IN (jai_constants.expected_error, jai_constants.unexpected_error) THEN

2757:
2758: -- "FP" Means means future payment and it is not yet matured, so
2759: --IF p_process_flag = 'FP' THEN
2760: --ELS
2761: IF lv_process_flag IN (jai_constants.expected_error, jai_constants.unexpected_error) THEN
2762: ROLLBACK TO process_payment;
2763: --retcode := jai_constants.request_warning;
2764: p_process_flag := lv_process_flag;
2765: p_process_message := lv_process_message;

Line 2763: --retcode := jai_constants.request_warning;

2759: --IF p_process_flag = 'FP' THEN
2760: --ELS
2761: IF lv_process_flag IN (jai_constants.expected_error, jai_constants.unexpected_error) THEN
2762: ROLLBACK TO process_payment;
2763: --retcode := jai_constants.request_warning;
2764: p_process_flag := lv_process_flag;
2765: p_process_message := lv_process_message;
2766: END IF;
2767:

Line 2783: FOR dist IN c_invoice_batch_refs(jai_constants.source_ap, p_batch_id, invo.invoice_id) LOOP

2779:
2780: -- Logic to Process the PAST DATED PREPAYMENTS that are not processed due to Invoice Accounting did not happen
2781: FOR pp IN c_period_payments( p_trx_from_date, p_trx_to_date) LOOP
2782:
2783: FOR dist IN c_invoice_batch_refs(jai_constants.source_ap, p_batch_id, invo.invoice_id) LOOP
2784:
2785: lv_process_flag := null;
2786:
2787: SAVEPOINT process_prepayment;

Line 2801: p_source => jai_constants.source_ap,

2797: process_payment(
2798: p_batch_id => p_batch_id,
2799: p_regime_id => p_regime_id,
2800: p_org_id => pp.org_id,
2801: p_source => jai_constants.source_ap,
2802: p_payment_table_name => jai_constants.ap_prepayments,
2803: p_payment_document_id => pp.invoice_distribution_id,
2804: p_invoice_id => dist.invoice_id,
2805: p_inv_dist_id => dist.line_id,

Line 2802: p_payment_table_name => jai_constants.ap_prepayments,

2798: p_batch_id => p_batch_id,
2799: p_regime_id => p_regime_id,
2800: p_org_id => pp.org_id,
2801: p_source => jai_constants.source_ap,
2802: p_payment_table_name => jai_constants.ap_prepayments,
2803: p_payment_document_id => pp.invoice_distribution_id,
2804: p_invoice_id => dist.invoice_id,
2805: p_inv_dist_id => dist.line_id,
2806: p_inv_accounting_chk_done => jai_constants.yes,

Line 2806: p_inv_accounting_chk_done => jai_constants.yes,

2802: p_payment_table_name => jai_constants.ap_prepayments,
2803: p_payment_document_id => pp.invoice_distribution_id,
2804: p_invoice_id => dist.invoice_id,
2805: p_inv_dist_id => dist.line_id,
2806: p_inv_accounting_chk_done => jai_constants.yes,
2807: p_process_flag => lv_process_flag,
2808: p_process_message => lv_process_message);
2809: END IF; --Add by Xiao for POT change, reg bug#12533434 on 10-May-2011
2810:

Line 2811: IF lv_process_flag IN (jai_constants.expected_error, jai_constants.unexpected_error) THEN

2807: p_process_flag => lv_process_flag,
2808: p_process_message => lv_process_message);
2809: END IF; --Add by Xiao for POT change, reg bug#12533434 on 10-May-2011
2810:
2811: IF lv_process_flag IN (jai_constants.expected_error, jai_constants.unexpected_error) THEN
2812: ROLLBACK TO process_prepayment;
2813: -- retcode := jai_constants.request_warning;
2814: p_process_flag := lv_process_flag;
2815: p_process_message := lv_process_message;

Line 2813: -- retcode := jai_constants.request_warning;

2809: END IF; --Add by Xiao for POT change, reg bug#12533434 on 10-May-2011
2810:
2811: IF lv_process_flag IN (jai_constants.expected_error, jai_constants.unexpected_error) THEN
2812: ROLLBACK TO process_prepayment;
2813: -- retcode := jai_constants.request_warning;
2814: p_process_flag := lv_process_flag;
2815: p_process_message := lv_process_message;
2816: END IF;
2817:

Line 2860: p_source => jai_constants.source_ap,

2856: process_payment(
2857: p_batch_id => p_batch_id,
2858: p_regime_id => p_regime_id,
2859: p_org_id => inv_payment.org_id,
2860: p_source => jai_constants.source_ap,
2861: p_payment_table_name => jai_constants.ap_payments,
2862: p_payment_document_id => inv_payment.invoice_payment_id,
2863: p_invoice_id => inv_payment.invoice_id,
2864: p_inv_dist_id => inv_payment.invoice_distribution_id,

Line 2861: p_payment_table_name => jai_constants.ap_payments,

2857: p_batch_id => p_batch_id,
2858: p_regime_id => p_regime_id,
2859: p_org_id => inv_payment.org_id,
2860: p_source => jai_constants.source_ap,
2861: p_payment_table_name => jai_constants.ap_payments,
2862: p_payment_document_id => inv_payment.invoice_payment_id,
2863: p_invoice_id => inv_payment.invoice_id,
2864: p_inv_dist_id => inv_payment.invoice_distribution_id,
2865: p_inv_accounting_chk_done => jai_constants.no,

Line 2865: p_inv_accounting_chk_done => jai_constants.no,

2861: p_payment_table_name => jai_constants.ap_payments,
2862: p_payment_document_id => inv_payment.invoice_payment_id,
2863: p_invoice_id => inv_payment.invoice_id,
2864: p_inv_dist_id => inv_payment.invoice_distribution_id,
2865: p_inv_accounting_chk_done => jai_constants.no,
2866: p_process_flag => lv_process_flag,
2867: p_process_message => lv_process_message
2868: );
2869:

Line 2870: IF lv_process_flag IN (jai_constants.expected_error, jai_constants.unexpected_error) THEN

2866: p_process_flag => lv_process_flag,
2867: p_process_message => lv_process_message
2868: );
2869:
2870: IF lv_process_flag IN (jai_constants.expected_error, jai_constants.unexpected_error) THEN
2871: ROLLBACK TO process_payment;
2872: -- retcode := jai_constants.request_warning;
2873: p_process_flag := lv_process_flag;
2874: p_process_message := lv_process_message;

Line 2872: -- retcode := jai_constants.request_warning;

2868: );
2869:
2870: IF lv_process_flag IN (jai_constants.expected_error, jai_constants.unexpected_error) THEN
2871: ROLLBACK TO process_payment;
2872: -- retcode := jai_constants.request_warning;
2873: p_process_flag := lv_process_flag;
2874: p_process_message := lv_process_message;
2875: END IF;
2876:

Line 2922: p_source => jai_constants.source_ap,

2918: process_payment(
2919: p_batch_id => p_batch_id,
2920: p_regime_id => p_regime_id,
2921: p_org_id => pp.org_id,
2922: p_source => jai_constants.source_ap,
2923: p_payment_table_name => jai_constants.ap_prepayments,
2924: p_payment_document_id => pp.invoice_distribution_id,
2925: p_invoice_id => dist.invoice_id,
2926: p_inv_dist_id => dist.invoice_distribution_id,

Line 2923: p_payment_table_name => jai_constants.ap_prepayments,

2919: p_batch_id => p_batch_id,
2920: p_regime_id => p_regime_id,
2921: p_org_id => pp.org_id,
2922: p_source => jai_constants.source_ap,
2923: p_payment_table_name => jai_constants.ap_prepayments,
2924: p_payment_document_id => pp.invoice_distribution_id,
2925: p_invoice_id => dist.invoice_id,
2926: p_inv_dist_id => dist.invoice_distribution_id,
2927: p_inv_accounting_chk_done => jai_constants.no,

Line 2927: p_inv_accounting_chk_done => jai_constants.no,

2923: p_payment_table_name => jai_constants.ap_prepayments,
2924: p_payment_document_id => pp.invoice_distribution_id,
2925: p_invoice_id => dist.invoice_id,
2926: p_inv_dist_id => dist.invoice_distribution_id,
2927: p_inv_accounting_chk_done => jai_constants.no,
2928: p_process_flag => lv_process_flag,
2929: p_process_message => lv_process_message
2930: );
2931: IF lv_process_flag IN (jai_constants.expected_error, jai_constants.unexpected_error) THEN

Line 2931: IF lv_process_flag IN (jai_constants.expected_error, jai_constants.unexpected_error) THEN

2927: p_inv_accounting_chk_done => jai_constants.no,
2928: p_process_flag => lv_process_flag,
2929: p_process_message => lv_process_message
2930: );
2931: IF lv_process_flag IN (jai_constants.expected_error, jai_constants.unexpected_error) THEN
2932: ROLLBACK TO process_prepayment;
2933: -- retcode := jai_constants.request_warning;
2934: p_process_flag := lv_process_flag;
2935: p_process_message := lv_process_message;

Line 2933: -- retcode := jai_constants.request_warning;

2929: p_process_message => lv_process_message
2930: );
2931: IF lv_process_flag IN (jai_constants.expected_error, jai_constants.unexpected_error) THEN
2932: ROLLBACK TO process_prepayment;
2933: -- retcode := jai_constants.request_warning;
2934: p_process_flag := lv_process_flag;
2935: p_process_message := lv_process_message;
2936: END IF;
2937:

Line 2951: -- retcode := jai_constants.request_error;

2947:
2948: EXCEPTION
2949: WHEN OTHERS THEN
2950: ROLLBACK;
2951: -- retcode := jai_constants.request_error;
2952: -- errbuf := 'Unexpected Error Occured:'||SQLERRM;
2953: p_process_flag := jai_constants.unexpected_error;
2954: p_process_message := 'Unexpected Error Occured in Process_Payments:'||SQLERRM;
2955: FND_FILE.put_line( fnd_file.log, 'Unexpected Error Occured:'||p_process_message);

Line 2953: p_process_flag := jai_constants.unexpected_error;

2949: WHEN OTHERS THEN
2950: ROLLBACK;
2951: -- retcode := jai_constants.request_error;
2952: -- errbuf := 'Unexpected Error Occured:'||SQLERRM;
2953: p_process_flag := jai_constants.unexpected_error;
2954: p_process_message := 'Unexpected Error Occured in Process_Payments:'||SQLERRM;
2955: FND_FILE.put_line( fnd_file.log, 'Unexpected Error Occured:'||p_process_message);
2956:
2957: END process_payments;

Line 3175: lv_debug VARCHAR2(5); -- := jai_constants.no /* This should be either 'Y' or 'N' */ File.Sql.35 by Brathod

3171: lv_vat_invoice_number VARCHAR2(100);
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;

Line 3177: lv_inv_num_already_generated VARCHAR2(10); --:= jai_constants.value_false File.Sql.35 by Brathod

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;
3181: ln_current_party_site_id NUMBER;

Line 3214: WHERE regime_code = jai_constants.vat_regime;

3210:
3211: CURSOR c_regime_cur(cp_trx_Date DATE) IS
3212: SELECT regime_id
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)

Line 3231: AND attribute_type_code = jai_constants.regn_type_others

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
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:

Line 3232: AND attribute_code = jai_constants.attr_code_same_inv_no

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
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

Line 3310: lv_inv_num_already_generated := jai_constants.value_false; -- File.Sql.35 by Brathod

3306: ||aiyer for the bug 5369250
3307: ||convert from canonical to date format
3308: */
3309: ld_override_invoice_date := fnd_date.canonical_to_date(p_override_invoice_date);
3310: lv_inv_num_already_generated := jai_constants.value_false; -- File.Sql.35 by Brathod
3311: lv_debug := NVL(P_DEBUG,jai_constants.no);
3312: ln_current_party_id := -9999;
3313: ln_current_party_site_id := -9999;
3314: -- added by Allen Yang for for bug 9485355 (12.1.3 non-shippable Enhancement), begin

Line 3311: lv_debug := NVL(P_DEBUG,jai_constants.no);

3307: ||convert from canonical to date format
3308: */
3309: ld_override_invoice_date := fnd_date.canonical_to_date(p_override_invoice_date);
3310: lv_inv_num_already_generated := jai_constants.value_false; -- File.Sql.35 by Brathod
3311: lv_debug := NVL(P_DEBUG,jai_constants.no);
3312: ln_current_party_id := -9999;
3313: ln_current_party_site_id := -9999;
3314: -- added by Allen Yang for for bug 9485355 (12.1.3 non-shippable Enhancement), begin
3315: ln_current_order_number := -9999;

Line 3339: lv_inv_gen_process_flag := jai_constants.successful;

3335: END IF;
3336: ln_conc_progam_id := FND_GLOBAL.conc_program_id;
3337: ln_conc_request_id := FND_GLOBAL.conc_request_id;
3338: ln_conc_prog_appl_id := FND_GLOBAL.prog_appl_id;
3339: lv_inv_gen_process_flag := jai_constants.successful;
3340: lv_acct_process_flag := jai_constants.successful;
3341: lv_inv_gen_process_message := NULL;
3342: lv_acct_process_message := NULL;
3343: ln_batch_id := ln_conc_request_id;

Line 3340: lv_acct_process_flag := jai_constants.successful;

3336: ln_conc_progam_id := FND_GLOBAL.conc_program_id;
3337: ln_conc_request_id := FND_GLOBAL.conc_request_id;
3338: ln_conc_prog_appl_id := FND_GLOBAL.prog_appl_id;
3339: lv_inv_gen_process_flag := jai_constants.successful;
3340: lv_acct_process_flag := jai_constants.successful;
3341: lv_inv_gen_process_message := NULL;
3342: lv_acct_process_message := NULL;
3343: ln_batch_id := ln_conc_request_id;
3344:

Line 3467: lv_p_source := jai_constants.source_wsh;

3463:
3464: -- start processing records
3465: IF mainrec.delivery_id IS NOT NULL -- for shippable line
3466: THEN
3467: lv_p_source := jai_constants.source_wsh;
3468: ln_interface_status:= 0;
3469: OPEN c_check_interface_status(mainrec.delivery_id);
3470: FETCH c_check_interface_status into ln_interface_status;
3471: CLOSE c_check_interface_status;

Line 3491: lv_p_source := jai_constants.source_nsh;

3487: IF lv_debug = 'Y' THEN
3488: Fnd_File.PUT_LINE(Fnd_File.LOG, ' Processing Delivery - ' || mainrec.delivery_id);
3489: END IF; -- lv_debug = 'Y'
3490: ELSE -- else for non-shippable line
3491: lv_p_source := jai_constants.source_nsh;
3492: IF lv_debug = 'Y' THEN
3493: Fnd_File.PUT_LINE(Fnd_File.LOG, ' Processing Non-shippable Order Line - ' ||
3494: mainrec.order_line_id);
3495: END IF; -- lv_debug = 'Y'

Line 3525: lv_party_has_changed := jai_constants.value_true;

3521: || Hence a new loop needs to start
3522: */
3523: ln_current_party_id := mainrec.party_id;
3524: ln_current_party_site_id := mainrec.party_site_id;
3525: lv_party_has_changed := jai_constants.value_true;
3526: lv_inv_num_already_generated :=jai_constants.value_false;--9772724
3527: ELSE
3528: lv_party_has_changed := jai_constants.value_false;
3529: END IF; -- ln_current_party_id <> mainrec.party_id OR ... ...

Line 3526: lv_inv_num_already_generated :=jai_constants.value_false;--9772724

3522: */
3523: ln_current_party_id := mainrec.party_id;
3524: ln_current_party_site_id := mainrec.party_site_id;
3525: lv_party_has_changed := jai_constants.value_true;
3526: lv_inv_num_already_generated :=jai_constants.value_false;--9772724
3527: ELSE
3528: lv_party_has_changed := jai_constants.value_false;
3529: END IF; -- ln_current_party_id <> mainrec.party_id OR ... ...
3530:

Line 3528: lv_party_has_changed := jai_constants.value_false;

3524: ln_current_party_site_id := mainrec.party_site_id;
3525: lv_party_has_changed := jai_constants.value_true;
3526: lv_inv_num_already_generated :=jai_constants.value_false;--9772724
3527: ELSE
3528: lv_party_has_changed := jai_constants.value_false;
3529: END IF; -- ln_current_party_id <> mainrec.party_id OR ... ...
3530:
3531: -- modified by Allen Yang for bug bug 9485355 (12.1.3 non-shippable Enhancement), begin
3532: --OPEN c_shipment_info(mainrec.delivery_id);

Line 3557: IF NVL(lv_Same_invoice_no,jai_constants.no) = jai_constants.yes --same as excise

3553:
3554: -- here comes the detail logic of VAT generation for shippable and non-shippable lines
3555: IF mainrec.delivery_id IS NOT NULL -- current is shippable line
3556: THEN
3557: IF NVL(lv_Same_invoice_no,jai_constants.no) = jai_constants.yes --same as excise
3558: THEN
3559: /* detailed logic of using excise invoice number as VAT invoice number
3560: 1. if excise is not generated, then raise error msg and go NEXTDELIVERY;
3561: 2. else, use excise as VAT invoice number, and update JAI_RGM_INVOICE_GEN_T

Line 3588: lv_inv_gen_process_flag := jai_constants.expected_error;

3584: || It means the delivery is still existing in the JAI_OM_OE_GEN_TAXINV_T table
3585: || It means that the excise invoice generation was either not processed or errored out.
3586: || We need to raise an error saying that excise invoice number needs to be run before VAT processing can happen.
3587: */
3588: lv_inv_gen_process_flag := jai_constants.expected_error;
3589: lv_inv_gen_process_message := 'Excise Invoice Generation is not generated yet for this Delivery. Please run the excise invoice number generation number for delivery : '
3590: || mainrec.delivery_id;
3591: -- Not using the debug flag for the following message because it needs to be shown to the user irrespective of debug flag.
3592: Fnd_File.PUT_LINE(Fnd_File.LOG, 'Excise Invoice Generation is not generated yet for this Delivery. Please run the excise invoice number generation number for delivery : '

Line 3646: lv_inv_gen_process_flag := jai_constants.successful;

3642: IF lv_debug = 'Y' THEN
3643: Fnd_File.PUT_LINE(Fnd_File.LOG, ' Before going to process accounting for generating accounting');
3644: END IF;
3645:
3646: lv_inv_gen_process_flag := jai_constants.successful;
3647: GOTO Processaccounting;
3648: END IF; -- lv_excise_invoice_no IS NOT NULL
3649: END IF; -- ln_excise_invoice_not_done = 1
3650: END IF; --Added by nprashar for bug # 12827535

Line 3656: IF NVL(lv_Same_invoice_no,jai_constants.no) = jai_constants.no or ( ln_excise_invoice_not_done < 0 and

3652: --Bug # 12827535
3653: --Added this new IF coindition which checks even if the setup for Same_invoice for Excise and VAT exists,
3654: --if excise invoice is not generated, VAT invoice number should be generated
3655:
3656: IF NVL(lv_Same_invoice_no,jai_constants.no) = jai_constants.no or ( ln_excise_invoice_not_done < 0 and
3657: NVL(lv_Same_invoice_no,jai_constants.no) = jai_constants.yes )
3658: Then
3659:
3660: /*

Line 3657: NVL(lv_Same_invoice_no,jai_constants.no) = jai_constants.yes )

3653: --Added this new IF coindition which checks even if the setup for Same_invoice for Excise and VAT exists,
3654: --if excise invoice is not generated, VAT invoice number should be generated
3655:
3656: IF NVL(lv_Same_invoice_no,jai_constants.no) = jai_constants.no or ( ln_excise_invoice_not_done < 0 and
3657: NVL(lv_Same_invoice_no,jai_constants.no) = jai_constants.yes )
3658: Then
3659:
3660: /*
3661: || Check if we need to generate vat invoice number and within that check if an invoice number is already generated.

Line 3666: IF NVL(p_single_invoice_num,jai_constants.No) = jai_constants.yes -- single invoice number is true

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
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;

Line 3668: IF NVL(lv_party_has_changed,jai_constants.value_false) = jai_constants.value_true -- party has changed

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
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

Line 3681: IF p_process_action in (jai_constants.om_action_gen_inv_n_accnt ,jai_constants.om_action_gen_invoice)

3677: THEN
3678: Fnd_File.PUT_LINE(Fnd_File.LOG, ' lv_party_has_changed :' || lv_party_has_changed);
3679: Fnd_File.PUT_LINE(Fnd_File.LOG, ' lv_inv_num_already_generated :' || lv_inv_num_already_generated);
3680: END IF; -- lv_Debug = 'Y'
3681: IF p_process_action in (jai_constants.om_action_gen_inv_n_accnt ,jai_constants.om_action_gen_invoice)
3682: THEN
3683: IF lv_inv_num_already_generated = jai_constants.value_false
3684: THEN
3685: IF lv_Debug = 'Y' THEN

Line 3683: IF lv_inv_num_already_generated = jai_constants.value_false

3679: Fnd_File.PUT_LINE(Fnd_File.LOG, ' lv_inv_num_already_generated :' || lv_inv_num_already_generated);
3680: END IF; -- lv_Debug = 'Y'
3681: IF p_process_action in (jai_constants.om_action_gen_inv_n_accnt ,jai_constants.om_action_gen_invoice)
3682: THEN
3683: IF lv_inv_num_already_generated = jai_constants.value_false
3684: THEN
3685: IF lv_Debug = 'Y' THEN
3686: Fnd_File.PUT_LINE(Fnd_File.LOG, ' before call to jai_cmn_rgm_setup_pkg.Gen_Invoice_number with ln_order_type_id' || ln_order_type_id || 'date ' || mainrec.delivery_date );
3687: END IF; -- lv_Debug = 'Y'

Line 3703: IF lv_inv_gen_process_flag = jai_constants.successful

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
3707: ln_success_delivery_Ctr := NVL(ln_success_Delivery_Ctr,0) + 1;

Line 3708: lv_inv_num_already_generated := jai_constants.value_true;

3704: THEN
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

Line 3727: lv_inv_gen_process_flag := jai_constants.unexpected_error;

3723: , last_update_login = fnd_global.conc_login_id
3724: , last_update_date = sysdate
3725: WHERE delivery_id = mainrec.delivery_id;
3726: ELSE
3727: lv_inv_gen_process_flag := jai_constants.unexpected_error;
3728: lv_acct_process_flag := jai_constants.expected_error;
3729: ln_failure_delivery_ctr := NVL(ln_failure_Delivery_ctr,0) + 1;
3730: END IF; -- lv_vat_invoice_number IS NOT NULL
3731: ELSE

Line 3728: lv_acct_process_flag := jai_constants.expected_error;

3724: , last_update_date = sysdate
3725: WHERE delivery_id = mainrec.delivery_id;
3726: ELSE
3727: lv_inv_gen_process_flag := jai_constants.unexpected_error;
3728: lv_acct_process_flag := jai_constants.expected_error;
3729: ln_failure_delivery_ctr := NVL(ln_failure_Delivery_ctr,0) + 1;
3730: END IF; -- lv_vat_invoice_number IS NOT NULL
3731: ELSE
3732: ln_failure_delivery_ctr := NVL(ln_failure_Delivery_ctr,0) + 1;

Line 3733: END IF; -- lv_inv_gen_process_flag = jai_constants.successful

3729: ln_failure_delivery_ctr := NVL(ln_failure_Delivery_ctr,0) + 1;
3730: END IF; -- lv_vat_invoice_number IS NOT NULL
3731: ELSE
3732: ln_failure_delivery_ctr := NVL(ln_failure_Delivery_ctr,0) + 1;
3733: END IF; -- lv_inv_gen_process_flag = jai_constants.successful
3734: END IF; -- lv_inv_num_already_generated = jai_constants.value_false
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

Line 3734: END IF; -- lv_inv_num_already_generated = jai_constants.value_false

3730: END IF; -- lv_vat_invoice_number IS NOT NULL
3731: ELSE
3732: ln_failure_delivery_ctr := NVL(ln_failure_Delivery_ctr,0) + 1;
3733: END IF; -- lv_inv_gen_process_flag = jai_constants.successful
3734: END IF; -- lv_inv_num_already_generated = jai_constants.value_false
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;

Line 3735: END IF; -- p_process_action in (jai_constants.om_action_gen_inv_n_accnt ,jai_constants.om_action_gen_invoice)

3731: ELSE
3732: ln_failure_delivery_ctr := NVL(ln_failure_Delivery_ctr,0) + 1;
3733: END IF; -- lv_inv_gen_process_flag = jai_constants.successful
3734: END IF; -- lv_inv_num_already_generated = jai_constants.value_false
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;

Line 3847: IF lv_inv_gen_process_flag = jai_constants.successful

3843: || lv_vat_invoice_number || '+++');
3844: Fnd_File.PUT_LINE(Fnd_File.LOG, ' +++ after call to jai_cmn_rgm_setup_pkg.Gen_Invoice_number with lv_inv_gen_process_flag = '
3845: || lv_inv_gen_process_flag || 'lv_inv_gen_process_message '|| lv_inv_gen_process_message || '+++');
3846: END IF; -- lv_Debug = 'Y'
3847: IF lv_inv_gen_process_flag = jai_constants.successful
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;

Line 3872: lv_inv_gen_process_flag := jai_constants.unexpected_error;

3868: last_update_date = sysdate
3869: WHERE delivery_id = mainrec.delivery_id;
3870:
3871: ELSE
3872: lv_inv_gen_process_flag := jai_constants.unexpected_error;
3873: lv_inv_gen_process_message := 'No VAT Invoice Number Generated';
3874: ln_failure_delivery_ctr := NVL(ln_failure_Delivery_ctr,0) + 1;
3875: END IF; -- lv_vat_invoice_number IS NOT NULL
3876: ELSE

Line 3887: END IF; -- lv_inv_gen_process_flag = jai_constants.successful

3883: last_update_login = fnd_global.conc_login_id,
3884: last_update_date = sysdate
3885: WHERE delivery_id = mainrec.delivery_id;
3886: ln_failure_delivery_ctr := NVL(ln_failure_Delivery_ctr,0) + 1;
3887: END IF; -- lv_inv_gen_process_flag = jai_constants.successful
3888: END IF; -- NVL(lv_Same_invoice_no,jai_constants.no) = jai_constants.yes
3889: END IF; -- End of condition added for bug # 12827535
3890:
3891: -- below logic is for non-shippable lines

Line 3888: END IF; -- NVL(lv_Same_invoice_no,jai_constants.no) = jai_constants.yes

3884: last_update_date = sysdate
3885: WHERE delivery_id = mainrec.delivery_id;
3886: ln_failure_delivery_ctr := NVL(ln_failure_Delivery_ctr,0) + 1;
3887: END IF; -- lv_inv_gen_process_flag = jai_constants.successful
3888: END IF; -- NVL(lv_Same_invoice_no,jai_constants.no) = jai_constants.yes
3889: END IF; -- End of condition added for bug # 12827535
3890:
3891: -- below logic is for non-shippable lines
3892: ELSE -- current line is non-shippable line

Line 3900: lv_order_has_changed := jai_constants.value_true;

3896: || There has been a change in order number .
3897: || Hence a new loop needs to start
3898: */
3899: ln_current_order_number := mainrec.order_number;
3900: lv_order_has_changed := jai_constants.value_true;
3901: ELSE
3902: lv_order_has_changed := jai_constants.value_false;
3903: END IF; -- ln_current_order_number <> mainrec.order_number
3904:

Line 3902: lv_order_has_changed := jai_constants.value_false;

3898: */
3899: ln_current_order_number := mainrec.order_number;
3900: lv_order_has_changed := jai_constants.value_true;
3901: ELSE
3902: lv_order_has_changed := jai_constants.value_false;
3903: END IF; -- ln_current_order_number <> mainrec.order_number
3904:
3905: /* commented following logic as for non-shippable lines, same_as_excise flag will not take effect
3906: -- if same_as_excise flag is 'Y', use excise invoice number of first fetched delivery line as vat invoice number

Line 3907: IF NVL(lv_Same_invoice_no,jai_constants.no) = jai_constants.yes --same as excise

3903: END IF; -- ln_current_order_number <> mainrec.order_number
3904:
3905: /* commented following logic as for non-shippable lines, same_as_excise flag will not take effect
3906: -- if same_as_excise flag is 'Y', use excise invoice number of first fetched delivery line as vat invoice number
3907: IF NVL(lv_Same_invoice_no,jai_constants.no) = jai_constants.yes --same as excise
3908: THEN
3909: IF lv_debug = 'Y' THEN
3910: Fnd_File.PUT_LINE(Fnd_File.LOG, ' lv_Same_invoice_no = Y , Hence we need not call inv num generation routine - using excise inv num instead');
3911: END IF; -- lv_debug = 'Y'

Line 3963: lv_inv_gen_process_flag := jai_constants.successful;

3959: IF lv_debug = 'Y' THEN
3960: Fnd_File.PUT_LINE(Fnd_File.LOG, ' Before going to process accounting for generating accounting');
3961: END IF;
3962:
3963: lv_inv_gen_process_flag := jai_constants.successful;
3964: lv_inv_num_already_generated := jai_constants.value_true;
3965: lv_vat_invoice_number := lv_excise_invoice_no;
3966: GOTO Processaccounting;
3967: END IF; -- lv_excise_invoice_no IS NOT NULL

Line 3964: lv_inv_num_already_generated := jai_constants.value_true;

3960: Fnd_File.PUT_LINE(Fnd_File.LOG, ' Before going to process accounting for generating accounting');
3961: END IF;
3962:
3963: lv_inv_gen_process_flag := jai_constants.successful;
3964: lv_inv_num_already_generated := jai_constants.value_true;
3965: lv_vat_invoice_number := lv_excise_invoice_no;
3966: GOTO Processaccounting;
3967: END IF; -- lv_excise_invoice_no IS NOT NULL
3968:

Line 3969: END IF; -- NVL(lv_Same_invoice_no,jai_constants.no) = jai_constants.yes

3965: lv_vat_invoice_number := lv_excise_invoice_no;
3966: GOTO Processaccounting;
3967: END IF; -- lv_excise_invoice_no IS NOT NULL
3968:
3969: END IF; -- NVL(lv_Same_invoice_no,jai_constants.no) = jai_constants.yes
3970: */
3971:
3972: Fnd_File.PUT_LINE(Fnd_File.LOG, ' lv_party_has_changed :' || lv_party_has_changed);
3973: Fnd_File.PUT_LINE(Fnd_File.LOG, ' p_single_invoice_num :' || p_single_invoice_num);

Line 3975: IF NVL(p_single_invoice_num,jai_constants.No) = jai_constants.yes -- single invoice number is true

3971:
3972: Fnd_File.PUT_LINE(Fnd_File.LOG, ' lv_party_has_changed :' || lv_party_has_changed);
3973: Fnd_File.PUT_LINE(Fnd_File.LOG, ' p_single_invoice_num :' || p_single_invoice_num);
3974:
3975: IF NVL(p_single_invoice_num,jai_constants.No) = jai_constants.yes -- single invoice number is true
3976: THEN
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;

Line 3977: IF NVL(lv_party_has_changed,jai_constants.value_false) = jai_constants.value_true -- party has changed

3973: Fnd_File.PUT_LINE(Fnd_File.LOG, ' p_single_invoice_num :' || p_single_invoice_num);
3974:
3975: IF NVL(p_single_invoice_num,jai_constants.No) = jai_constants.yes -- single invoice number is true
3976: THEN
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

Line 3990: IF p_process_action in (jai_constants.om_action_gen_inv_n_accnt ,jai_constants.om_action_gen_invoice)

3986: THEN
3987: Fnd_File.PUT_LINE(Fnd_File.LOG, ' lv_party_has_changed :' || lv_party_has_changed);
3988: Fnd_File.PUT_LINE(Fnd_File.LOG, ' lv_inv_num_already_generated :' || lv_inv_num_already_generated);
3989: END IF; -- lv_Debug = 'Y'
3990: IF p_process_action in (jai_constants.om_action_gen_inv_n_accnt ,jai_constants.om_action_gen_invoice)
3991: THEN
3992: --IF lv_inv_num_already_generated = jai_constants.value_false
3993: --THEN
3994: IF lv_Debug = 'Y' THEN

Line 3992: --IF lv_inv_num_already_generated = jai_constants.value_false

3988: Fnd_File.PUT_LINE(Fnd_File.LOG, ' lv_inv_num_already_generated :' || lv_inv_num_already_generated);
3989: END IF; -- lv_Debug = 'Y'
3990: IF p_process_action in (jai_constants.om_action_gen_inv_n_accnt ,jai_constants.om_action_gen_invoice)
3991: THEN
3992: --IF lv_inv_num_already_generated = jai_constants.value_false
3993: --THEN
3994: IF lv_Debug = 'Y' THEN
3995: Fnd_File.PUT_LINE(Fnd_File.LOG, ' before call to jai_cmn_rgm_setup_pkg.Gen_Invoice_number with ln_order_type_id' || ln_order_type_id || 'date ' || mainrec.delivery_date );
3996: END IF; -- lv_Debug = 'Y'

Line 4012: IF lv_inv_gen_process_flag = jai_constants.successful

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
4016: ln_success_delivery_Ctr := NVL(ln_success_Delivery_Ctr,0) + 1;

Line 4017: lv_inv_num_already_generated := jai_constants.value_true;

4013: THEN
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

Line 4037: lv_inv_gen_process_flag := jai_constants.unexpected_error;

4033: , last_update_login = fnd_global.conc_login_id
4034: , last_update_date = sysdate
4035: WHERE order_line_id = mainrec.order_line_id;
4036: ELSE
4037: lv_inv_gen_process_flag := jai_constants.unexpected_error;
4038: lv_acct_process_flag := jai_constants.expected_error;
4039: ln_failure_delivery_ctr := NVL(ln_failure_Delivery_ctr,0) + 1;
4040: END IF; -- lv_vat_invoice_number IS NOT NULL
4041: ELSE

Line 4038: lv_acct_process_flag := jai_constants.expected_error;

4034: , last_update_date = sysdate
4035: WHERE order_line_id = mainrec.order_line_id;
4036: ELSE
4037: lv_inv_gen_process_flag := jai_constants.unexpected_error;
4038: lv_acct_process_flag := jai_constants.expected_error;
4039: ln_failure_delivery_ctr := NVL(ln_failure_Delivery_ctr,0) + 1;
4040: END IF; -- lv_vat_invoice_number IS NOT NULL
4041: ELSE
4042: ln_failure_delivery_ctr := NVL(ln_failure_Delivery_ctr,0) + 1;

Line 4043: END IF; -- lv_inv_gen_process_flag = jai_constants.successful

4039: ln_failure_delivery_ctr := NVL(ln_failure_Delivery_ctr,0) + 1;
4040: END IF; -- lv_vat_invoice_number IS NOT NULL
4041: ELSE
4042: ln_failure_delivery_ctr := NVL(ln_failure_Delivery_ctr,0) + 1;
4043: END IF; -- lv_inv_gen_process_flag = jai_constants.successful
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;

Line 4044: --END IF; -- lv_inv_num_already_generated = jai_constants.value_false

4040: END IF; -- lv_vat_invoice_number IS NOT NULL
4041: ELSE
4042: ln_failure_delivery_ctr := NVL(ln_failure_Delivery_ctr,0) + 1;
4043: END IF; -- lv_inv_gen_process_flag = jai_constants.successful
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;

Line 4045: END IF; -- p_process_action in (jai_constants.om_action_gen_inv_n_accnt ,jai_constants.om_action_gen_invoice)

4041: ELSE
4042: ln_failure_delivery_ctr := NVL(ln_failure_Delivery_ctr,0) + 1;
4043: END IF; -- lv_inv_gen_process_flag = jai_constants.successful
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: */

Line 4076: IF NVL(lv_order_has_changed,jai_constants.value_false) = jai_constants.value_true -- order number has changed

4072: END IF; -- lv_party_has_changed
4073: ELSE -- single invoice number is false
4074: -- if single invoice number option is 'NO', then generate VAT invoice by Order Numbers
4075:
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

Line 4089: IF p_process_action in (jai_constants.om_action_gen_inv_n_accnt ,jai_constants.om_action_gen_invoice)

4085: THEN
4086: Fnd_File.PUT_LINE(Fnd_File.LOG, ' lv_order_has_changed :' || lv_order_has_changed);
4087: Fnd_File.PUT_LINE(Fnd_File.LOG, ' lv_inv_num_already_generated :' || lv_inv_num_already_generated);
4088: END IF; -- lv_Debug = 'Y'
4089: IF p_process_action in (jai_constants.om_action_gen_inv_n_accnt ,jai_constants.om_action_gen_invoice)
4090: THEN
4091: --IF lv_inv_num_already_generated = jai_constants.value_false
4092: --THEN
4093: IF lv_Debug = 'Y' THEN

Line 4091: --IF lv_inv_num_already_generated = jai_constants.value_false

4087: Fnd_File.PUT_LINE(Fnd_File.LOG, ' lv_inv_num_already_generated :' || lv_inv_num_already_generated);
4088: END IF; -- lv_Debug = 'Y'
4089: IF p_process_action in (jai_constants.om_action_gen_inv_n_accnt ,jai_constants.om_action_gen_invoice)
4090: THEN
4091: --IF lv_inv_num_already_generated = jai_constants.value_false
4092: --THEN
4093: IF lv_Debug = 'Y' THEN
4094: Fnd_File.PUT_LINE(Fnd_File.LOG, ' before call to jai_cmn_rgm_setup_pkg.Gen_Invoice_number with ln_order_type_id' || ln_order_type_id || 'date ' || mainrec.delivery_date );
4095: END IF; -- lv_Debug = 'Y'

Line 4111: IF lv_inv_gen_process_flag = jai_constants.successful

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
4115: ln_success_delivery_Ctr := NVL(ln_success_Delivery_Ctr,0) + 1;

Line 4116: lv_inv_num_already_generated := jai_constants.value_true;

4112: THEN
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

Line 4136: lv_inv_gen_process_flag := jai_constants.unexpected_error;

4132: , last_update_login = fnd_global.conc_login_id
4133: , last_update_date = sysdate
4134: WHERE order_line_id = mainrec.order_line_id;
4135: ELSE
4136: lv_inv_gen_process_flag := jai_constants.unexpected_error;
4137: lv_acct_process_flag := jai_constants.expected_error;
4138: ln_failure_delivery_ctr := NVL(ln_failure_Delivery_ctr,0) + 1;
4139: END IF; -- lv_vat_invoice_number IS NOT NULL
4140: ELSE

Line 4137: lv_acct_process_flag := jai_constants.expected_error;

4133: , last_update_date = sysdate
4134: WHERE order_line_id = mainrec.order_line_id;
4135: ELSE
4136: lv_inv_gen_process_flag := jai_constants.unexpected_error;
4137: lv_acct_process_flag := jai_constants.expected_error;
4138: ln_failure_delivery_ctr := NVL(ln_failure_Delivery_ctr,0) + 1;
4139: END IF; -- lv_vat_invoice_number IS NOT NULL
4140: ELSE
4141: ln_failure_delivery_ctr := NVL(ln_failure_Delivery_ctr,0) + 1;

Line 4142: END IF; -- lv_inv_gen_process_flag = jai_constants.successful

4138: ln_failure_delivery_ctr := NVL(ln_failure_Delivery_ctr,0) + 1;
4139: END IF; -- lv_vat_invoice_number IS NOT NULL
4140: ELSE
4141: ln_failure_delivery_ctr := NVL(ln_failure_Delivery_ctr,0) + 1;
4142: END IF; -- lv_inv_gen_process_flag = jai_constants.successful
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;

Line 4143: --END IF; -- lv_inv_num_already_generated = jai_constants.value_false

4139: END IF; -- lv_vat_invoice_number IS NOT NULL
4140: ELSE
4141: ln_failure_delivery_ctr := NVL(ln_failure_Delivery_ctr,0) + 1;
4142: END IF; -- lv_inv_gen_process_flag = jai_constants.successful
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;

Line 4144: END IF; -- p_process_action in (jai_constants.om_action_gen_inv_n_accnt ,jai_constants.om_action_gen_invoice)

4140: ELSE
4141: ln_failure_delivery_ctr := NVL(ln_failure_Delivery_ctr,0) + 1;
4142: END IF; -- lv_inv_gen_process_flag = jai_constants.successful
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: */

Line 4185: IF p_process_action in (jai_constants.om_action_gen_inv_n_accnt,jai_constants.om_action_gen_accounting) THEN

4181: IF lv_debug = 'Y' THEN
4182: Fnd_File.PUT_LINE(Fnd_File.LOG, ' In process accounting section with p_process_action = ' || p_process_action);
4183: END IF;
4184:
4185: IF p_process_action in (jai_constants.om_action_gen_inv_n_accnt,jai_constants.om_action_gen_accounting) THEN
4186: /*
4187: || Only In case the parameter p_process_action in ('PROCESS ALL','PROCESS ACCOUNTING') AND
4188: ||
4189: */

Line 4199: IF lv_inv_gen_process_flag = jai_constants.successful THEN

4195: END IF;
4196: IF lv_Debug = 'Y' THEN
4197: Fnd_File.PUT_LINE(Fnd_File.LOG, ' lv_inv_gen_process_flag = ' || lv_inv_gen_process_flag );
4198: END IF;
4199: IF lv_inv_gen_process_flag = jai_constants.successful THEN
4200:
4201: IF lv_vat_invoice_number IS NULL THEN
4202: lv_vat_invoice_number:= mainrec.vat_invoice_no;
4203: END IF;

Line 4205: IF p_process_action = jai_constants.om_action_gen_accounting

4201: IF lv_vat_invoice_number IS NULL THEN
4202: lv_vat_invoice_number:= mainrec.vat_invoice_no;
4203: END IF;
4204:
4205: IF p_process_action = jai_constants.om_action_gen_accounting
4206: THEN
4207: lv_vat_invoice_number := mainrec.vat_invoice_no;
4208: END IF;
4209:

Line 4217: -- P_SOURCE => jai_constants.source_wsh ,

4213: jai_cmn_rgm_vat_accnt_pkg.process_order_invoice(
4214: P_REGIME_ID => ln_regime_id ,
4215: -- modified by Allen Yang for bug 9485355 (12.1.3 non-shippable Enhancement), begin
4216: P_SOURCE => lv_p_source,
4217: -- P_SOURCE => jai_constants.source_wsh ,
4218: -- modified by Allen Yang for bug 9485355 (12.1.3 non-shippable Enhancement), end
4219: P_ORGANIZATION_ID => mainrec.organization_id,
4220: P_LOCATION_ID => mainrec.location_id ,
4221: P_DELIVERY_ID => mainrec.delivery_id ,

Line 4238: IF lv_acct_process_flag = jai_constants.successful THEN

4234: );
4235: IF lv_Debug = 'Y' THEN
4236: Fnd_File.PUT_LINE(Fnd_File.LOG, 'after Call to jai_cmn_rgm_vat_accnt_pkg.process_order_invoice with status = ' || lv_acct_process_flag);
4237: END IF;
4238: IF lv_acct_process_flag = jai_constants.successful THEN
4239: /*
4240: || If the control comes here it means that Accounting got processed successfully.
4241: || Check here if Delivery for successfully processed and invoice got successfully processed
4242: || and only then do a commit

Line 4244: IF lv_inv_gen_process_flag = jai_constants.successful AND lv_acct_process_flag = jai_constants.successful THEN

4240: || If the control comes here it means that Accounting got processed successfully.
4241: || Check here if Delivery for successfully processed and invoice got successfully processed
4242: || and only then do a commit
4243: */
4244: IF lv_inv_gen_process_flag = jai_constants.successful AND lv_acct_process_flag = jai_constants.successful THEN
4245: /*
4246: || Both the activities have been succesfully completed
4247: || Can commit the changes made to the delivery.
4248: */

Line 4269: IF lv_inv_gen_process_flag <> jai_constants.successful OR lv_acct_process_flag <> jai_constants.successful THEN

4265: ln_failure_delivery_ctr := NVL(ln_failure_Delivery_ctr,0) + 1;
4266: Fnd_File.PUT_LINE(Fnd_File.LOG, 'Error Encountered after call to process_order_invoice is ' || lv_acct_process_message);
4267: END IF;
4268:
4269: IF lv_inv_gen_process_flag <> jai_constants.successful OR lv_acct_process_flag <> jai_constants.successful THEN
4270:
4271: /*
4272: || There have been some errors which have happened during accounting
4273: */

Line 4276: IF lv_inv_gen_process_flag <> jai_constants.successful THEN

4272: || There have been some errors which have happened during accounting
4273: */
4274: ROLLBACK;
4275:
4276: IF lv_inv_gen_process_flag <> jai_constants.successful THEN
4277: UPDATE JAI_RGM_INVOICE_GEN_T
4278: SET vat_inv_gen_err_message = substr(lv_inv_gen_process_message,1,1000),
4279: vat_inv_gen_status = 'E',
4280: request_id = ln_conc_request_id, /*following columns added by srjayara for bug 4702156*/

Line 4292: IF lv_acct_process_flag <> jai_constants.successful THEN

4288: OR order_line_id = NVL(mainrec.order_line_id, -1);
4289: -- modified by Allen Yang for bug 9485355 (12.1.3 non-shippable Enhancement), end
4290: END IF;
4291:
4292: IF lv_acct_process_flag <> jai_constants.successful THEN
4293: UPDATE JAI_RGM_INVOICE_GEN_T
4294: SET vat_acct_err_message = substr(lv_acct_process_message,1,1000),
4295: vat_acct_status = 'E',
4296: request_id = ln_conc_request_id, /*following columns added by srjayara for bug 4702156*/

Line 4310: END IF; /* END IF For IF lv_inv_gen_process_flag = jai_constants.successful THEN */

4306: END IF;
4307: COMMIT;
4308: END IF;
4309:
4310: END IF; /* END IF For IF lv_inv_gen_process_flag = jai_constants.successful THEN */
4311: END IF; /* END IF For IF p_process_action in ('ALL','PROCESS ACCOUNTING') THEN */
4312: <>
4313: NULL;
4314: END LOOP;

Line 4371: (lv_Same_invoice_no = jai_constants.yes) AND

4367: END IF;
4368:
4369: -- added by Allen Yang for bug 9709477 13-May-2010, begin
4370: IF (
4371: (lv_Same_invoice_no = jai_constants.yes) AND
4372: (NVL(p_single_invoice_num,jai_constants.No) = jai_constants.yes)
4373: )
4374: THEN
4375: lv_same_as_excise_conf_warning := '"Generate Single Invoice" is applicable only when "VAT invoice number same as Excise invoice number" is set as No.';

Line 4372: (NVL(p_single_invoice_num,jai_constants.No) = jai_constants.yes)

4368:
4369: -- added by Allen Yang for bug 9709477 13-May-2010, begin
4370: IF (
4371: (lv_Same_invoice_no = jai_constants.yes) AND
4372: (NVL(p_single_invoice_num,jai_constants.No) = jai_constants.yes)
4373: )
4374: THEN
4375: lv_same_as_excise_conf_warning := '"Generate Single Invoice" is applicable only when "VAT invoice number same as Excise invoice number" is set as No.';
4376: -- added by Allen Yang for bug 9737119, begin

Line 4386: END IF; -- (lv_Same_invoice_no = jai_constants.yes) AND ......

4382: retcode := '1';
4383: -- added by zhiwei.xin on 10-JAN-2013 for bug#16167577 wsh error handling begin
4384: errbuf := lv_same_as_excise_conf_warning;
4385: -- added by zhiwei.xin on 10-JAN-2013 for bug#16167577 wsh error handling end.
4386: END IF; -- (lv_Same_invoice_no = jai_constants.yes) AND ......
4387: -- added by Allen Yang for bug 9709477 13-May-2010, end
4388:
4389: EXCEPTION
4390: WHEN OTHERS THEN

Line 4395: lv_inv_gen_process_flag := jai_constants.unexpected_error;

4391: RETCODE := '2';
4392: Fnd_File.PUT_LINE(Fnd_File.LOG,'Unexpected Error occured in procedure jai_cmn_rgm_processing_pkg.process '||substr(sqlerrm,1,300));
4393: lb_completion_status := FND_CONCURRENT.SET_COMPLETION_STATUS('ERROR',substr(sqlerrm,1,1000));
4394: ERRBUF := substr(sqlerrm,1,1000);
4395: lv_inv_gen_process_flag := jai_constants.unexpected_error;
4396: lv_acct_process_flag := jai_constants.unexpected_error;
4397: lv_inv_gen_process_message := sqlerrm;
4398: lv_acct_process_message := sqlerrm;
4399:

Line 4396: lv_acct_process_flag := jai_constants.unexpected_error;

4392: Fnd_File.PUT_LINE(Fnd_File.LOG,'Unexpected Error occured in procedure jai_cmn_rgm_processing_pkg.process '||substr(sqlerrm,1,300));
4393: lb_completion_status := FND_CONCURRENT.SET_COMPLETION_STATUS('ERROR',substr(sqlerrm,1,1000));
4394: ERRBUF := substr(sqlerrm,1,1000);
4395: lv_inv_gen_process_flag := jai_constants.unexpected_error;
4396: lv_acct_process_flag := jai_constants.unexpected_error;
4397: lv_inv_gen_process_message := sqlerrm;
4398: lv_acct_process_message := sqlerrm;
4399:
4400: END PROCESS;

Line 4461: AND ( aid.line_type_lookup_code = jai_constants.misc_line

4457: AND aid.accounting_event_id = xah.event_id
4458: AND ai.invoice_type_lookup_code IN ('STANDARD', 'DEBIT', 'CREDIT')
4459: AND aid.parent_reversal_id IS NULL
4460: AND nvl(aid.reversal_flag, 'N') = 'N' /*12793930 - Ensure Repository entries are not passed if a line is discarded*/
4461: AND ( aid.line_type_lookup_code = jai_constants.misc_line
4462: OR EXISTS (SELECT 1
4463: FROM jai_rcv_tp_invoices jtp
4464: WHERE AID.invoice_id = jtp.invoice_id))
4465: AND aid.posted_flag = 'Y'

Line 4517: AND aid.line_type_lookup_code = jai_constants.misc_line

4513: WHERE aid.invoice_id = ai.invoice_id
4514: AND aid.set_of_books_id = cp_sob_id
4515: AND ai.invoice_type_lookup_code IN ('STANDARD', 'DEBIT', 'CREDIT')
4516: AND ai.cancelled_date IS NOT NULL
4517: AND aid.line_type_lookup_code = jai_constants.misc_line
4518: AND aid.accounting_date between trunc(cp_start_date) AND (trunc(cp_till_date+1)-1/(24*60*60))
4519: AND ai.org_id = p_org_id
4520: AND aid.org_id = p_org_id
4521: AND aid.parent_reversal_id IS NOT NULL

Line 4589: WHERE regime_code = jai_constants.service_regime)

4585: select to_date(attribute_value, 'DD/MM/YYYY')
4586: from JAI_RGM_ORG_REGNS_V
4587: where regime_id = (SELECT regime_id
4588: FROM JAI_RGM_DEFINITIONS
4589: WHERE regime_code = jai_constants.service_regime)
4590: and organization_id = p_organization_id
4591: and location_id = p_location_id
4592: AND attribute_code = 'EFF_DATE_ST_PT'
4593: AND attribute_type_code = 'OTHERS'

Line 4941: IF lv_process_flag <> jai_constants.successful THEN

4937: p_service_type_code => lv_service_type_code,
4938: p_process_flag => lv_process_flag,
4939: p_process_message => lv_process_message);
4940:
4941: IF lv_process_flag <> jai_constants.successful THEN
4942: FND_FILE.put_line(fnd_file.log, 'Error Flag:'||lv_process_flag||' Error Message:'||lv_process_message);
4943: RETURN;
4944: END IF;
4945:

Line 4985: p_accntg_required_flag => jai_constants.no,

4981: p_curr_conv_date => rec_get_curr_dtls.exchange_date,
4982: p_curr_conv_type => rec_get_curr_dtls.exchange_rate_type,
4983: p_curr_conv_rate => rec_get_curr_dtls.exchange_rate,
4984: p_trx_amount => rec_ap_ref_records.trx_tax_amount,
4985: p_accntg_required_flag => jai_constants.no,
4986: p_accrual_basis => 'Y');
4987:
4988:
4989: IF lv_process_flag = jai_constants.expected_error OR

Line 4989: IF lv_process_flag = jai_constants.expected_error OR

4985: p_accntg_required_flag => jai_constants.no,
4986: p_accrual_basis => 'Y');
4987:
4988:
4989: IF lv_process_flag = jai_constants.expected_error OR
4990: lv_process_flag = jai_constants.unexpected_error THEN
4991: fnd_file.put_line( fnd_file.log,
4992: '5.1 ERROR IN CALL TO jai_cmn_rgm_processing_pkg.populate_repository - lv_process_flag '||lv_process_flag
4993: ||', lv_process_message'||lv_process_message);

Line 4990: lv_process_flag = jai_constants.unexpected_error THEN

4986: p_accrual_basis => 'Y');
4987:
4988:
4989: IF lv_process_flag = jai_constants.expected_error OR
4990: lv_process_flag = jai_constants.unexpected_error THEN
4991: fnd_file.put_line( fnd_file.log,
4992: '5.1 ERROR IN CALL TO jai_cmn_rgm_processing_pkg.populate_repository - lv_process_flag '||lv_process_flag
4993: ||', lv_process_message'||lv_process_message);
4994: p_process_flag := lv_process_flag;

Line 5027: IF lv_process_flag <> jai_constants.successful THEN

5023: p_service_type_code => lv_service_type_code,
5024: p_process_flag => lv_process_flag,
5025: p_process_message => lv_process_message);
5026:
5027: IF lv_process_flag <> jai_constants.successful THEN
5028: FND_FILE.put_line(fnd_file.log, 'Error Flag:'||lv_process_flag||' Error Message:'||lv_process_message);
5029: RETURN;
5030: END IF;
5031:

Line 5044: lv_account_name := jai_constants.recovery;

5040: FETCH check_same_period_cur INTO lv_same_period_flag;
5041: CLOSE check_same_period_cur;
5042:
5043: IF lv_same_period_flag = 'Y' THEN
5044: lv_account_name := jai_constants.recovery;
5045: ELSE
5046: lv_account_name := jai_constants.liability;
5047: END IF;
5048:

Line 5046: lv_account_name := jai_constants.liability;

5042:
5043: IF lv_same_period_flag = 'Y' THEN
5044: lv_account_name := jai_constants.recovery;
5045: ELSE
5046: lv_account_name := jai_constants.liability;
5047: END IF;
5048:
5049: jai_cmn_rgm_recording_pkg.insert_repository_entry(
5050: p_repository_id => ln_repository_id,

Line 5081: p_accntg_required_flag => jai_constants.no,

5077: p_curr_conv_date => rec_get_curr_dtls.exchange_date,
5078: p_curr_conv_type => rec_get_curr_dtls.exchange_rate_type,
5079: p_curr_conv_rate => rec_get_curr_dtls.exchange_rate,
5080: p_trx_amount => rec_ap_ref_records.trx_tax_amount,
5081: p_accntg_required_flag => jai_constants.no,
5082: p_accrual_basis => 'Y');
5083:
5084: IF lv_process_flag = jai_constants.expected_error OR
5085: lv_process_flag = jai_constants.unexpected_error THEN

Line 5084: IF lv_process_flag = jai_constants.expected_error OR

5080: p_trx_amount => rec_ap_ref_records.trx_tax_amount,
5081: p_accntg_required_flag => jai_constants.no,
5082: p_accrual_basis => 'Y');
5083:
5084: IF lv_process_flag = jai_constants.expected_error OR
5085: lv_process_flag = jai_constants.unexpected_error THEN
5086: fnd_file.put_line( fnd_file.log,
5087: '5.1 ERROR IN CALL TO jai_cmn_rgm_processing_pkg.populate_repository - lv_process_flag '||lv_process_flag
5088: ||', lv_process_message'||lv_process_message);

Line 5085: lv_process_flag = jai_constants.unexpected_error THEN

5081: p_accntg_required_flag => jai_constants.no,
5082: p_accrual_basis => 'Y');
5083:
5084: IF lv_process_flag = jai_constants.expected_error OR
5085: lv_process_flag = jai_constants.unexpected_error THEN
5086: fnd_file.put_line( fnd_file.log,
5087: '5.1 ERROR IN CALL TO jai_cmn_rgm_processing_pkg.populate_repository - lv_process_flag '||lv_process_flag
5088: ||', lv_process_message'||lv_process_message);
5089: p_process_flag := lv_process_flag;

Line 5150: IF lv_process_flag <> jai_constants.successful THEN

5146: p_service_type_code => lv_service_type_code,
5147: p_process_flag => lv_process_flag,
5148: p_process_message => lv_process_message);
5149:
5150: IF lv_process_flag <> jai_constants.successful THEN
5151: FND_FILE.put_line(fnd_file.log, 'Error Flag:'||lv_process_flag||' Error Message:'||lv_process_message);
5152: RETURN;
5153: END IF;
5154:

Line 5158: ln_tax_amount := round(ln_reversal_amount * ln_tax_amount/ln_rec_total_tax_amount, jai_constants.service_rgm_rnd_factor);

5154:
5155: ln_tax_amount := rec_reversal_entries.tax_amt;
5156:
5157:
5158: ln_tax_amount := round(ln_reversal_amount * ln_tax_amount/ln_rec_total_tax_amount, jai_constants.service_rgm_rnd_factor);
5159:
5160:
5161: jai_cmn_rgm_recording_pkg.insert_repository_entry(
5162: p_repository_id => ln_repository_id,

Line 5194: p_accntg_required_flag => jai_constants.no,

5190: p_curr_conv_date => rec_get_curr_dtls.exchange_date,
5191: p_curr_conv_type => rec_get_curr_dtls.exchange_rate_type,
5192: p_curr_conv_rate => rec_get_curr_dtls.exchange_rate,
5193: p_trx_amount => ln_tax_amount,--lr_trx_refs.trx_tax_amount,
5194: p_accntg_required_flag => jai_constants.no,
5195: p_accrual_basis => 'Y');
5196:
5197: IF lv_process_flag = jai_constants.expected_error OR
5198: lv_process_flag = jai_constants.unexpected_error THEN

Line 5197: IF lv_process_flag = jai_constants.expected_error OR

5193: p_trx_amount => ln_tax_amount,--lr_trx_refs.trx_tax_amount,
5194: p_accntg_required_flag => jai_constants.no,
5195: p_accrual_basis => 'Y');
5196:
5197: IF lv_process_flag = jai_constants.expected_error OR
5198: lv_process_flag = jai_constants.unexpected_error THEN
5199: fnd_file.put_line( fnd_file.log,
5200: '5.1 ERROR IN CALL TO jai_cmn_rgm_processing_pkg.populate_repository - lv_process_flag '||lv_process_flag
5201: ||', lv_process_message'||lv_process_message);

Line 5198: lv_process_flag = jai_constants.unexpected_error THEN

5194: p_accntg_required_flag => jai_constants.no,
5195: p_accrual_basis => 'Y');
5196:
5197: IF lv_process_flag = jai_constants.expected_error OR
5198: lv_process_flag = jai_constants.unexpected_error THEN
5199: fnd_file.put_line( fnd_file.log,
5200: '5.1 ERROR IN CALL TO jai_cmn_rgm_processing_pkg.populate_repository - lv_process_flag '||lv_process_flag
5201: ||', lv_process_message'||lv_process_message);
5202: p_process_flag := lv_process_flag;

Line 5254: IF lv_process_flag <> jai_constants.successful THEN

5250: p_service_type_code => lv_service_type_code,
5251: p_process_flag => lv_process_flag,
5252: p_process_message => lv_process_message);
5253:
5254: IF lv_process_flag <> jai_constants.successful THEN
5255: FND_FILE.put_line(fnd_file.log, 'Error Flag:'||lv_process_flag||' Error Message:'||lv_process_message);
5256: RETURN;
5257: END IF;
5258:

Line 5262: jai_constants.service_rgm_rnd_factor);

5258:
5259: ld_accounting_date := rec_claim_line.accounting_date;
5260:
5261: ln_tax_amount := round(nvl(rec_claim_line.claim_amt, 0) * rec_claim_entries.tax_amt/ln_total_amount,
5262: jai_constants.service_rgm_rnd_factor);
5263:
5264: IF nvl(ln_tax_amount, 0) > 0 THEN
5265: jai_cmn_rgm_recording_pkg.insert_repository_entry(
5266: p_repository_id => ln_repository_id,

Line 5297: p_accntg_required_flag => jai_constants.no,

5293: p_curr_conv_date => rec_get_curr_dtls.exchange_date,
5294: p_curr_conv_type => rec_get_curr_dtls.exchange_rate_type,
5295: p_curr_conv_rate => rec_get_curr_dtls.exchange_rate,
5296: p_trx_amount => ln_tax_amount,--lr_trx_refs.trx_tax_amount,
5297: p_accntg_required_flag => jai_constants.no,
5298: p_accrual_basis => 'Y');
5299:
5300: IF lv_process_flag = jai_constants.expected_error OR
5301: lv_process_flag = jai_constants.unexpected_error THEN

Line 5300: IF lv_process_flag = jai_constants.expected_error OR

5296: p_trx_amount => ln_tax_amount,--lr_trx_refs.trx_tax_amount,
5297: p_accntg_required_flag => jai_constants.no,
5298: p_accrual_basis => 'Y');
5299:
5300: IF lv_process_flag = jai_constants.expected_error OR
5301: lv_process_flag = jai_constants.unexpected_error THEN
5302: fnd_file.put_line( fnd_file.log,
5303: '5.1 ERROR IN CALL TO jai_cmn_rgm_processing_pkg.populate_repository - lv_process_flag '||lv_process_flag
5304: ||', lv_process_message'||lv_process_message);

Line 5301: lv_process_flag = jai_constants.unexpected_error THEN

5297: p_accntg_required_flag => jai_constants.no,
5298: p_accrual_basis => 'Y');
5299:
5300: IF lv_process_flag = jai_constants.expected_error OR
5301: lv_process_flag = jai_constants.unexpected_error THEN
5302: fnd_file.put_line( fnd_file.log,
5303: '5.1 ERROR IN CALL TO jai_cmn_rgm_processing_pkg.populate_repository - lv_process_flag '||lv_process_flag
5304: ||', lv_process_message'||lv_process_message);
5305: p_process_flag := lv_process_flag;