DBA Data[Home] [Help]

APPS.JAI_TRX_REPO_EXTRACT_PKG dependencies on JAI_CONSTANTS

Line 259: where regime_code = jai_constants.service_regime

255: select to_date(attribute_value, 'DD/MM/YYYY')
256: from JAI_RGM_ORG_REGNS_V
257: where regime_id = (SELECT regime_id
258: FROM jai_rgm_definitions
259: where regime_code = jai_constants.service_regime
260: )
261: and organization_id = p_organization_id
262: and location_id = p_location_id
263: AND attribute_code = 'EFF_DATE_ST_PT'

Line 271: where regime_code = jai_constants.service_regime

267: (select '1'
268: from JAI_RGM_ORG_REGNS_V
269: where regime_id = (SELECT regime_id
270: FROM jai_rgm_definitions
271: where regime_code = jai_constants.service_regime
272: )
273: and attribute_code IN 'INV_ORG_CLASSIFICATION'
274: and attribute_value <> 'ORGANIZATION'
275: and organization_id = p_organization_id

Line 283: where regime_code = jai_constants.service_regime

279: (select '1'
280: from JAI_RGM_ORG_REGNS_V
281: where regime_id = (SELECT regime_id
282: FROM jai_rgm_definitions
283: where regime_code = jai_constants.service_regime
284: )
285: and attribute_code IN 'SERVICE TYPE'
286: and attribute_value <> 'OTHER'
287: and organization_id = p_organization_id

Line 394: IF pv_source_trx_type = jai_constants.trx_type_adv_rcpts THEN --changed by qiong for bug13555753

390:
391:
392: ELSIF pv_source = 'AR' THEN
393: --Added by Wenqiong for advanced receipts Begin
394: IF pv_source_trx_type = jai_constants.trx_type_adv_rcpts THEN --changed by qiong for bug13555753
395: OPEN get_cash_receipt_gl_date_cur;
396: FETCH get_cash_receipt_gl_date_cur INTO ld_gl_date;
397: CLOSE get_cash_receipt_gl_date_cur;
398:

Line 401: ELSIF pv_source_trx_type = jai_constants.trx_type_adv_rvs THEN

397: CLOSE get_cash_receipt_gl_date_cur;
398:
399: --Added by Qiong for bug13555753 begin
400: --------------------------------------
401: ELSIF pv_source_trx_type = jai_constants.trx_type_adv_rvs THEN
402: --Modified by Qinglei for bug#13741544
403: OPEN get_rev_receipt_gl_date_cur;
404: FETCH get_rev_receipt_gl_date_cur INTO ld_gl_date;
405: CLOSE get_rev_receipt_gl_date_cur;

Line 409: ELSIF pv_source_trx_type IN (jai_constants.trx_type_adv_app,jai_constants.trx_type_adv_unapp) THEN

405: CLOSE get_rev_receipt_gl_date_cur;
406: --------------------------------------
407: --Added by Qiong for bug13555753 end
408:
409: ELSIF pv_source_trx_type IN (jai_constants.trx_type_adv_app,jai_constants.trx_type_adv_unapp) THEN
410: OPEN get_receipt_date_cur;
411: FETCH get_receipt_date_cur INTO ld_gl_date;
412: CLOSE get_receipt_date_cur;
413:

Line 490: or (p_query_settled_flag = jai_constants.yes)

486: and (p_location_id is null or recs.location_id = p_location_id )
487: and trunc(transaction_date) between nvl (p_from_trx_date, trunc(transaction_date)) and nvl (p_to_trx_date, trunc(transaction_date))
488: and recs.regime_code = p_regime_code
489: and ( (p_query_settled_flag = 'N' and (recs.settlement_id is null))
490: or (p_query_settled_flag = jai_constants.yes)
491: )
492: and ( (p_query_only_null_srvtype = 'Y' and (recs.service_type_code is null))
493: or (p_query_only_null_srvtype = 'N')
494: )

Line 705: p_process_flag := jai_constants.SUCCESSFUL;

701: begin
702:
703: lv_member_name := 'EXTRACT_RGM_TRXS';
704: set_debug_context;
705: p_process_flag := jai_constants.SUCCESSFUL;
706: jai_cmn_debug_contexts_pkg.register ( pv_context => lv_context
707: , pn_reg_id => ln_reg_id
708: );
709:

Line 745: (jai_constants.trx_type_adv_app,jai_constants.trx_type_adv_unapp) THEN

741: --Added by Chong.Lei for POT code port end
742: --Add by Wenqiong for Advanced Receipt begin
743: --------------------------------------------
744: IF r_repo_recs.source_trx_type IN
745: (jai_constants.trx_type_adv_app,jai_constants.trx_type_adv_unapp) THEN
746: ln_refer_invoice_id := r_repo_recs.source_document_id;
747: ln_refer_item_line_id := r_repo_recs.source_document_id;
748: ELSE
749: ln_refer_invoice_id := r_repo_recs.invoice_id;

Line 774: if p_process_flag <> jai_constants.SUCCESSFUL then

770: , p_trx_repo_extract_rec => lr_trx_repo_extract
771: , p_process_message => p_process_message
772: , p_process_flag => p_process_flag
773: );
774: if p_process_flag <> jai_constants.SUCCESSFUL then
775: return;
776: end if;
777: --Added by qiong for bug1353539 begin
778: ---------------------------------------------------------

Line 1084: if p_process_flag <> jai_constants.SUCCESSFUL then

1080: , p_process_flag => p_process_flag
1081: , p_trx_repo_extract => lr_trx_repo_extract
1082: );
1083:
1084: if p_process_flag <> jai_constants.SUCCESSFUL then
1085: return;
1086: end if;
1087: /*added by csahoo for bug#6457710,start*/
1088: elsif r_docs.transaction_source = 'PROJECTS' then

Line 1100: if p_process_flag <> jai_constants.SUCCESSFUL then

1096: , p_process_flag => p_process_flag
1097: , p_trx_repo_extract => lr_trx_repo_extract
1098: );
1099:
1100: if p_process_flag <> jai_constants.SUCCESSFUL then
1101: return;
1102: end if;
1103: /*bug#6457710,end*/
1104:

Line 1122: if p_process_flag <> jai_constants.SUCCESSFUL then

1118: , p_process_flag => p_process_flag
1119: , p_trx_repo_extract => lr_trx_repo_extract
1120: );
1121:
1122: if p_process_flag <> jai_constants.SUCCESSFUL then
1123: return;
1124: end if;
1125:
1126: /* elsif r_docs.transaction_source = 'PURCHASING' then

Line 1215: pv_source => jai_constants.source_ap,

1211:
1212: --Added by Qiong for reverse charge bug#16001407 start
1213: IF r_docs.source_trx_type IN ('INVOICE_SETTLEMENT') THEN
1214: lr_trx_repo_extract.document_date := get_gl_date(
1215: pv_source => jai_constants.source_ap,
1216: pv_source_trx_type => NULL,
1217: pn_document_id => null,
1218: pn_source_document_id => r_docs.repository_line_id,
1219: pn_organization_id => null,

Line 1239: if p_process_flag <> jai_constants.SUCCESSFUL then

1235:
1236:
1237: end if;--Added by Qiong for reverse charge bug#16001407
1238:
1239: if p_process_flag <> jai_constants.SUCCESSFUL then
1240: return;
1241: end if;
1242: --End of bug#8943349
1243: end if;

Line 1258: lr_trx_repo_extract.updatable_flag := jai_constants.NO;

1254: );
1255: if lv_service_type_code is not null then
1256:
1257: lr_trx_repo_extract.service_type_code := lv_service_type_code;
1258: lr_trx_repo_extract.updatable_flag := jai_constants.NO;
1259: lr_trx_repo_extract.processed_flag := jai_constants.NO;
1260:
1261: end if;
1262:

Line 1259: lr_trx_repo_extract.processed_flag := jai_constants.NO;

1255: if lv_service_type_code is not null then
1256:
1257: lr_trx_repo_extract.service_type_code := lv_service_type_code;
1258: lr_trx_repo_extract.updatable_flag := jai_constants.NO;
1259: lr_trx_repo_extract.processed_flag := jai_constants.NO;
1260:
1261: end if;
1262:
1263:

Line 1391: p_process_flag := jai_constants.unexpected_error;

1387: jai_cmn_debug_contexts_pkg.deregister (pn_reg_id => ln_reg_id);
1388:
1389: exception
1390: when others then
1391: p_process_flag := jai_constants.unexpected_error;
1392: p_process_message := lv_context||'->'||sqlerrm;
1393: jai_cmn_debug_contexts_pkg.print(ln_reg_id,lv_context||'->'||sqlerrm,jai_cmn_debug_contexts_pkg.summary);
1394: jai_cmn_debug_contexts_pkg.print_stack;
1395: end extract_rgm_trxs;

Line 1619: and jpollt.tax_type IN (jai_constants.tax_type_service,jai_constants.tax_type_service_edu_cess,jai_constants.tax_type_sh_service_edu_cess)

1615: ,jai_po_taxes jpollt
1616: where jpoll.po_line_id = cp_po_line_id
1617: and jpollt.line_location_id = jpoll.line_location_id
1618: /*added the cess and sh cess tax types for bug#6457710*/
1619: and jpollt.tax_type IN (jai_constants.tax_type_service,jai_constants.tax_type_service_edu_cess,jai_constants.tax_type_sh_service_edu_cess)
1620: --and jpollt.tax_type = 'Service'
1621: group by service_type_code;
1622:
1623: /*Bug 12902363 - Start*/

Line 1635: and jrlt.tax_type IN (jai_constants.tax_type_service,jai_constants.tax_type_service_edu_cess,jai_constants.tax_type_sh_service_edu_cess)

1631: and rt.po_line_id = cp_po_line_id
1632: and rt.transaction_type = 'DELIVER'
1633: and rt.shipment_header_id = jrlt.shipment_header_id
1634: and rt.shipment_line_id = jrlt.shipment_line_id
1635: and jrlt.tax_type IN (jai_constants.tax_type_service,jai_constants.tax_type_service_edu_cess,jai_constants.tax_type_sh_service_edu_cess)
1636: group by service_type_code;
1637: /*Bug 12902363 - End*/
1638:
1639: --cursor c_get_ra_line_srvtyp (cp_customer_trx_line_id jai_ar_trx_lines.customer_trx_line_id%type) --commented by Chong.Lei for POT code port

Line 1663: and jtc.tax_type IN (jai_constants.tax_type_service,jai_constants.tax_type_service_edu_cess,jai_constants.tax_type_sh_service_edu_cess)

1659: where jrctl.customer_trx_line_id = cp_customer_trx_line_id
1660: and jrcttl.link_to_cust_trx_line_id = jrctl.customer_trx_line_id
1661: and jtc.tax_id = jrcttl.tax_id
1662: /*added the cess and sh cess tax types for bug#6457710*/
1663: and jtc.tax_type IN (jai_constants.tax_type_service,jai_constants.tax_type_service_edu_cess,jai_constants.tax_type_sh_service_edu_cess)
1664: --and jtc.tax_type = 'Service'
1665: -- group by service_type_code; --Commented by Chong.Lei for POT code port
1666: --Added by Chong.Lei for POT code port begin
1667: --Add pv_document_source by Xiao for POT Phase III, reg bug#12895841, begin

Line 1687: AND jrec.TAX_TYPE IN (jai_constants.tax_type_service,jai_constants.tax_type_service_edu_cess,jai_constants.tax_type_sh_service_edu_cess);

1683: WHERE jref.invoice_id= cp_customer_trx_id
1684: AND jref.item_line_id = cp_cust_trx_line_id
1685: AND jrec.source_trx_type = p_source_trx_type--Added by Qinglei on 28-Feb-2012 for bug#13741544
1686: AND jrec.reference_id=jref.reference_id
1687: AND jrec.TAX_TYPE IN (jai_constants.tax_type_service,jai_constants.tax_type_service_edu_cess,jai_constants.tax_type_sh_service_edu_cess);
1688: /*Bug 11932841 - Added cp_cust_trx_line_id*/
1689: CURSOR c_get_ra_line_amt_applied (cp_customer_trx_id NUMBER, cp_cust_trx_line_id NUMBER) IS
1690: SELECT Sum(Nvl(line_applied,0)) * max(((SELECT line_amount
1691: FROM jai_ar_trx_lines

Line 1704: AND araa.status= jai_constants.ar_status_app;

1700: /*Added by Qinglei for bug#13741544 begin*/
1701: AND araa.receivable_application_id = jrtr.source_document_id
1702: AND jrtr.repository_id = p_repository_id
1703: /*Added by Qinglei for bug#13741544 end*/
1704: AND araa.status= jai_constants.ar_status_app;
1705: --End bug#9298508
1706:
1707: cursor c_get_so_line_srvtyp (cp_line_id JAI_OM_OE_SO_LINES.line_id%type ) is
1708: select service_type_code, sum(jstl.tax_amount) service_tax_amount

Line 1717: and jtc.tax_type IN (jai_constants.tax_type_service,jai_constants.tax_type_service_edu_cess,jai_constants.tax_type_sh_service_edu_cess)

1713: and jsl.line_id = jstl.line_id
1714: and jstl.tax_id = jtc.tax_id
1715: AND nvl(jtc.reverse_charge_flag,'N') = 'N' --Added by Qiong for reverse charge bug#16001407
1716: /*added the cess and sh cess tax types for bug#6457710*/
1717: and jtc.tax_type IN (jai_constants.tax_type_service,jai_constants.tax_type_service_edu_cess,jai_constants.tax_type_sh_service_edu_cess)
1718: --and jtc.tax_type = 'Service'
1719: group by service_type_code;
1720:
1721: /*The following cursor added by rchandan for RMA */

Line 1734: and jtc.tax_type IN (jai_constants.tax_type_service,jai_constants.tax_type_service_edu_cess,jai_constants.tax_type_sh_service_edu_cess)

1730: and jrl.rma_line_id = jrtl.rma_line_id
1731: and jrtl.tax_id = jtc.tax_id
1732: AND nvl(jtc.reverse_charge_flag,'N') = 'N' --Added by Qiong for reverse charge bug#16001407
1733: /*added the cess and sh cess tax types for bug#6457710*/
1734: and jtc.tax_type IN (jai_constants.tax_type_service,jai_constants.tax_type_service_edu_cess,jai_constants.tax_type_sh_service_edu_cess)
1735: --and jtc.tax_type = 'Service'
1736: group by service_type_code;
1737:
1738: -- Bug 5876390, 6012570

Line 1745: and jcdt.source_doc_type = jai_constants.PA_DRAFT_INVOICE

1741: select sum(tax_amt) service_tax_amount
1742: from jai_cmn_document_taxes jcdt
1743: , jai_cmn_taxes_all jtc
1744: where jcdt.source_doc_line_id = cp_line_id
1745: and jcdt.source_doc_type = jai_constants.PA_DRAFT_INVOICE
1746: and jcdt.tax_id = jtc.tax_id
1747: AND nvl(jtc.reverse_charge_flag,'N') = 'N' --Added by Qiong for reverse charge bug#16001407
1748: /*added the cess and sh cess tax types for bug#6457710*/
1749: and jtc.tax_type IN (jai_constants.tax_type_service,jai_constants.tax_type_service_edu_cess,jai_constants.tax_type_sh_service_edu_cess);

Line 1749: and jtc.tax_type IN (jai_constants.tax_type_service,jai_constants.tax_type_service_edu_cess,jai_constants.tax_type_sh_service_edu_cess);

1745: and jcdt.source_doc_type = jai_constants.PA_DRAFT_INVOICE
1746: and jcdt.tax_id = jtc.tax_id
1747: AND nvl(jtc.reverse_charge_flag,'N') = 'N' --Added by Qiong for reverse charge bug#16001407
1748: /*added the cess and sh cess tax types for bug#6457710*/
1749: and jtc.tax_type IN (jai_constants.tax_type_service,jai_constants.tax_type_service_edu_cess,jai_constants.tax_type_sh_service_edu_cess);
1750: --and jtc.tax_type = 'Service';
1751:
1752: /*Started addition by vkantamn for Bug#6083978*/
1753: cursor c_get_rcv_details

Line 1813: AND jrec.tax_type IN (jai_constants.tax_type_service,jai_constants.tax_type_service_edu_cess,jai_constants.tax_type_sh_service_edu_cess);

1809: AND jref.item_line_id = p_document_line_id
1810: AND jrec.source_document_id = p_taxline_no
1811: AND jrec.reference_id = jref.reference_id
1812: AND jrec.source = decode(pv_document_source, 'STANDALONE_INVOICE', 'AP',pv_document_source)
1813: AND jrec.tax_type IN (jai_constants.tax_type_service,jai_constants.tax_type_service_edu_cess,jai_constants.tax_type_sh_service_edu_cess);
1814:
1815:
1816: -------------------------------------------
1817: --Added by Qiong for bug#13405553 end

Line 1843: and jcta.tax_type IN (jai_constants.tax_type_service,jai_constants.tax_type_service_edu_cess,jai_constants.tax_type_sh_service_edu_cess)

1839: AND jcdt.source_doc_id = cp_invoice_id
1840: AND jasl.invoice_id = jcdt.source_doc_id
1841: and jasl.invoice_line_number = jcdt.source_doc_line_id
1842: and jcta.tax_id = jcdt.tax_id
1843: and jcta.tax_type IN (jai_constants.tax_type_service,jai_constants.tax_type_service_edu_cess,jai_constants.tax_type_sh_service_edu_cess)
1844: GROUP BY service_type_code;
1845: /*10434986 - Start*/
1846: CURSOR c_get_standalone_inv_payment
1847: IS

Line 1899: AND jrec.tax_type IN (jai_constants.tax_type_service,jai_constants.tax_type_service_edu_cess,jai_constants.tax_type_sh_service_edu_cess);

1895: AND jref.item_line_id = p_document_line_id --Add by Xiao fro POT Phase III, reg bug#12895841. --Modified by Chong.Lei for POT code port
1896: AND jrec.reference_id = jref.reference_id
1897: AND jrec.source = decode(pv_document_source, 'STANDALONE_INVOICE', 'AP','RECEIVING','AP','PURCHASING','AP',pv_document_source)--Add pv_document_source by Xiao for POT Phase III, reg bug#12895841.
1898: /* Added receiving and purchasing source conditions in above decode for bug 13430127 */
1899: AND jrec.tax_type IN (jai_constants.tax_type_service,jai_constants.tax_type_service_edu_cess,jai_constants.tax_type_sh_service_edu_cess);
1900:
1901: CURSOR c_get_service_type
1902: IS
1903: SELECT service_type_code

Line 2052: AND jrd.regime_code = jai_constants.service_regime

2048: SELECT to_date(jrr.attribute_value, 'DD/MM/YYYY')
2049: FROM jai_rgm_registrations jrr
2050: , jai_rgm_definitions jrd
2051: WHERE jrr.regime_id = jrd.regime_id
2052: AND jrd.regime_code = jai_constants.service_regime
2053: AND jrr.attribute_code = 'EFF_DATE_ST_PT'
2054: AND jrr.attribute_type_code = 'OTHERS'
2055: AND jrr.registration_type = 'OTHERS';
2056: */

Line 2149: where regime_code = jai_constants.service_regime

2145: select to_date(attribute_value, 'DD/MM/YYYY')
2146: from JAI_RGM_ORG_REGNS_V
2147: where regime_id = (SELECT regime_id
2148: FROM jai_rgm_definitions
2149: where regime_code = jai_constants.service_regime
2150: )
2151: and organization_id = p_organization_id
2152: and location_id = p_location_id
2153: AND attribute_code = 'EFF_DATE_ST_PT'

Line 2161: where regime_code = jai_constants.service_regime

2157: (select '1'
2158: from JAI_RGM_ORG_REGNS_V
2159: where regime_id = (SELECT regime_id
2160: FROM jai_rgm_definitions
2161: where regime_code = jai_constants.service_regime
2162: )
2163: and attribute_code IN 'INV_ORG_CLASSIFICATION'
2164: and attribute_value <> 'ORGANIZATION'
2165: and organization_id = p_organization_id

Line 2173: where regime_code = jai_constants.service_regime

2169: (select '1'
2170: from JAI_RGM_ORG_REGNS_V
2171: where regime_id = (SELECT regime_id
2172: FROM jai_rgm_definitions
2173: where regime_code = jai_constants.service_regime
2174: )
2175: and attribute_code IN 'SERVICE TYPE'
2176: and attribute_value <> 'OTHER'
2177: and organization_id = p_organization_id

Line 2219: p_process_flag := jai_constants.SUCCESSFUL;

2215: --Add by Xiao for POT change, reg bug#12533434 on 18-May-2011, end
2216:
2217: lv_member_name := 'GET_DOCUMENT_DETAILS';
2218: set_debug_context;
2219: p_process_flag := jai_constants.SUCCESSFUL;
2220: jai_cmn_debug_contexts_pkg.register ( pv_context => lv_context
2221: , pn_reg_id => ln_reg_id
2222: );
2223:

Line 2240: p_process_flag := jai_constants.EXPECTED_ERROR;

2236:
2237: if p_document_line_id is null or p_document_source is null then
2238: fnd_file.put_line(fnd_file.log,'Document references cannot be null, cannot continue to derive the document details'); --12560704
2239: p_process_message := 'Document references cannot be null, cannot continue to derive the document details';
2240: p_process_flag := jai_constants.EXPECTED_ERROR;
2241: return;
2242: end if;
2243: /* Commented the below PURCHASING and RECEIVING code for bug 13430127 */
2244: --

Line 2478: IF p_source_trx_type IN (jai_constants.trx_type_adv_rcpts,jai_constants.trx_type_adv_rvs) THEN

2474: if p_document_source IN ( 'RECEIVABLES', 'AR_REVERSAL', 'AR_CLAIM' ) THEN --Modified by Xiao for POT Phase III, reg bug#12895841. --Added by Chong.Lei for POT code port
2475:
2476: /*Added by Wenqiong for Advanced Receipts Begin*/
2477: -----------------------------------------------------
2478: IF p_source_trx_type IN (jai_constants.trx_type_adv_rcpts,jai_constants.trx_type_adv_rvs) THEN
2479: --Modified by Qinglei on 28-Feb-2012 for bug#13741544
2480: OPEN c_get_rcpt_trx_details;
2481: FETCH c_get_rcpt_trx_details INTO r_rcpt_trx_details;
2482: CLOSE c_get_rcpt_trx_details;

Line 2486: IF p_source_trx_type = jai_constants.trx_type_adv_rcpts THEN

2482: CLOSE c_get_rcpt_trx_details;
2483:
2484: --Added by Qiong for bug13555753 begin
2485: ------------------------------------------------------------
2486: IF p_source_trx_type = jai_constants.trx_type_adv_rcpts THEN
2487: p_trx_repo_extract.document_date := r_rcpt_trx_details.document_date ;
2488: ELSIF p_source_trx_type = jai_constants.trx_type_adv_rvs THEN
2489: --Modified by Qinglei for bug#13741544
2490: p_trx_repo_extract.document_date := r_rcpt_trx_details.reversal_date ;

Line 2488: ELSIF p_source_trx_type = jai_constants.trx_type_adv_rvs THEN

2484: --Added by Qiong for bug13555753 begin
2485: ------------------------------------------------------------
2486: IF p_source_trx_type = jai_constants.trx_type_adv_rcpts THEN
2487: p_trx_repo_extract.document_date := r_rcpt_trx_details.document_date ;
2488: ELSIF p_source_trx_type = jai_constants.trx_type_adv_rvs THEN
2489: --Modified by Qinglei for bug#13741544
2490: p_trx_repo_extract.document_date := r_rcpt_trx_details.reversal_date ;
2491: END IF;
2492: ------------------------------------------------------------

Line 2515: IF p_source_trx_type = jai_constants.trx_type_adv_rvs THEN

2511: OPEN get_rcpt_amt_cur;
2512: FETCH get_rcpt_amt_cur INTO p_trx_repo_extract.repository_tax_amt;
2513: CLOSE get_rcpt_amt_cur;
2514:
2515: IF p_source_trx_type = jai_constants.trx_type_adv_rvs THEN
2516: --Modified by Qinglei for bug#13741544
2517: p_trx_repo_extract.document_line_amt := -abs(p_trx_repo_extract.document_line_amt);
2518: END IF;
2519: ELSIF p_source_trx_type IN (jai_constants.trx_type_adv_app,jai_constants.trx_type_adv_unapp) THEN

Line 2519: ELSIF p_source_trx_type IN (jai_constants.trx_type_adv_app,jai_constants.trx_type_adv_unapp) THEN

2515: IF p_source_trx_type = jai_constants.trx_type_adv_rvs THEN
2516: --Modified by Qinglei for bug#13741544
2517: p_trx_repo_extract.document_line_amt := -abs(p_trx_repo_extract.document_line_amt);
2518: END IF;
2519: ELSIF p_source_trx_type IN (jai_constants.trx_type_adv_app,jai_constants.trx_type_adv_unapp) THEN
2520: OPEN c_get_rcpt_app_trx_details;
2521: FETCH c_get_rcpt_app_trx_details INTO r_rcpt_app_trx_details;
2522: CLOSE c_get_rcpt_app_trx_details;
2523:

Line 2550: IF p_source_trx_type = jai_constants.trx_type_adv_app THEN

2546:
2547: OPEN get_rcpt_app_amt_cur;
2548: FETCH get_rcpt_app_amt_cur INTO p_trx_repo_extract.repository_tax_amt;
2549: CLOSE get_rcpt_app_amt_cur;
2550: IF p_source_trx_type = jai_constants.trx_type_adv_app THEN
2551: p_trx_repo_extract.document_line_amt := -abs(p_trx_repo_extract.document_line_amt);
2552: ELSE
2553: p_trx_repo_extract.document_line_amt := abs(p_trx_repo_extract.document_line_amt);
2554: END IF;

Line 2844: p_process_flag := jai_constants.unexpected_error;

2840: jai_cmn_debug_contexts_pkg.deregister (pn_reg_id => ln_reg_id);
2841:
2842: exception
2843: when others then
2844: p_process_flag := jai_constants.unexpected_error;
2845: p_process_message := lv_context||'->'||sqlerrm;
2846: jai_cmn_debug_contexts_pkg.print(ln_reg_id,lv_context||'->'||sqlerrm,jai_cmn_debug_contexts_pkg.summary);
2847: jai_cmn_debug_contexts_pkg.print_stack;
2848: end get_document_details ;

Line 2875: if p_process_flag = jai_constants.SUCCESSFUL then

2871: , p_trx_repo_extract_rec => lr_trx_repo_ext_rec
2872: , p_process_flag => p_process_flag
2873: , p_process_message => p_process_message
2874: );
2875: if p_process_flag = jai_constants.SUCCESSFUL then
2876: p_organization_id := lr_trx_repo_ext_rec.organization_id;
2877: p_location_id := lr_trx_repo_ext_rec.location_id;
2878: p_service_type_code := lr_trx_repo_ext_rec.service_type_code;
2879: end if;

Line 3006: p_process_flag := jai_constants.EXPECTED_ERROR;

3002: fetch c_get_refs_rec into lr_refs_rec;
3003: close c_get_refs_rec;
3004:
3005: if lr_refs_rec.reference_id is null then
3006: p_process_flag := jai_constants.EXPECTED_ERROR;
3007: p_process_message := 'Invalid reference id. Unable to location a repository reference for P_REFERENCE_ID='||p_reference_id;
3008: return;
3009: end if;
3010:

Line 3015: p_process_flag := jai_constants.EXPECTED_ERROR;

3011: if lr_refs_rec.source is null
3012: or lr_refs_rec.invoice_id is null
3013: or lr_refs_rec.item_line_id is null
3014: then
3015: p_process_flag := jai_constants.EXPECTED_ERROR;
3016: p_process_message := 'Unable to find transaction references in the repository. Source='|| lr_refs_rec.source
3017: ||', InvoiceID='|| lr_refs_rec.invoice_id
3018: ||', ItemLineID=' ||lr_refs_rec.item_line_id ;
3019: return;

Line 3076: p_process_flag := jai_constants.SUCCESSFUL;

3072: -- if called from Repository Review UI then do not default service type from document
3073: p_trx_repo_extract_rec.service_type_code := lr_service_type;
3074: end if;
3075:
3076: p_process_flag := jai_constants.SUCCESSFUL;
3077: ELSE
3078: *//*end commenting for bug#10085619*/
3079: --Add by Qiong for Advanced Receipts bug#13361952 Begin
3080: --------------------------------------------------------

Line 3081: IF lr_refs_rec.source = 'AR' AND p_source_trx_type in (jai_constants.trx_type_adv_app,jai_constants.trx_type_adv_unapp)

3077: ELSE
3078: *//*end commenting for bug#10085619*/
3079: --Add by Qiong for Advanced Receipts bug#13361952 Begin
3080: --------------------------------------------------------
3081: IF lr_refs_rec.source = 'AR' AND p_source_trx_type in (jai_constants.trx_type_adv_app,jai_constants.trx_type_adv_unapp)
3082: THEN
3083:
3084: jai_trx_repo_extract_pkg.derrive_doc_from_ref
3085: ( p_reference_source => lr_refs_rec.source

Line 3121: if p_process_flag <> jai_constants.SUCCESSFUL then

3117:
3118: end if;
3119: -- end bug#10085619
3120:
3121: if p_process_flag <> jai_constants.SUCCESSFUL then
3122: return;
3123: end if;
3124: jai_trx_repo_extract_pkg.get_document_details
3125: ( p_document_id => ln_doc_id

Line 3135: if p_process_flag <> jai_constants.SUCCESSFUL then

3131: , p_trx_repo_extract => p_trx_repo_extract_rec
3132: ---added p_taxline_no parameter for bug#10085619
3133: , p_taxline_no => lr_line_number
3134: );
3135: if p_process_flag <> jai_constants.SUCCESSFUL then
3136: return;
3137: end if;
3138:
3139: --END IF;

Line 3153: where processed_flag = jai_constants.NO;

3149: cursor c_get_recs_to_update
3150: is
3151: select *
3152: from jai_trx_repo_extract_gt
3153: where processed_flag = jai_constants.NO;
3154:
3155: ln_reg_id number;
3156:
3157: begin

Line 3163: p_process_flag := jai_constants.SUCCESSFUL;

3159: lv_member_name := 'UPDATE_SERVICE_TYPE';
3160: set_debug_context;
3161:
3162: /* Initialize the process variables */
3163: p_process_flag := jai_constants.SUCCESSFUL;
3164:
3165: jai_cmn_debug_contexts_pkg.register (lv_context, ln_reg_id);
3166: jai_cmn_debug_contexts_pkg.print (ln_reg_id, 'Begin loop for C_GET_RECS_TO_UPDATE', jai_cmn_debug_contexts_pkg.summary);
3167: for rec in c_get_recs_to_update

Line 3318: p_process_flag := jai_constants.unexpected_error;

3314: jai_cmn_debug_contexts_pkg.deregister (pn_reg_id => ln_reg_id);
3315:
3316: exception
3317: when others then
3318: p_process_flag := jai_constants.unexpected_error;
3319: p_process_message := lv_context||'->'||sqlerrm;
3320: jai_cmn_debug_contexts_pkg.print(ln_reg_id,lv_context||'->'||sqlerrm,jai_cmn_debug_contexts_pkg.summary);
3321: jai_cmn_debug_contexts_pkg.print_stack;
3322:

Line 3418: IF p_source_trx_type in (jai_constants.trx_type_adv_rcpts,jai_constants.trx_type_rct_rvs, jai_constants.trx_type_adv_app,jai_constants.trx_type_adv_unapp) --means it's advanced receipts

3414:
3415: if p_reference_source = 'AR' then
3416: /*Add by Wenqiong for Advanced Receipts Begin*/
3417: -----------------------------------------------
3418: IF p_source_trx_type in (jai_constants.trx_type_adv_rcpts,jai_constants.trx_type_rct_rvs, jai_constants.trx_type_adv_app,jai_constants.trx_type_adv_unapp) --means it's advanced receipts
3419: THEN
3420: p_trx_repo_extract_rec.transaction_source := 'RECEIVABLES';
3421: p_trx_repo_extract_rec.document_id := p_reference_invoice_id;
3422: p_trx_repo_extract_rec.document_line_id := p_reference_item_line_id;

Line 3557: p_process_flag := jai_constants.unexpected_error;

3553: jai_cmn_debug_contexts_pkg.deregister (pn_reg_id => ln_reg_id);
3554:
3555: exception
3556: when others then
3557: p_process_flag := jai_constants.unexpected_error;
3558: p_process_message := lv_context||'->'||sqlerrm;
3559: jai_cmn_debug_contexts_pkg.print(ln_reg_id,lv_context||'->'||sqlerrm,jai_cmn_debug_contexts_pkg.summary);
3560: jai_cmn_debug_contexts_pkg.print_stack;
3561:

Line 3589: if lv_process_flag = jai_constants.SUCCESSFUL then

3585: , p_service_type_code => lv_service_type_code
3586: , p_process_flag => lv_process_flag
3587: , p_process_message => lv_process_message
3588: );
3589: if lv_process_flag = jai_constants.SUCCESSFUL then
3590: return lv_service_type_code;
3591: else
3592: return null;
3593: end if;