DBA Data[Home] [Help]

APPS.JAI_AR_IMPORT_SYNC_PKG dependencies on JAI_CONSTANTS

Line 215: lv_action := jai_constants.updating ;

211:
212:
213: if(t_rec_new.once_completed_flag = 'Y')then
214:
215: lv_action := jai_constants.updating ;
216:
217: JAI_AR_TRXS_PKG.UPDATE_EXCISE_REGISTERS(
218: pr_old => t_rec_old ,
219: pr_new => t_rec_new ,

Line 225: IF lv_return_code <> jai_constants.successful then

221: pv_return_code => lv_return_code ,
222: pv_return_message => lv_return_message
223: );
224:
225: IF lv_return_code <> jai_constants.successful then
226: RAISE le_error;
227: END IF;
228:
229: end if;

Line 251: pv_return_code := jai_constants.successful ;

247: G_PKG_NAME || ': ' || l_api_name || '()+');
248: end if;
249:
250:
251: pv_return_code := jai_constants.successful ;
252: Open C_VAT_INVOICE_CUR;
253: Fetch C_VAT_INVOICE_CUR into v_loc_vat_inv_no;
254: close C_VAT_INVOICE_CUR;
255:

Line 290: Pv_return_code := jai_constants.unexpected_error;

286: end if;
287:
288: EXCEPTION
289: WHEN OTHERS THEN
290: Pv_return_code := jai_constants.unexpected_error;
291: Pv_return_message := 'Encountered an error in JAI_AR_IMPORT_SYNC_PKG.GEN_VAT_FOR_INV ' || substr(sqlerrm,1,1900);
292: END gen_vat_for_inv ;
293:
294: /*

Line 347: pv_return_code := jai_constants.successful ;

343: --Added by Zhiwei for JAI Trigger elimination end
344: l_api_name CONSTANT VARCHAR2(30) := 'UPDATE_TRX_NUMBER()';
345:
346: BEGIN
347: pv_return_code := jai_constants.successful ;
348:
349: if (G_LEVEL_PROCEDURE >= G_CURRENT_RUNTIME_LEVEL) then
350: FND_LOG.STRING(G_LEVEL_PROCEDURE,
351: G_MODULE_NAME || l_api_name || '.BEGIN',

Line 383: lv_action := jai_constants.updating ;

379: close c_get_rec;
380:
381: if(t_rec_new.once_completed_flag = 'Y')then
382:
383: lv_action := jai_constants.updating ;
384:
385: JAI_AR_TRXS_PKG.UPDATE_EXCISE_REGISTERS(
386: pr_old => t_rec_old ,
387: pr_new => t_rec_new ,

Line 393: IF lv_return_code <> jai_constants.successful then

389: pv_return_code => lv_return_code ,
390: pv_return_message => lv_return_message
391: );
392:
393: IF lv_return_code <> jai_constants.successful then
394: RAISE le_error;
395: END IF;
396:
397: end if;

Line 419: lv_action := jai_constants.UPDATING;

415: Update JAI_AR_TRX_LINES
416: Set Customer_Trx_Id = pr_new.Customer_Trx_ID
417: Where Customer_Trx_Line_ID = c_jai_ar_trx_lines_rec.customer_trx_line_id;
418:
419: lv_action := jai_constants.UPDATING;
420:
421: OPEN c_jai_ar_trx_lines(c_jai_ar_trx_lines_rec.customer_trx_line_id);
422: FETCH c_jai_ar_trx_lines into t_jai_line_rec_new;
423: CLOSE c_jai_ar_trx_lines;

Line 442: IF lv_return_code <> jai_constants.successful THEN

438: pv_action => lv_action ,
439: pv_return_code => lv_return_code ,
440: pv_return_message => lv_return_message
441: );
442: IF lv_return_code <> jai_constants.successful THEN
443: RAISE le_error;
444: END IF;
445: END IF;
446: END LOOP;

Line 472: lv_action := jai_constants.updating ;

468:
469:
470: if(t_rec_new.once_completed_flag = 'Y')then
471:
472: lv_action := jai_constants.updating ;
473:
474: JAI_AR_TRXS_PKG.UPDATE_EXCISE_REGISTERS(
475: pr_old => t_rec_old ,
476: pr_new => t_rec_new ,

Line 482: IF lv_return_code <> jai_constants.successful then

478: pv_return_code => lv_return_code ,
479: pv_return_message => lv_return_message
480: );
481:
482: IF lv_return_code <> jai_constants.successful then
483: RAISE le_error;
484: END IF;
485:
486: end if;

Line 539: lv_action := jai_constants.updating ;

535:
536:
537: if(t_rec_new.once_completed_flag = 'Y')then
538:
539: lv_action := jai_constants.updating ;
540:
541: JAI_AR_TRXS_PKG.UPDATE_EXCISE_REGISTERS(
542: pr_old => t_rec_old ,
543: pr_new => t_rec_new ,

Line 549: IF lv_return_code <> jai_constants.successful then

545: pv_return_code => lv_return_code ,
546: pv_return_message => lv_return_message
547: );
548:
549: IF lv_return_code <> jai_constants.successful then
550: RAISE le_error;
551: END IF;
552:
553: end if;

Line 565: Pv_return_code := jai_constants.unexpected_error;

561:
562:
563: EXCEPTION
564: WHEN OTHERS THEN
565: Pv_return_code := jai_constants.unexpected_error;
566: Pv_return_message := 'Encountered an error in JAI_AR_IMPORT_SYNC_PKG.UPDATE_TRX_NUMBER ' || substr(sqlerrm,1,1900);
567: END update_trx_number ;
568:
569: /*

Line 744: (jai_constants.tax_type_excise,jai_constants.tax_type_exc_additional,jai_constants.tax_type_exc_other)

740: JAI_CMN_TAXES_ALL B,
741: JAI_INV_ITM_SETUPS C
742: WHERE link_to_cust_trx_line_id = p_line_id
743: AND b.tax_type IN --('Excise','Addl. Excise','Other Excise')
744: (jai_constants.tax_type_excise,jai_constants.tax_type_exc_additional,jai_constants.tax_type_exc_other)
745: AND A.tax_id = b.tax_id
746: AND c.inventory_item_id = p_inventory_item_id
747: AND c.organization_id = p_org_id
748: --AND c.item_class IN ('RMIN','RMEX','CGEX','CGIN','CCEX','CCIN','FGIN','FGEX')

Line 749: AND c.item_class IN ( jai_constants.item_class_rmin, jai_constants.item_class_rmex,

745: AND A.tax_id = b.tax_id
746: AND c.inventory_item_id = p_inventory_item_id
747: AND c.organization_id = p_org_id
748: --AND c.item_class IN ('RMIN','RMEX','CGEX','CGIN','CCEX','CCIN','FGIN','FGEX')
749: AND c.item_class IN ( jai_constants.item_class_rmin, jai_constants.item_class_rmex,
750: jai_constants.item_class_cgex, jai_constants.item_class_cgin,
751: jai_constants.item_class_ccex, jai_constants.item_class_ccin,
752: jai_constants.item_class_fgin, jai_constants.item_class_fgex
753: )

Line 750: jai_constants.item_class_cgex, jai_constants.item_class_cgin,

746: AND c.inventory_item_id = p_inventory_item_id
747: AND c.organization_id = p_org_id
748: --AND c.item_class IN ('RMIN','RMEX','CGEX','CGIN','CCEX','CCIN','FGIN','FGEX')
749: AND c.item_class IN ( jai_constants.item_class_rmin, jai_constants.item_class_rmex,
750: jai_constants.item_class_cgex, jai_constants.item_class_cgin,
751: jai_constants.item_class_ccex, jai_constants.item_class_ccin,
752: jai_constants.item_class_fgin, jai_constants.item_class_fgex
753: )
754: ORDER BY 1;

Line 751: jai_constants.item_class_ccex, jai_constants.item_class_ccin,

747: AND c.organization_id = p_org_id
748: --AND c.item_class IN ('RMIN','RMEX','CGEX','CGIN','CCEX','CCIN','FGIN','FGEX')
749: AND c.item_class IN ( jai_constants.item_class_rmin, jai_constants.item_class_rmex,
750: jai_constants.item_class_cgex, jai_constants.item_class_cgin,
751: jai_constants.item_class_ccex, jai_constants.item_class_ccin,
752: jai_constants.item_class_fgin, jai_constants.item_class_fgex
753: )
754: ORDER BY 1;
755:

Line 752: jai_constants.item_class_fgin, jai_constants.item_class_fgex

748: --AND c.item_class IN ('RMIN','RMEX','CGEX','CGIN','CCEX','CCIN','FGIN','FGEX')
749: AND c.item_class IN ( jai_constants.item_class_rmin, jai_constants.item_class_rmex,
750: jai_constants.item_class_cgex, jai_constants.item_class_cgin,
751: jai_constants.item_class_ccex, jai_constants.item_class_ccin,
752: jai_constants.item_class_fgin, jai_constants.item_class_fgex
753: )
754: ORDER BY 1;
755:
756: CURSOR ssi_unit_flag_cur(p_org_id IN NUMBER, p_loc_id IN NUMBER) IS

Line 823: AND b.tax_type = jai_constants.tax_type_modvat_recovery ; --'Modvat Recovery';

819: SELECT A.tax_rate
820: FROM JAI_AR_TRX_TAX_LINES A, JAI_CMN_TAXES_ALL b
821: WHERE A.tax_id = b.tax_id
822: AND A.link_to_cust_trx_line_id = p_cust_trx_line_id
823: AND b.tax_type = jai_constants.tax_type_modvat_recovery ; --'Modvat Recovery';
824:
825:
826: v_start_number NUMBER;
827: v_end_number NUMBER;

Line 856: AND jmtl.item_class IN ( jai_constants.item_class_rmin, jai_constants.item_class_rmex,

852: AND jrtl.link_to_cust_trx_line_id = jtl.customer_trx_line_id
853: AND jtl.inventory_item_id = jmtl.inventory_item_id
854: AND jtrx.organization_id = jmtl.organization_id
855: --AND jmtl.item_class in ('RMIN','RMEX','CGEX','CGIN','FGIN','FGEX','CCIN','CCEX')
856: AND jmtl.item_class IN ( jai_constants.item_class_rmin, jai_constants.item_class_rmex,
857: jai_constants.item_class_cgex, jai_constants.item_class_cgin,
858: jai_constants.item_class_ccex, jai_constants.item_class_ccin,
859: jai_constants.item_class_fgin, jai_constants.item_class_fgex
860: )

Line 857: jai_constants.item_class_cgex, jai_constants.item_class_cgin,

853: AND jtl.inventory_item_id = jmtl.inventory_item_id
854: AND jtrx.organization_id = jmtl.organization_id
855: --AND jmtl.item_class in ('RMIN','RMEX','CGEX','CGIN','FGIN','FGEX','CCIN','CCEX')
856: AND jmtl.item_class IN ( jai_constants.item_class_rmin, jai_constants.item_class_rmex,
857: jai_constants.item_class_cgex, jai_constants.item_class_cgin,
858: jai_constants.item_class_ccex, jai_constants.item_class_ccin,
859: jai_constants.item_class_fgin, jai_constants.item_class_fgex
860: )
861: AND jtc.tax_type like '%Excise%'

Line 858: jai_constants.item_class_ccex, jai_constants.item_class_ccin,

854: AND jtrx.organization_id = jmtl.organization_id
855: --AND jmtl.item_class in ('RMIN','RMEX','CGEX','CGIN','FGIN','FGEX','CCIN','CCEX')
856: AND jmtl.item_class IN ( jai_constants.item_class_rmin, jai_constants.item_class_rmex,
857: jai_constants.item_class_cgex, jai_constants.item_class_cgin,
858: jai_constants.item_class_ccex, jai_constants.item_class_ccin,
859: jai_constants.item_class_fgin, jai_constants.item_class_fgex
860: )
861: AND jtc.tax_type like '%Excise%'
862: AND jtl.customer_trx_id = pr_new.customer_trx_id

Line 859: jai_constants.item_class_fgin, jai_constants.item_class_fgex

855: --AND jmtl.item_class in ('RMIN','RMEX','CGEX','CGIN','FGIN','FGEX','CCIN','CCEX')
856: AND jmtl.item_class IN ( jai_constants.item_class_rmin, jai_constants.item_class_rmex,
857: jai_constants.item_class_cgex, jai_constants.item_class_cgin,
858: jai_constants.item_class_ccex, jai_constants.item_class_ccin,
859: jai_constants.item_class_fgin, jai_constants.item_class_fgex
860: )
861: AND jtc.tax_type like '%Excise%'
862: AND jtl.customer_trx_id = pr_new.customer_trx_id
863: AND jtrx.customer_trx_id = pr_new.customer_trx_id;

Line 877: AND upper(jtc.tax_type) IN (upper(jai_constants.tax_type_cvd_edu_cess), upper(jai_constants.tax_type_exc_edu_cess));

873: (SELECT customer_trx_line_id
874: FROM JAI_AR_TRX_LINES
875: WHERE customer_trx_id = pr_new.customer_trx_id
876: )
877: AND upper(jtc.tax_type) IN (upper(jai_constants.tax_type_cvd_edu_cess), upper(jai_constants.tax_type_exc_edu_cess));
878:
879:
880: /*
881: ||

Line 927: regime_code = jai_constants.vat_regime AND

923: jcttl.link_to_cust_trx_line_id = jctl.customer_trx_line_id AND
924: jctl.customer_trx_id = pr_new.customer_trx_id AND
925: jcttl.tax_id = jtc.tax_id AND
926: jtc.tax_type = jrttv.tax_type AND
927: regime_code = jai_constants.vat_regime AND
928: jtc.org_id = pr_new.org_id ;
929:
930: /*
931: ||

Line 959: regime_code = jai_constants.vat_regime

955: regime_id
956: FROM
957: jai_regime_tax_types_v
958: WHERE
959: regime_code = jai_constants.vat_regime
960: AND rownum = 1 ;
961:
962: ln_vat_reversal_exists NUMBER ;
963: lv_vat_reversal VARCHAR2(100);

Line 977: regime_code = jai_constants.vat_regime AND

973: nvl(attribute_value ,'N') attribute_value
974: FROM
975: JAI_RGM_ORG_REGNS_V
976: WHERE
977: regime_code = jai_constants.vat_regime AND
978: attribute_type_code = jai_constants.regn_type_others AND /*'OTHERS' AND */
979: attribute_code = jai_constants.attr_code_same_inv_no AND /*'SAME_INVOICE_NO' AND */
980: organization_id = cp_organization_id AND
981: location_id = cp_location_id;

Line 978: attribute_type_code = jai_constants.regn_type_others AND /*'OTHERS' AND */

974: FROM
975: JAI_RGM_ORG_REGNS_V
976: WHERE
977: regime_code = jai_constants.vat_regime AND
978: attribute_type_code = jai_constants.regn_type_others AND /*'OTHERS' AND */
979: attribute_code = jai_constants.attr_code_same_inv_no AND /*'SAME_INVOICE_NO' AND */
980: organization_id = cp_organization_id AND
981: location_id = cp_location_id;
982:

Line 979: attribute_code = jai_constants.attr_code_same_inv_no AND /*'SAME_INVOICE_NO' AND */

975: JAI_RGM_ORG_REGNS_V
976: WHERE
977: regime_code = jai_constants.vat_regime AND
978: attribute_type_code = jai_constants.regn_type_others AND /*'OTHERS' AND */
979: attribute_code = jai_constants.attr_code_same_inv_no AND /*'SAME_INVOICE_NO' AND */
980: organization_id = cp_organization_id AND
981: location_id = cp_location_id;
982:
983: CURSOR cur_get_exc_inv_no

Line 1060: AND attribute_type_code = jai_constants.rgm_attr_type_code_primary

1056: attribute_value
1057: FROM JAI_RGM_ORG_REGNS_V orrg
1058: WHERE orrg.organization_id = cp_organization_id
1059: AND orrg.location_id = cp_location_id
1060: AND attribute_type_code = jai_constants.rgm_attr_type_code_primary
1061: AND attribute_code = jai_constants.attr_code_regn_no
1062: AND regime_code = cp_regime_code;
1063:
1064:

Line 1061: AND attribute_code = jai_constants.attr_code_regn_no

1057: FROM JAI_RGM_ORG_REGNS_V orrg
1058: WHERE orrg.organization_id = cp_organization_id
1059: AND orrg.location_id = cp_location_id
1060: AND attribute_type_code = jai_constants.rgm_attr_type_code_primary
1061: AND attribute_code = jai_constants.attr_code_regn_no
1062: AND regime_code = cp_regime_code;
1063:
1064:
1065:

Line 1110: pv_return_code := jai_constants.successful ;

1106: end if;
1107:
1108:
1109:
1110: pv_return_code := jai_constants.successful ;
1111:
1112:
1113: v_complete_flag := 'N';
1114: v_rg_flag := 'N';

Line 1175: lv_action := jai_constants.updating ;

1171: close c_get_rec;
1172:
1173: if(t_rec_new.once_completed_flag = 'Y')then
1174:
1175: lv_action := jai_constants.updating ;
1176:
1177: JAI_AR_TRXS_PKG.UPDATE_EXCISE_REGISTERS(
1178: pr_old => t_rec_old ,
1179: pr_new => t_rec_new ,

Line 1185: IF lv_return_code <> jai_constants.successful then

1181: pv_return_code => lv_return_code ,
1182: pv_return_message => lv_return_message
1183: );
1184:
1185: IF lv_return_code <> jai_constants.successful then
1186: RAISE le_error;
1187: END IF;
1188:
1189: end if;

Line 1221: lv_action := jai_constants.updating ;

1217: close c_get_rec;
1218:
1219: if(t_rec_new.once_completed_flag = 'Y')then
1220:
1221: lv_action := jai_constants.updating ;
1222:
1223: JAI_AR_TRXS_PKG.UPDATE_EXCISE_REGISTERS(
1224: pr_old => t_rec_old ,
1225: pr_new => t_rec_new ,

Line 1231: IF lv_return_code <> jai_constants.successful then

1227: pv_return_code => lv_return_code ,
1228: pv_return_message => lv_return_message
1229: );
1230:
1231: IF lv_return_code <> jai_constants.successful then
1232: RAISE le_error;
1233: END IF;
1234:
1235: end if;

Line 1352: pv_return_code := jai_constants.expected_error ;

1348: CLOSE for_modvat_percentage;
1349: END IF;
1350: v_exempt_bal := (NVL(v_exempt_bal, 0) + line_rec.quantity * line_rec.assessable_value * NVL(v_modvat_tax_rate,0))/100;
1351: IF v_exempt_bal > v_rg23a_bal THEN
1352: pv_return_code := jai_constants.expected_error ;
1353: pv_return_message := 'Register RG23A PART II Balance -> '||
1354: TO_CHAR(v_rg23a_bal ) || ' IS less than the Modvat Amount ->' ||
1355: TO_CHAR(v_exempt_bal) ;
1356: return ;

Line 1381: pv_return_code := jai_constants.expected_error ;

1377: IF (v_register_balance < v_bond_tax_amount )
1378: AND
1379: ( NVL(v_lou_flag,'N') = 'N')
1380: THEN
1381: pv_return_code := jai_constants.expected_error ;
1382: pv_return_message := 'Bonded Register Has Balance -> ' || TO_CHAR(v_register_balance)
1383: || ' ,which IS less than Excisable Amount -> ' || TO_CHAR(v_bond_tax_amount) ;
1384: return ;
1385: END IF;

Line 1388: pv_return_code := jai_constants.expected_error ;

1384: return ;
1385: END IF;
1386:
1387: IF (nvl(v_register_exp_date,sysdate) < Sysdate ) THEN
1388: pv_return_code := jai_constants.expected_error ;
1389: pv_return_message := 'Validity Date of the Bond Register has expired' ;
1390: return ;
1391: END IF ;
1392: ELSIF v_reg_code IN ('23D_DOMESTIC_EXCISE','23D_EXPORT_EXCISE','23D_DOM_WITHOUT_EXCISE','23D_EXPORT_WITHOUT_EXCISE')

Line 1403: pv_return_code := jai_constants.expected_error ;

1399: FETCH matched_qty_cur INTO v_matched_qty;
1400: CLOSE matched_qty_cur;
1401: IF NVL(v_matched_qty,0)<> NVL(line_rec.quantity,0)
1402: THEN
1403: pv_return_code := jai_constants.expected_error ;
1404: pv_return_message := 'Matched Quantity -> ' || TO_CHAR(v_matched_qty)
1405: || ' , IS less than Invoiced Quantity -> ' || TO_CHAR(line_rec.quantity)
1406: || ' ,FOR line NUMBER -> ' || TO_CHAR(line_rec.line_number) ; return ;
1407: EXIT;

Line 1418: pv_return_code := jai_constants.expected_error ;

1414: v_rg23d_tax_amount := NVL(v_tax_amount,0) + NVL(v_rg23d_tax_amount,0);
1415: IF NVL(v_rg23d_register_balance,0) < NVL(v_rg23d_tax_amount,0)
1416: and (NVL(v_lou_flag,'N') = 'N')
1417: THEN
1418: pv_return_code := jai_constants.expected_error ;
1419: pv_return_message := 'RG23D Bonded Register Has Balance -> ' || TO_CHAR(v_rg23d_register_balance)
1420: || ' ,which IS less than Excisable Amount -> ' || TO_CHAR(v_rg23d_tax_amount) ;
1421: return ;
1422: END IF;

Line 1426: pv_return_code := jai_constants.expected_error ;

1422: END IF;
1423:
1424:
1425: IF (v_register_exp_date > Sysdate ) THEN
1426: pv_return_code := jai_constants.expected_error ;
1427: pv_return_message := 'Validity Date of the Bond Register has expired' ;
1428: return ;
1429: END IF;
1430: END IF;

Line 1462: pv_return_code := jai_constants.expected_error ;

1458: END IF;
1459:
1460: IF v_errbuf is not null THEN
1461:
1462: pv_return_code := jai_constants.expected_error ;
1463: pv_return_message := 'Error During Excise Invoice Generation ! ' || v_errbuf ;
1464: return ;
1465: END IF;
1466:

Line 1480: lv_action := jai_constants.UPDATING;

1476: WHERE CUSTOMER_TRX_LINE_ID = LINE_REC.customer_trx_line_id AND
1477: INVENTORY_ITEM_ID = LINE_REC.inventory_item_id AND
1478: CUSTOMER_TRX_ID = v_customer_trx_id;
1479:
1480: lv_action := jai_constants.UPDATING;
1481:
1482: OPEN c_jai_ar_trx_lines(LINE_REC.customer_trx_line_id);
1483: FETCH c_jai_ar_trx_lines INTO t_jai_line_rec_new;
1484: CLOSE c_jai_ar_trx_lines;

Line 1503: IF lv_return_code <> jai_constants.successful then

1499: pv_action => lv_action,
1500: pv_return_code => lv_return_code,
1501: pv_return_message => lv_return_message
1502: );
1503: IF lv_return_code <> jai_constants.successful then
1504: RAISE le_error;
1505: END IF;
1506: END IF;
1507: --Added by Qinglei for JAI Trigger Elimination 11-May-2012 end

Line 1535: if lv_process_flag <> jai_constants.successful then

1531: p_process_flag => lv_process_flag ,
1532: p_process_message => lv_process_message
1533: );
1534:
1535: if lv_process_flag <> jai_constants.successful then
1536: lv_rg23a_cess_avlbl := 'FALSE';
1537: else
1538: lv_rg23a_cess_avlbl := 'TRUE';
1539: end if;

Line 1552: if lv_process_flag <> jai_constants.successful then

1548: p_process_flag => lv_process_flag ,
1549: p_process_message => lv_process_message
1550: );
1551:
1552: if lv_process_flag <> jai_constants.successful then
1553: lv_rg23c_cess_avlbl := 'FALSE';
1554: else
1555: lv_rg23c_cess_avlbl := 'TRUE';
1556: end if;

Line 1569: if lv_process_flag <> jai_constants.successful then

1565: p_process_flag => lv_process_flag ,
1566: p_process_message => lv_process_message
1567: );
1568:
1569: if lv_process_flag <> jai_constants.successful then
1570: lv_pla_cess_avlbl := 'FALSE';
1571: else
1572: lv_pla_cess_avlbl := 'TRUE';
1573: end if;

Line 1694: pv_return_code := jai_constants.expected_error ;

1690: END IF;
1691: END IF; -- pref 1 if condition's end if
1692:
1693: IF v_reg_type is null THEN
1694: pv_return_code := jai_constants.expected_error ;
1695: pv_return_message := 'None of the registers have enough balance for the excise duty -> ' || v_tax_amount || ' Or Cess amount => ' || ln_Cess_amount ;
1696: return ;
1697: END IF;
1698: IF v_reg_type = 'PLA' and NVL(v_ssi_unit_flag,'N') <> 'Y' THEN

Line 1700: pv_return_code := jai_constants.expected_error ;

1696: return ;
1697: END IF;
1698: IF v_reg_type = 'PLA' and NVL(v_ssi_unit_flag,'N') <> 'Y' THEN
1699: IF v_tax_amount > reg_balance.pla_balance AND lv_pla_cess_avlbl = 'TRUE' THEN
1700: pv_return_code := jai_constants.expected_error ;
1701: pv_return_message := 'PLA Balance -> ' || reg_balance.pla_balance ||' is not enough for the excise duty -> ' || v_tax_amount ;
1702: return ;
1703: END IF;
1704: ELSIF v_reg_type = 'RG23A' THEN

Line 1706: pv_return_code := jai_constants.expected_error ;

1702: return ;
1703: END IF;
1704: ELSIF v_reg_type = 'RG23A' THEN
1705: IF v_tax_amount > reg_balance.rg23a_balance AND lv_rg23a_cess_avlbl = 'TRUE' THEN
1706: pv_return_code := jai_constants.expected_error ;
1707: pv_return_message := 'RG23A Balance -> ' || reg_balance.rg23a_balance ||' is not enough for the excise duty -> ' || v_tax_amount ;
1708: return ;
1709: END IF;
1710: ELSIF v_reg_type = 'RG23C' THEN

Line 1712: pv_return_code := jai_constants.expected_error ;

1708: return ;
1709: END IF;
1710: ELSIF v_reg_type = 'RG23C' THEN
1711: IF v_tax_amount > reg_balance.rg23c_balance AND lv_rg23c_cess_avlbl = 'TRUE' THEN
1712: pv_return_code := jai_constants.expected_error ;
1713: pv_return_message := 'RG23C Balance -> ' || reg_balance.rg23c_balance ||' is not enough for the excise duty -> ' || v_tax_amount ;
1714: return ;
1715: END IF;
1716: END IF;

Line 1746: pv_return_code := jai_constants.expected_error ;

1742: END IF;
1743:
1744: Exception
1745: When Others Then
1746: pv_return_code := jai_constants.expected_error ;
1747: pv_return_message := SQLERRM ;
1748: return ;
1749: End ;
1750:

Line 1767: lv_action := jai_constants.UPDATING;

1763: OPEN c_jai_ar_trx_lines(LINE_REC.customer_trx_line_id);
1764: FETCH c_jai_ar_trx_lines INTO t_jai_line_rec_new;
1765: CLOSE c_jai_ar_trx_lines;
1766:
1767: lv_action := jai_constants.UPDATING;
1768:
1769: IF ( ( ( t_jai_line_rec_new.AUTO_INVOICE_FLAG <> 'Y' AND
1770: t_jai_line_rec_old.AUTO_INVOICE_FLAG <> 'Y'
1771: ) AND

Line 1786: IF lv_return_code <> jai_constants.successful then

1782: pv_action => lv_action,
1783: pv_return_code => lv_return_code,
1784: pv_return_message => lv_return_message
1785: );
1786: IF lv_return_code <> jai_constants.successful then
1787: RAISE le_error;
1788: END IF;
1789: END IF;
1790: --Added by Qinglei for JAI Trigger Elimination 11-May-2012 end

Line 1848: pv_return_code := jai_constants.expected_error ;

1844: END IF;
1845:
1846: IF v_reg_type = 'RG23A' THEN
1847: IF v_tax_amount > reg_balance.rg23a_balance AND lv_rg23a_cess_avlbl = 'TRUE' THEN
1848: pv_return_code := jai_constants.expected_error ;
1849: pv_return_message := 'RG23A Balance -> ' || reg_balance.rg23a_balance ||' is not enough for the excise duty -> ' || v_tax_amount ;
1850: return ;
1851: END IF;
1852: ELSIF v_reg_type = 'RG23C' THEN

Line 1854: pv_return_code := jai_constants.expected_error ;

1850: return ;
1851: END IF;
1852: ELSIF v_reg_type = 'RG23C' THEN
1853: IF v_tax_amount > reg_balance.rg23c_balance AND lv_rg23c_cess_avlbl = 'TRUE' THEN
1854: pv_return_code := jai_constants.expected_error ;
1855: pv_return_message := 'RG23C Balance -> ' || reg_balance.rg23c_balance ||' is not enough for the excise duty -> ' || v_tax_amount ;
1856: return ;
1857: END IF;
1858: END IF;

Line 1891: pv_return_code := jai_constants.expected_error ;

1887: end if;
1888:
1889: Exception
1890: When Others Then
1891: pv_return_code := jai_constants.expected_error ;
1892: pv_return_message := SQLERRM ;
1893: return ;
1894: END;
1895:

Line 1911: lv_action := jai_constants.UPDATING;

1907: OPEN c_jai_ar_trx_lines(LINE_REC.customer_trx_line_id);
1908: FETCH c_jai_ar_trx_lines INTO t_jai_line_rec_new;
1909: CLOSE c_jai_ar_trx_lines;
1910:
1911: lv_action := jai_constants.UPDATING;
1912:
1913: IF ( ( ( t_jai_line_rec_new.AUTO_INVOICE_FLAG <> 'Y' AND
1914: t_jai_line_rec_old.AUTO_INVOICE_FLAG <> 'Y'
1915: ) AND

Line 1930: IF lv_return_code <> jai_constants.successful then

1926: pv_action => lv_action,
1927: pv_return_code => lv_return_code,
1928: pv_return_message => lv_return_message
1929: );
1930: IF lv_return_code <> jai_constants.successful then
1931: RAISE le_error;
1932: END IF;
1933: END IF;
1934: --Added by Qinglei for JAI Trigger Elimination 11-May-2012 end

Line 2002: lv_action := jai_constants.updating ;

1998: close c_get_rec;
1999:
2000: if(t_rec_new.once_completed_flag = 'Y')then
2001:
2002: lv_action := jai_constants.updating ;
2003:
2004: JAI_AR_TRXS_PKG.UPDATE_EXCISE_REGISTERS(
2005: pr_old => t_rec_old ,
2006: pr_new => t_rec_new ,

Line 2012: IF lv_return_code <> jai_constants.successful then

2008: pv_return_code => lv_return_code ,
2009: pv_return_message => lv_return_message
2010: );
2011:
2012: IF lv_return_code <> jai_constants.successful then
2013: RAISE le_error;
2014: END IF;
2015:
2016: end if;

Line 2032: Pv_return_code := jai_constants.unexpected_error;

2028: end if;
2029:
2030: EXCEPTION
2031: WHEN OTHERS THEN
2032: Pv_return_code := jai_constants.unexpected_error;
2033: Pv_return_message := 'Encountered an error in JAI_AR_IMPORT_SYNC_PKG.UPDATE_COMPLETE_FLAG ' || substr(sqlerrm,1,1900);
2034:
2035: END update_complete_flag ;
2036:

Line 2071: IF NVL(PR_NEW.COMPLETE_FLAG,JAI_CONSTANTS.NO) = JAI_CONSTANTS.YES THEN

2067: G_PKG_NAME || ': ' || l_api_name || '()+');
2068: end if;
2069:
2070: V_HEADER_ID := PR_NEW.CUSTOMER_TRX_ID;
2071: IF NVL(PR_NEW.COMPLETE_FLAG,JAI_CONSTANTS.NO) = JAI_CONSTANTS.YES THEN
2072: /** Invoice is getting COMPLETED */
2073: LV_DOCUMENT_TYPE := JAI_CONSTANTS.TRX_TYPE_INV_COMP;
2074: /*********
2075: || When the invoice is getting completed for the very first time (once_complete_flag is still null or 'N') then pass the

Line 2073: LV_DOCUMENT_TYPE := JAI_CONSTANTS.TRX_TYPE_INV_COMP;

2069:
2070: V_HEADER_ID := PR_NEW.CUSTOMER_TRX_ID;
2071: IF NVL(PR_NEW.COMPLETE_FLAG,JAI_CONSTANTS.NO) = JAI_CONSTANTS.YES THEN
2072: /** Invoice is getting COMPLETED */
2073: LV_DOCUMENT_TYPE := JAI_CONSTANTS.TRX_TYPE_INV_COMP;
2074: /*********
2075: || When the invoice is getting completed for the very first time (once_complete_flag is still null or 'N') then pass the
2076: || final TCS accounting for the TCS type of taxes belonging to the manual invoice only
2077: || This is not applicable for the imported invoices.

Line 2085: lv_once_completed_flag = jai_constants.yes

2081: FETCH ONCE_COMPLETE_FLAG_CUR INTO LV_ONCE_COMPLETED_FLAG;
2082: CLOSE ONCE_COMPLETE_FLAG_CUR;
2083:
2084: IF Pr_new.created_from <> 'RAXTRX' AND
2085: lv_once_completed_flag = jai_constants.yes
2086:
2087: THEN
2088:
2089: JAI_AR_TCS_REP_PKG.AR_ACCOUNTING ( P_RACT => PR_NEW ,

Line 2096: ELSIF NVL(PR_NEW.COMPLETE_FLAG,JAI_CONSTANTS.NO) = JAI_CONSTANTS.NO THEN

2092: );
2093:
2094: END IF;
2095:
2096: ELSIF NVL(PR_NEW.COMPLETE_FLAG,JAI_CONSTANTS.NO) = JAI_CONSTANTS.NO THEN
2097: /** INVOICE IS GETTING INCOMPLETED */
2098: LV_DOCUMENT_TYPE := JAI_CONSTANTS.TRX_TYPE_INV_INCOMP;
2099: END IF;
2100:

Line 2098: LV_DOCUMENT_TYPE := JAI_CONSTANTS.TRX_TYPE_INV_INCOMP;

2094: END IF;
2095:
2096: ELSIF NVL(PR_NEW.COMPLETE_FLAG,JAI_CONSTANTS.NO) = JAI_CONSTANTS.NO THEN
2097: /** INVOICE IS GETTING INCOMPLETED */
2098: LV_DOCUMENT_TYPE := JAI_CONSTANTS.TRX_TYPE_INV_INCOMP;
2099: END IF;
2100:
2101:
2102: JAI_AR_TCS_REP_PKG.PROCESS_TRANSACTIONS

Line 2104: , P_EVENT => JAI_CONSTANTS.TRX_EVENT_COMPLETION

2100:
2101:
2102: JAI_AR_TCS_REP_PKG.PROCESS_TRANSACTIONS
2103: ( P_RACT => PR_NEW
2104: , P_EVENT => JAI_CONSTANTS.TRX_EVENT_COMPLETION
2105: , P_PROCESS_FLAG => PV_RETURN_CODE
2106: , P_PROCESS_MESSAGE => PV_RETURN_MESSAGE
2107: );
2108:

Line 2109: IF PV_RETURN_CODE <> JAI_CONSTANTS.SUCCESSFUL THEN

2105: , P_PROCESS_FLAG => PV_RETURN_CODE
2106: , P_PROCESS_MESSAGE => PV_RETURN_MESSAGE
2107: );
2108:
2109: IF PV_RETURN_CODE <> JAI_CONSTANTS.SUCCESSFUL THEN
2110: RETURN;
2111: END IF;
2112:
2113: if (G_LEVEL_PROCEDURE >= G_CURRENT_RUNTIME_LEVEL) then

Line 2235: AND regime_code = jai_constants.vat_regime

2231: WHERE jcttl.link_to_cust_trx_line_id = jctl.customer_trx_line_id
2232: AND jctl.customer_trx_id = pr_new.customer_trx_id
2233: AND jcttl.tax_id = jtc.tax_id
2234: AND jtc.tax_type = jrttv.tax_type
2235: AND regime_code = jai_constants.vat_regime
2236: AND jtc.org_id = pr_new.org_id ;
2237:
2238:
2239: CURSOR cur_get_gl_date(cp_acct_class ra_cust_trx_line_gl_dist_all.account_class%type)

Line 2278: WHERE regime_code = jai_constants.vat_regime

2274: CURSOR c_get_regime_id
2275: IS
2276: SELECT regime_id
2277: FROM jai_regime_tax_types_v
2278: WHERE regime_code = jai_constants.vat_regime
2279: AND rownum = 1 ;
2280:
2281:
2282: CURSOR get_copy_vat_invoice_cur

Line 2322: WHERE jrttv1.regime_code = jai_constants.vat_regime

2318: JAI_CMN_TAXES_ALL jtc ,
2319: (
2320: SELECT jrttv1.tax_type tax_type
2321: FROM jai_regime_tax_types_v jrttv1
2322: WHERE jrttv1.regime_code = jai_constants.vat_regime
2323: UNION
2324: SELECT 'VAT REVERSAL' tax_type
2325: FROM DUAL
2326: ) jrttv

Line 2368: pv_return_code := jai_constants.successful ;

2364: G_MODULE_NAME || l_api_name || '.BEGIN',
2365: G_PKG_NAME || ': ' || l_api_name || '()+');
2366: end if;
2367:
2368: pv_return_code := jai_constants.successful ;
2369:
2370: /*
2371: || Get the Otransaction type of the document
2372: || Process only CM type of transaction's

Line 2412: IF upper(nvl(ln_regime_code,'####')) <> UPPER(jai_constants.vat_regime) THEN

2408: OPEN cur_vat_taxes_exist;
2409: FETCH cur_vat_taxes_exist into ln_regime_id,ln_regime_code;
2410: CLOSE cur_vat_taxes_exist;
2411:
2412: IF upper(nvl(ln_regime_code,'####')) <> UPPER(jai_constants.vat_regime) THEN
2413: /*
2414: || only vat type of taxes should be processed
2415: */
2416: RETURN;

Line 2437: ln_regime_code := jai_constants.vat_regime ;

2433: INTO ln_regime_id ;
2434: CLOSE c_get_regime_id ;
2435:
2436: IF ln_regime_id IS NOT NULL THEN
2437: ln_regime_code := jai_constants.vat_regime ;
2438: END IF ;
2439: END IF ;
2440: END IF ;
2441:

Line 2484: FOR rec_cur_get_man_ar_inv_taxes IN cur_get_man_ar_inv_taxes(upper(jai_constants.source_ar)

2480:
2481: IF ln_rma_flag >0 OR ln_nonship_rma_flag >0
2482: THEN
2483:
2484: FOR rec_cur_get_man_ar_inv_taxes IN cur_get_man_ar_inv_taxes(upper(jai_constants.source_ar)
2485: ,jai_constants.source_ttype_man_ar_inv
2486: ,jai_constants.tname_cus_trx_lines
2487: ,get_order_and_item_id_rec.customer_trx_line_id
2488: ,v_organization_id

Line 2485: ,jai_constants.source_ttype_man_ar_inv

2481: IF ln_rma_flag >0 OR ln_nonship_rma_flag >0
2482: THEN
2483:
2484: FOR rec_cur_get_man_ar_inv_taxes IN cur_get_man_ar_inv_taxes(upper(jai_constants.source_ar)
2485: ,jai_constants.source_ttype_man_ar_inv
2486: ,jai_constants.tname_cus_trx_lines
2487: ,get_order_and_item_id_rec.customer_trx_line_id
2488: ,v_organization_id
2489: ,v_loc_id)

Line 2486: ,jai_constants.tname_cus_trx_lines

2482: THEN
2483:
2484: FOR rec_cur_get_man_ar_inv_taxes IN cur_get_man_ar_inv_taxes(upper(jai_constants.source_ar)
2485: ,jai_constants.source_ttype_man_ar_inv
2486: ,jai_constants.tname_cus_trx_lines
2487: ,get_order_and_item_id_rec.customer_trx_line_id
2488: ,v_organization_id
2489: ,v_loc_id)
2490: LOOP

Line 2510: p_organization_type => jai_constants.orgn_type_io ,

2506: ||for the "LIABILITY ACCOUNT"
2507: *******************************/
2508: ln_liab_acct_ccid := jai_cmn_rgm_recording_pkg.get_account(
2509: p_regime_id => ln_regime_id ,
2510: p_organization_type => jai_constants.orgn_type_io ,
2511: p_organization_id => v_organization_id ,
2512: p_location_id => v_loc_id ,
2513: p_tax_type => rec_cur_get_man_ar_inv_taxes.tax_type ,
2514: p_account_name => jai_constants.liability

Line 2514: p_account_name => jai_constants.liability

2510: p_organization_type => jai_constants.orgn_type_io ,
2511: p_organization_id => v_organization_id ,
2512: p_location_id => v_loc_id ,
2513: p_tax_type => rec_cur_get_man_ar_inv_taxes.tax_type ,
2514: p_account_name => jai_constants.liability
2515: ) ;
2516:
2517: /*******************************
2518: || Get the code combination id

Line 2523: p_organization_type => jai_constants.orgn_type_io ,

2519: || for the "INTERIM LIABILITY ACCOUNT"
2520: *******************************/
2521: ln_intliab_acct_ccid := jai_cmn_rgm_recording_pkg.get_account(
2522: p_regime_id => ln_regime_id ,
2523: p_organization_type => jai_constants.orgn_type_io ,
2524: p_organization_id => v_organization_id ,
2525: p_location_id => v_loc_id ,
2526: p_tax_type => rec_cur_get_man_ar_inv_taxes.tax_type ,
2527: p_account_name => jai_constants.liability_interim

Line 2527: p_account_name => jai_constants.liability_interim

2523: p_organization_type => jai_constants.orgn_type_io ,
2524: p_organization_id => v_organization_id ,
2525: p_location_id => v_loc_id ,
2526: p_tax_type => rec_cur_get_man_ar_inv_taxes.tax_type ,
2527: p_account_name => jai_constants.liability_interim
2528: ) ;
2529:
2530:
2531: /*

Line 2537: pv_return_code := jai_constants.expected_error;

2533: */
2534: IF ln_liab_acct_ccid IS NULL OR
2535: ln_intliab_acct_ccid IS NULL
2536: THEN
2537: pv_return_code := jai_constants.expected_error;
2538: pv_return_message := 'VAT receivable accouting entries cannot be passed.
2539: Please set up the Liability account and the Interim Liability account for the corresponding VAT regime';
2540: return;
2541: END IF;

Line 2549: lc_account_name := jai_constants.recovery ;

2545: ln_charge_ac_id := ln_intliab_acct_ccid ;
2546: ln_balancing_ac_id := ln_liab_acct_ccid ;
2547: ln_debit_amount := null ;
2548: ln_credit_amount := abs(rec_cur_get_man_ar_inv_taxes.func_tax_amount) ;
2549: lc_account_name := jai_constants.recovery ;
2550:
2551:
2552:
2553:

Line 2558: pv_organization_type => jai_constants.orgn_type_io ,

2554: jai_cmn_rgm_recording_pkg.insert_vat_repository_entry (
2555: pn_repository_id => ln_repository_id ,
2556: pn_regime_id => ln_regime_id ,
2557: pv_tax_type => rec_cur_get_man_ar_inv_taxes.tax_type ,
2558: pv_organization_type => jai_constants.orgn_type_io ,
2559: pn_organization_id => v_organization_id ,
2560: pn_location_id => v_loc_id ,
2561: pv_source => jai_constants.source_ar ,
2562: pv_source_trx_type => jai_constants.source_ttype_man_ar_inv ,

Line 2561: pv_source => jai_constants.source_ar ,

2557: pv_tax_type => rec_cur_get_man_ar_inv_taxes.tax_type ,
2558: pv_organization_type => jai_constants.orgn_type_io ,
2559: pn_organization_id => v_organization_id ,
2560: pn_location_id => v_loc_id ,
2561: pv_source => jai_constants.source_ar ,
2562: pv_source_trx_type => jai_constants.source_ttype_man_ar_inv ,
2563: pv_source_table_name => jai_constants.tname_cus_trx_lines ,
2564: pn_source_id => rec_cur_get_man_ar_inv_taxes.customer_trx_line_id ,
2565: pd_transaction_date => rec_cur_get_man_ar_inv_taxes.creation_date ,

Line 2562: pv_source_trx_type => jai_constants.source_ttype_man_ar_inv ,

2558: pv_organization_type => jai_constants.orgn_type_io ,
2559: pn_organization_id => v_organization_id ,
2560: pn_location_id => v_loc_id ,
2561: pv_source => jai_constants.source_ar ,
2562: pv_source_trx_type => jai_constants.source_ttype_man_ar_inv ,
2563: pv_source_table_name => jai_constants.tname_cus_trx_lines ,
2564: pn_source_id => rec_cur_get_man_ar_inv_taxes.customer_trx_line_id ,
2565: pd_transaction_date => rec_cur_get_man_ar_inv_taxes.creation_date ,
2566: pv_account_name => lc_account_name , --Date 14/06/2007 by sacsethi for bug 6072461

Line 2563: pv_source_table_name => jai_constants.tname_cus_trx_lines ,

2559: pn_organization_id => v_organization_id ,
2560: pn_location_id => v_loc_id ,
2561: pv_source => jai_constants.source_ar ,
2562: pv_source_trx_type => jai_constants.source_ttype_man_ar_inv ,
2563: pv_source_table_name => jai_constants.tname_cus_trx_lines ,
2564: pn_source_id => rec_cur_get_man_ar_inv_taxes.customer_trx_line_id ,
2565: pd_transaction_date => rec_cur_get_man_ar_inv_taxes.creation_date ,
2566: pv_account_name => lc_account_name , --Date 14/06/2007 by sacsethi for bug 6072461
2567: pn_charge_account_id => ln_charge_ac_id ,

Line 2578: pv_called_from => jai_constants.vat_repo_call_from_om_ar ,

2574: pn_batch_id => NULL ,
2575: pn_inv_organization_id => v_organization_id ,
2576: pv_invoice_no => lv_vat_invoice_no ,
2577: pd_invoice_date => nvl(nvl(ld_gl_date,pr_new.trx_date),rec_cur_get_man_ar_inv_taxes.creation_date) ,
2578: pv_called_from => jai_constants.vat_repo_call_from_om_ar ,
2579: pv_process_flag => lv_process_flag ,
2580: pv_process_message => lv_process_message ,
2581: pv_trx_reference_context => jai_constants.contxt_manual_ar ,
2582: pv_trx_reference1 => rec_cur_get_man_ar_inv_taxes.customer_trx_id ,

Line 2581: pv_trx_reference_context => jai_constants.contxt_manual_ar ,

2577: pd_invoice_date => nvl(nvl(ld_gl_date,pr_new.trx_date),rec_cur_get_man_ar_inv_taxes.creation_date) ,
2578: pv_called_from => jai_constants.vat_repo_call_from_om_ar ,
2579: pv_process_flag => lv_process_flag ,
2580: pv_process_message => lv_process_message ,
2581: pv_trx_reference_context => jai_constants.contxt_manual_ar ,
2582: pv_trx_reference1 => rec_cur_get_man_ar_inv_taxes.customer_trx_id ,
2583: pv_trx_reference2 => rec_cur_get_man_ar_inv_taxes.link_to_cust_trx_line_id ,
2584: pv_trx_reference3 => NULL ,
2585: pv_trx_reference4 => NULL ,

Line 2591: IF lv_process_flag = jai_constants.expected_error OR

2587: );
2588:
2589:
2590:
2591: IF lv_process_flag = jai_constants.expected_error OR
2592: lv_process_flag = jai_constants.unexpected_error
2593: THEN
2594: pv_return_code := lv_process_flag ;
2595: pv_return_code := lv_process_message ;

Line 2592: lv_process_flag = jai_constants.unexpected_error

2588:
2589:
2590:
2591: IF lv_process_flag = jai_constants.expected_error OR
2592: lv_process_flag = jai_constants.unexpected_error
2593: THEN
2594: pv_return_code := lv_process_flag ;
2595: pv_return_code := lv_process_message ;
2596: return;

Line 2612: Pv_return_code := jai_constants.unexpected_error;

2608: end if;
2609:
2610: EXCEPTION
2611: WHEN OTHERS THEN
2612: Pv_return_code := jai_constants.unexpected_error;
2613: Pv_return_message := 'Encountered an error in JAI_AR_IMPORT_SYNC_PKG.PROCESS_CM_VAT_REPO ' || substr(sqlerrm,1,1900);
2614:
2615: END process_cm_vat_repo ;
2616: