DBA Data[Home] [Help]

APPS.JAI_PA_TAX_PKG dependencies on JAI_CONSTANTS

Line 254: if pv_action = jai_constants.default_taxes then

250: pv_process_message out nocopy varchar2,
251: pv_process_flag out nocopy varchar2
252: ) is
253: begin
254: if pv_action = jai_constants.default_taxes then
255: jai_pa_tax_pkg.tax_defaultation_line(
256: r_new => r_new ,
257: pv_action => pv_action,
258: pv_process_message => pv_process_message,

Line 261: elsif pv_action = jai_constants.recalculate_taxes then

257: pv_action => pv_action,
258: pv_process_message => pv_process_message,
259: pv_process_flag => pv_process_flag
260: );
261: elsif pv_action = jai_constants.recalculate_taxes then
262: jai_pa_tax_pkg.tax_recalculate_line(
263: r_new => r_new,
264: pv_action => pv_action,
265: pv_process_message => pv_process_message,

Line 395: pv_process_flag := jai_constants.expected_error;

391: close cur_distribution_rule ;
392:
393: if lv_distribution_rule is null then
394: pv_process_message := 'distribution rule not found ';
395: pv_process_flag := jai_constants.expected_error;
396: return ;
397: end if ;
398:
399: -- ln_process_status -- process status works as flag in which it tell about previous process was sucessfull or not

Line 403: if jai_constants.setup_event_type = rec_context_prefernece.context then

399: -- ln_process_status -- process status works as flag in which it tell about previous process was sucessfull or not
400: -- if successfull then it comes out from loop other wise continue with other one .
401: for rec_context_prefernece in cur_context_preference(lv_distribution_rule)
402: loop
403: if jai_constants.setup_event_type = rec_context_prefernece.context then
404: -- tax category for events
405: jai_pa_tax_pkg.get_event_tax_category(
406: pn_project_id ,
407: pn_draft_invoice_num ,

Line 420: if jai_constants.setup_expenditure_type = rec_context_prefernece.context then

416: -- exit when tax category is found for events
417: pn_tax_category_id := ln_tax_category_id ;
418: exit when ln_process_status = jai_pa_tax_pkg.process_success ;
419: end if ;
420: if jai_constants.setup_expenditure_type = rec_context_prefernece.context then
421: -- tax category for expenditure
422: jai_pa_tax_pkg.get_expn_tax_category(
423: pn_project_id ,
424: pn_draft_invoice_num ,

Line 436: if jai_constants.setup_project = rec_context_prefernece.context then

432: -- exit when tax category is found for expenditure
433: pn_tax_category_id := ln_tax_category_id ;
434: exit when ln_process_status = jai_pa_tax_pkg.process_success ;
435: end if ;
436: if jai_constants.setup_project = rec_context_prefernece.context then
437: -- tax category for projects
438: jai_pa_tax_pkg.get_project_tax_category(
439: pn_project_id ,
440: pn_draft_invoice_num ,

Line 453: if jai_constants.setup_customer_site = rec_context_prefernece.context then

449: pn_tax_category_id := ln_tax_category_id ;
450: exit when ln_process_status = jai_pa_tax_pkg.process_success ;
451: end if ;
452:
453: if jai_constants.setup_customer_site = rec_context_prefernece.context then
454: -- tax category for customer/site or customer null site
455: jai_pa_tax_pkg.get_cust_tax_category(
456: pn_project_id ,
457: pn_draft_invoice_num ,

Line 470: pv_process_flag := jai_constants.successful;

466: exit when ln_process_status = jai_pa_tax_pkg.process_success ;
467: end if ;
468: end loop ;
469: pv_process_message := '';
470: pv_process_flag := jai_constants.successful;
471: exception when others then
472: PV_PROCESS_MESSAGE := SUBSTR('GET_TAX_CATEGORY='|| SQLERRM,1,1999);
473: pv_process_flag := jai_constants.expected_error;
474: end get_tax_category ;

Line 473: pv_process_flag := jai_constants.expected_error;

469: pv_process_message := '';
470: pv_process_flag := jai_constants.successful;
471: exception when others then
472: PV_PROCESS_MESSAGE := SUBSTR('GET_TAX_CATEGORY='|| SQLERRM,1,1999);
473: pv_process_flag := jai_constants.expected_error;
474: end get_tax_category ;
475: /*-------------------------------BEGIN LOCAL METHOD GET_EVENT_TAX_CATEGORY -----------------------------*/
476: procedure get_event_tax_category(
477: pn_project_id in pa_draft_invoices_all.project_id%type ,

Line 517: where context = jai_constants.setup_event_type and -- this will search only for events not for other context types

513: -- responsible for getting tax category for event
514: cursor cur_get_tax_category is
515: select setup_value1 tax_category
516: from jai_pa_setup_values
517: where context = jai_constants.setup_event_type and -- this will search only for events not for other context types
518: attribute1 = ln_event_type_id and
519: org_id = ln_org_id; /*Bug 8348822 - Tax defaulted based on ORG_ID of the project*/
520:
521: begin

Line 584: pv_process_flag := jai_constants.successful;

580: pn_tax_category_id := ln_tax_category_id ;
581: pv_process_status := jai_pa_tax_pkg.process_success;
582:
583: pv_process_message := '';
584: pv_process_flag := jai_constants.successful;
585:
586: exception when others then
587: pv_process_status := jai_pa_tax_pkg.process_fail;
588: pn_tax_category_id := null ;

Line 590: pv_process_flag := jai_constants.unexpected_error;

586: exception when others then
587: pv_process_status := jai_pa_tax_pkg.process_fail;
588: pn_tax_category_id := null ;
589: pv_process_message := substr('get_event_tax_category='|| sqlerrm,1,1999);
590: pv_process_flag := jai_constants.unexpected_error;
591: end get_event_tax_category ;
592:
593: /*-------------------------------begin local method get_project_tax_category -----------------------------*/
594: procedure get_project_tax_category

Line 610: where context = jai_constants.setup_project and

606: ----------------CURSOR DECLARATIONS------------------------------
607: cursor cur_get_project_all is
608: select setup_value1 tax_category
609: from jai_pa_setup_values
610: where context = jai_constants.setup_project and
611: attribute1 = pn_project_id and
612: org_id = ln_org_id; /*Bug 8348822 - Tax defaulted based on ORG_ID of the project*/
613:
614: begin

Line 640: pv_process_flag := jai_constants.successful;

636: pn_tax_category_id := ln_tax_category_id ;
637: pv_process_status := jai_pa_tax_pkg.process_success;
638:
639: pv_process_message := '';
640: pv_process_flag := jai_constants.successful;
641:
642: exception when others then
643: pv_process_status := jai_pa_tax_pkg.process_fail;
644: pn_tax_category_id := null ;

Line 647: pv_process_flag := jai_constants.unexpected_error;

643: pv_process_status := jai_pa_tax_pkg.process_fail;
644: pn_tax_category_id := null ;
645:
646: pv_process_message := substr('get_project_tax_category='|| sqlerrm,1,1999);
647: pv_process_flag := jai_constants.unexpected_error;
648: end get_project_tax_category;
649: /*-------------------------------begin local method get_cust_tax_category -----------------------------*/
650: procedure get_cust_tax_category
651: ( pn_project_id in pa_draft_invoices_all.project_id%type ,

Line 672: context = jai_constants.setup_customer_site and

668: select setup_value1
669: from jai_pa_setup_values
670: where attribute1 = cn_customer_id and
671: attribute2 = cn_address_id and
672: context = jai_constants.setup_customer_site and
673: org_id = ln_org_id; /*Bug 8348822 - Tax defaulted based on ORG_ID of the project*/
674:
675: cursor cur_cust_tax(cn_customer_id pa_draft_invoices_all.ship_to_customer_id%type) is
676: select setup_value1

Line 679: context = jai_constants.setup_customer_site and

675: cursor cur_cust_tax(cn_customer_id pa_draft_invoices_all.ship_to_customer_id%type) is
676: select setup_value1
677: from jai_pa_setup_values
678: where attribute1 = cn_customer_id and
679: context = jai_constants.setup_customer_site and
680: attribute2 is null and
681: org_id = ln_org_id; /*Bug 8348822 - Tax defaulted based on ORG_ID of the project*/
682: begin
683: ----initialization part -----------------------------------------------------

Line 725: pv_process_flag := jai_constants.successful;

721: -- when process sucess in getting tax category----------------------------------------
722: pn_tax_category_id := ln_tax_category_id ;
723: pv_process_status := jai_pa_tax_pkg.process_success;
724: pv_process_message := '';
725: pv_process_flag := jai_constants.successful;
726: ---------------------------------------------------------------------------------------
727: exception when others then
728: pv_process_status := jai_pa_tax_pkg.process_fail;
729: pn_tax_category_id := null ;

Line 731: pv_process_flag := jai_constants.unexpected_error;

727: exception when others then
728: pv_process_status := jai_pa_tax_pkg.process_fail;
729: pn_tax_category_id := null ;
730: pv_process_message := substr('get_event_tax_category='|| sqlerrm,1,1999);
731: pv_process_flag := jai_constants.unexpected_error;
732: end get_cust_tax_category;
733:
734: /*-------------------------------BEGIN LOCAL METHOD GET_EXPN_TAX_CATEGORY -----------------------------*/
735: procedure get_expn_tax_category

Line 778: where jpsv.context = jai_constants.setup_expenditure_type and

774: cursor cur_expn_tax_category(cv_expenditure_type pa_expenditure_types.expenditure_type%type ) is
775: select jpsv.setup_value1
776: from jai_pa_setup_values jpsv,
777: pa_expenditure_types pet
778: where jpsv.context = jai_constants.setup_expenditure_type and
779: jpsv.attribute1 = pet.expenditure_type_id and
780: pet.expenditure_type =cv_expenditure_type and
781: jpsv.org_id = ln_org_id; /*Bug 8348822 - Tax defaulted based on
782: ORG_ID of the project*/ /* Bug 12534669 Added alias jpsv to org_id column*/

Line 827: pv_process_flag := jai_constants.successful;

823: pn_tax_category_id := ln_tax_category_id ;
824: pv_process_status := jai_pa_tax_pkg.process_success;
825:
826: pv_process_message := '';
827: pv_process_flag := jai_constants.successful;
828: ---------------------------------------------------------------------------------------
829: exception when others then
830: pv_process_status := jai_pa_tax_pkg.process_fail;
831: pn_tax_category_id := null ;

Line 834: pv_process_flag := jai_constants.unexpected_error;

830: pv_process_status := jai_pa_tax_pkg.process_fail;
831: pn_tax_category_id := null ;
832:
833: pv_process_message := substr('get_event_tax_category='|| sqlerrm,1,1999);
834: pv_process_flag := jai_constants.unexpected_error;
835: end get_expn_tax_category ;
836:
837: /*-------------------------------BEGIN LOCAL METHOD INSERT_LINE_INFO -----------------------------*/
838:

Line 1016: pv_process_flag := jai_constants.successful;

1012: pn_draft_invoice_id := ln_draft_invoice_id;
1013: pn_draft_invoice_line_id := ln_draft_invoice_line_id;
1014:
1015: pv_process_message := '';
1016: pv_process_flag := jai_constants.successful;
1017:
1018: exception when others then
1019: pv_process_message := substr('insert_line_info='|| sqlerrm,1,1999);
1020: pv_process_flag := jai_constants.unexpected_error;

Line 1020: pv_process_flag := jai_constants.unexpected_error;

1016: pv_process_flag := jai_constants.successful;
1017:
1018: exception when others then
1019: pv_process_message := substr('insert_line_info='|| sqlerrm,1,1999);
1020: pv_process_flag := jai_constants.unexpected_error;
1021: end insert_line_info;
1022:
1023: /*-------------------------------BEGIN LOCAL METHOD DEFAULT_TAXES -----------------------------*/
1024: procedure default_taxes (

Line 1047: source_doc_type = jai_constants.pa_draft_invoice ;

1043: select tax_category_id
1044: from jai_cmn_document_taxes
1045: where source_doc_id = pn_draft_invoice_id and
1046: source_doc_line_id = pn_draft_invoice_line_id and
1047: source_doc_type = jai_constants.pa_draft_invoice ;
1048:
1049: cursor cur_get_inv_info is
1050: select pdia.inv_currency_code , nvl(projfunc_invtrans_ex_rate,1) /*13513070 - Replaced inv_exchange_rate*/
1051: from pa_draft_invoices_all pdia, jai_pa_draft_invoice_lines jpdil

Line 1062: source_doc_type = jai_constants.pa_draft_invoice ;

1058: select sum(tax_amt)
1059: from jai_cmn_document_taxes
1060: where source_doc_id = pn_draft_invoice_id and
1061: source_doc_line_id = pn_draft_invoice_line_id and
1062: source_doc_type = jai_constants.pa_draft_invoice ;
1063: -- for credit invoice generation
1064: begin
1065: ln_tax_amount := 0 ;
1066: -- for credit invoice generation , tax category should be copy from parent to credit memo

Line 1138: j1.source_doc_type = jai_constants.pa_draft_invoice and

1134: fnd_global.login_id
1135: from jai_cmn_document_taxes j1 , JAI_CMN_TAXES_ALL j2
1136: where j1.source_doc_id = pkg_global_type.ln_draft_invoice_id and
1137: j1.source_doc_line_id = pkg_global_type.ln_draft_invoice_line_id and
1138: j1.source_doc_type = jai_constants.pa_draft_invoice and
1139: j1.tax_id = j2.tax_id ;
1140:
1141:
1142:

Line 1157: if lv_inv_currency_code = jai_constants.func_curr then

1153:
1154: else
1155:
1156: lv_inv_currency_code := pkg_global_type.lv_inv_currency_code;
1157: if lv_inv_currency_code = jai_constants.func_curr then
1158: ln_inv_exchange_rate := 1 ; -- for multi currecncy support
1159: else
1160: ln_inv_exchange_rate := (1/nvl(pkg_global_type.ln_inv_exchange_rate,1)); -- for multi currecncy support
1161: end if;

Line 1165: pv_process_flag := jai_constants.expected_error;

1161: end if;
1162:
1163: if pn_tax_category_id is null then
1164: pv_process_message := 'tax category can not be null ';
1165: pv_process_flag := jai_constants.expected_error;
1166: return ;
1167: end if;
1168:
1169: open cur_get_tax_caegotry ;

Line 1178: source_doc_type = jai_constants.pa_draft_invoice ;

1174: if ln_tax_category_id is not null and ln_tax_category_id <> pn_tax_category_id then
1175: delete from jai_cmn_document_taxes
1176: where source_doc_id = pn_draft_invoice_id and
1177: source_doc_line_id = pn_draft_invoice_line_id and
1178: source_doc_type = jai_constants.pa_draft_invoice ;
1179: end if ;
1180:
1181: IF PV_CALLED_FROM IS NOT NULL AND PV_CALLED_FROM = 'JAINRWDI' THEN
1182: -- procedure is being called from invoice review - india ui hence get currency related

Line 1193: if lv_inv_currency_code = jai_constants.func_curr then

1189: into lv_inv_currency_code,
1190: ln_inv_exchange_rate ;
1191: close cur_get_inv_info;
1192:
1193: if lv_inv_currency_code = jai_constants.func_curr then
1194: ln_inv_exchange_rate := 1 ; -- for multi currecncy support
1195: else
1196: ln_inv_exchange_rate := (1/nvl(ln_inv_exchange_rate,1)); -- FOR MULTI CURRECNCY SUPPORT
1197: END IF;

Line 1206: TRANSACTION_NAME => JAI_CONSTANTS.PA_DRAFT_INVOICE,

1202: LN_TAX_AMOUNT := PN_LINE_AMOUNT;
1203:
1204: jai_cmn_tax_defaultation_pkg.JA_IN_CALC_PREC_TAXES
1205: (
1206: TRANSACTION_NAME => JAI_CONSTANTS.PA_DRAFT_INVOICE,
1207: P_TAX_CATEGORY_ID => PN_TAX_CATEGORY_ID,
1208: P_HEADER_ID => PN_DRAFT_INVOICE_ID,
1209: P_LINE_ID => PN_DRAFT_INVOICE_LINE_ID,
1210: P_TAX_AMOUNT => LN_TAX_AMOUNT,

Line 1224: P_SOURCE_TRX_TYPE => JAI_CONSTANTS.PA_DRAFT_INVOICE,

1220: P_CREATED_BY => FND_GLOBAL.USER_ID,
1221: P_LAST_UPDATE_DATE => SYSDATE,
1222: P_LAST_UPDATED_BY => FND_GLOBAL.USER_ID,
1223: P_LAST_UPDATE_LOGIN => FND_GLOBAL.LOGIN_ID,
1224: P_SOURCE_TRX_TYPE => JAI_CONSTANTS.PA_DRAFT_INVOICE,
1225: P_SOURCE_TABLE_NAME => 'JAI_PA_DRAFT_INVOICE_LINES',
1226: P_ACTION => JAI_CONSTANTS.DEFAULT_TAXES
1227: /* for bug 16013918 by anupgupt
1228: , pn_gst_assessable_value=> ln_tax_amount -- Added by Eric Ma for Bug10043656 ,GST enhancement on Sep-14-2010

Line 1226: P_ACTION => JAI_CONSTANTS.DEFAULT_TAXES

1222: P_LAST_UPDATED_BY => FND_GLOBAL.USER_ID,
1223: P_LAST_UPDATE_LOGIN => FND_GLOBAL.LOGIN_ID,
1224: P_SOURCE_TRX_TYPE => JAI_CONSTANTS.PA_DRAFT_INVOICE,
1225: P_SOURCE_TABLE_NAME => 'JAI_PA_DRAFT_INVOICE_LINES',
1226: P_ACTION => JAI_CONSTANTS.DEFAULT_TAXES
1227: /* for bug 16013918 by anupgupt
1228: , pn_gst_assessable_value=> ln_tax_amount -- Added by Eric Ma for Bug10043656 ,GST enhancement on Sep-14-2010
1229: */
1230: ) ;

Line 1242: PV_PROCESS_FLAG := JAI_CONSTANTS.SUCCESSFUL;

1238: draft_invoice_id = pn_draft_invoice_id ;
1239: end if ;
1240: END IF ;
1241: PV_PROCESS_MESSAGE := '';
1242: PV_PROCESS_FLAG := JAI_CONSTANTS.SUCCESSFUL;
1243: EXCEPTION WHEN OTHERS THEN
1244: PV_PROCESS_MESSAGE := SUBSTR('DEFAULT_TAXES : ' || sqlerrm , 1,1999);
1245: PV_PROCESS_FLAG := JAI_CONSTANTS.UNEXPECTED_ERROR;
1246: END DEFAULT_TAXES;

Line 1245: PV_PROCESS_FLAG := JAI_CONSTANTS.UNEXPECTED_ERROR;

1241: PV_PROCESS_MESSAGE := '';
1242: PV_PROCESS_FLAG := JAI_CONSTANTS.SUCCESSFUL;
1243: EXCEPTION WHEN OTHERS THEN
1244: PV_PROCESS_MESSAGE := SUBSTR('DEFAULT_TAXES : ' || sqlerrm , 1,1999);
1245: PV_PROCESS_FLAG := JAI_CONSTANTS.UNEXPECTED_ERROR;
1246: END DEFAULT_TAXES;
1247:
1248: /*-------------------------------BEGIN LOCAL METHOD SYNC_DELETION -----------------------------*/
1249:

Line 1274: pv_process_flag := jai_constants.successful;

1270: where project_id =pn_project_id and
1271: draft_invoice_num = pn_draft_invoice_num ;
1272:
1273: pv_process_message := '';
1274: pv_process_flag := jai_constants.successful;
1275:
1276: exception when others then
1277: pv_process_message := substr('sync_deletion : ' || sqlerrm , 1,1999);
1278: pv_process_flag := jai_constants.unexpected_error;

Line 1278: pv_process_flag := jai_constants.unexpected_error;

1274: pv_process_flag := jai_constants.successful;
1275:
1276: exception when others then
1277: pv_process_message := substr('sync_deletion : ' || sqlerrm , 1,1999);
1278: pv_process_flag := jai_constants.unexpected_error;
1279: end sync_deletion;
1280: /*-------------------------------BEGIN LOCAL METHOD INITIALIZE_VARIABLE -----------------------------*/
1281:
1282: procedure initialize_variable ( pn_project_id number ,

Line 1317: pv_process_flag := jai_constants.successful;

1313: pkg_global_type.ln_write_off_flag ;
1314:
1315: close cur_project_header ;
1316: pv_process_message := '';
1317: pv_process_flag := jai_constants.successful;
1318: exception when others then
1319: pv_process_message := substr('sync_deletion : ' || sqlerrm , 1,1999);
1320: pv_process_flag := jai_constants.unexpected_error;
1321: end initialize_variable ;

Line 1320: pv_process_flag := jai_constants.unexpected_error;

1316: pv_process_message := '';
1317: pv_process_flag := jai_constants.successful;
1318: exception when others then
1319: pv_process_message := substr('sync_deletion : ' || sqlerrm , 1,1999);
1320: pv_process_flag := jai_constants.unexpected_error;
1321: end initialize_variable ;
1322:
1323: /*-------------------------------begin local method tax_recalculate_line -----------------------------*/
1324:

Line 1347: if lv_inv_currency_code = jai_constants.func_curr then

1343:
1344:
1345: begin
1346: lv_inv_currency_code := pkg_global_type.lv_inv_currency_code;
1347: if lv_inv_currency_code = jai_constants.func_curr then
1348: ln_inv_exchange_rate := 1 ; -- for multi currecncy support
1349: else
1350: ln_inv_exchange_rate := (1/nvl(pkg_global_type.ln_inv_exchange_rate,1)); -- for multi currecncy support
1351: end if;

Line 1358: TRANSACTION_NAME => JAI_CONSTANTS.PA_DRAFT_INVOICE,

1354: LOOP
1355: LN_TAX_AMOUNT := R_NEW.INV_AMOUNT ;
1356: jai_cmn_tax_defaultation_pkg.JA_IN_CALC_PREC_TAXES
1357: (
1358: TRANSACTION_NAME => JAI_CONSTANTS.PA_DRAFT_INVOICE,
1359: P_TAX_CATEGORY_ID => -1 , -- for recalculation tax category not required
1360: P_HEADER_ID => R_GET_LINE_DETAIL.DRAFT_INVOICE_ID,
1361: P_LINE_ID => R_GET_LINE_DETAIL.DRAFT_INVOICE_LINE_ID,
1362: P_TAX_AMOUNT => LN_TAX_AMOUNT,

Line 1376: P_SOURCE_TRX_TYPE => JAI_CONSTANTS.PA_DRAFT_INVOICE,

1372: P_CREATED_BY => FND_GLOBAL.USER_ID,
1373: P_LAST_UPDATE_DATE => SYSDATE,
1374: P_LAST_UPDATED_BY => FND_GLOBAL.USER_ID,
1375: P_LAST_UPDATE_LOGIN => FND_GLOBAL.LOGIN_ID,
1376: P_SOURCE_TRX_TYPE => JAI_CONSTANTS.PA_DRAFT_INVOICE,
1377: P_SOURCE_TABLE_NAME => 'JAI_PA_DRAFT_INVOICE_LINES',
1378: P_ACTION => JAI_CONSTANTS.RECALCULATE_TAXES
1379: /* for bug 16013918 by anupgupt
1380: , pn_gst_assessable_value => ln_tax_amount -- Added by Eric Ma for Bug10043656 ,GST enhancement on Sep-14-2010

Line 1378: P_ACTION => JAI_CONSTANTS.RECALCULATE_TAXES

1374: P_LAST_UPDATED_BY => FND_GLOBAL.USER_ID,
1375: P_LAST_UPDATE_LOGIN => FND_GLOBAL.LOGIN_ID,
1376: P_SOURCE_TRX_TYPE => JAI_CONSTANTS.PA_DRAFT_INVOICE,
1377: P_SOURCE_TABLE_NAME => 'JAI_PA_DRAFT_INVOICE_LINES',
1378: P_ACTION => JAI_CONSTANTS.RECALCULATE_TAXES
1379: /* for bug 16013918 by anupgupt
1380: , pn_gst_assessable_value => ln_tax_amount -- Added by Eric Ma for Bug10043656 ,GST enhancement on Sep-14-2010
1381: */
1382: ) ;