DBA Data[Home] [Help]

APPS.JAI_PA_TAX_PKG dependencies on JAI_CONSTANTS

Line 244: if pv_action = jai_constants.default_taxes then

240: pv_process_message out nocopy varchar2,
241: pv_process_flag out nocopy varchar2
242: ) is
243: begin
244: if pv_action = jai_constants.default_taxes then
245: jai_pa_tax_pkg.tax_defaultation_line(
246: r_new => r_new ,
247: pv_action => pv_action,
248: pv_process_message => pv_process_message,

Line 251: elsif pv_action = jai_constants.recalculate_taxes then

247: pv_action => pv_action,
248: pv_process_message => pv_process_message,
249: pv_process_flag => pv_process_flag
250: );
251: elsif pv_action = jai_constants.recalculate_taxes then
252: jai_pa_tax_pkg.tax_recalculate_line(
253: r_new => r_new,
254: pv_action => pv_action,
255: pv_process_message => pv_process_message,

Line 384: pv_process_flag := jai_constants.expected_error;

380: close cur_distribution_rule ;
381:
382: if lv_distribution_rule is null then
383: pv_process_message := 'distribution rule not found ';
384: pv_process_flag := jai_constants.expected_error;
385: return ;
386: end if ;
387:
388: -- ln_process_status -- process status works as flag in which it tell about previous process was sucessfull or not

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

388: -- ln_process_status -- process status works as flag in which it tell about previous process was sucessfull or not
389: -- if successfull then it comes out from loop other wise continue with other one .
390: for rec_context_prefernece in cur_context_preference(lv_distribution_rule)
391: loop
392: if jai_constants.setup_event_type = rec_context_prefernece.context then
393: -- tax category for events
394: jai_pa_tax_pkg.get_event_tax_category(
395: pn_project_id ,
396: pn_draft_invoice_num ,

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

405: -- exit when tax category is found for events
406: pn_tax_category_id := ln_tax_category_id ;
407: exit when ln_process_status = jai_pa_tax_pkg.process_success ;
408: end if ;
409: if jai_constants.setup_expenditure_type = rec_context_prefernece.context then
410: -- tax category for expenditure
411: jai_pa_tax_pkg.get_expn_tax_category(
412: pn_project_id ,
413: pn_draft_invoice_num ,

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

421: -- exit when tax category is found for expenditure
422: pn_tax_category_id := ln_tax_category_id ;
423: exit when ln_process_status = jai_pa_tax_pkg.process_success ;
424: end if ;
425: if jai_constants.setup_project = rec_context_prefernece.context then
426: -- tax category for projects
427: jai_pa_tax_pkg.get_project_tax_category(
428: pn_project_id ,
429: pn_draft_invoice_num ,

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

438: pn_tax_category_id := ln_tax_category_id ;
439: exit when ln_process_status = jai_pa_tax_pkg.process_success ;
440: end if ;
441:
442: if jai_constants.setup_customer_site = rec_context_prefernece.context then
443: -- tax category for customer/site or customer null site
444: jai_pa_tax_pkg.get_cust_tax_category(
445: pn_project_id ,
446: pn_draft_invoice_num ,

Line 459: pv_process_flag := jai_constants.successful;

455: exit when ln_process_status = jai_pa_tax_pkg.process_success ;
456: end if ;
457: end loop ;
458: pv_process_message := '';
459: pv_process_flag := jai_constants.successful;
460: exception when others then
461: PV_PROCESS_MESSAGE := SUBSTR('GET_TAX_CATEGORY='|| SQLERRM,1,1999);
462: pv_process_flag := jai_constants.expected_error;
463: end get_tax_category ;

Line 462: pv_process_flag := jai_constants.expected_error;

458: pv_process_message := '';
459: pv_process_flag := jai_constants.successful;
460: exception when others then
461: PV_PROCESS_MESSAGE := SUBSTR('GET_TAX_CATEGORY='|| SQLERRM,1,1999);
462: pv_process_flag := jai_constants.expected_error;
463: end get_tax_category ;
464: /*-------------------------------BEGIN LOCAL METHOD GET_EVENT_TAX_CATEGORY -----------------------------*/
465: procedure get_event_tax_category(
466: pn_project_id in pa_draft_invoices_all.project_id%type ,

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

501: -- responsible for getting tax category for event
502: cursor cur_get_tax_category is
503: select setup_value1 tax_category
504: from jai_pa_setup_values
505: where context = jai_constants.setup_event_type and -- this will search only for events not for other context types
506: attribute1 = ln_event_type_id ;
507:
508: begin
509: ----initialization part -----------------------------------------------------

Line 566: pv_process_flag := jai_constants.successful;

562: pn_tax_category_id := ln_tax_category_id ;
563: pv_process_status := jai_pa_tax_pkg.process_success;
564:
565: pv_process_message := '';
566: pv_process_flag := jai_constants.successful;
567:
568: exception when others then
569: pv_process_status := jai_pa_tax_pkg.process_fail;
570: pn_tax_category_id := null ;

Line 572: pv_process_flag := jai_constants.unexpected_error;

568: exception when others then
569: pv_process_status := jai_pa_tax_pkg.process_fail;
570: pn_tax_category_id := null ;
571: pv_process_message := substr('get_event_tax_category='|| sqlerrm,1,1999);
572: pv_process_flag := jai_constants.unexpected_error;
573: end get_event_tax_category ;
574:
575: /*-------------------------------begin local method get_project_tax_category -----------------------------*/
576: procedure get_project_tax_category

Line 591: where context = jai_constants.setup_project and

587: ----------------CURSOR DECLARATIONS------------------------------
588: cursor cur_get_project_all is
589: select setup_value1 tax_category
590: from jai_pa_setup_values
591: where context = jai_constants.setup_project and
592: attribute1 = pn_project_id ;
593:
594: begin
595: ----initialization part -----------------------------------------------------

Line 615: pv_process_flag := jai_constants.successful;

611: pn_tax_category_id := ln_tax_category_id ;
612: pv_process_status := jai_pa_tax_pkg.process_success;
613:
614: pv_process_message := '';
615: pv_process_flag := jai_constants.successful;
616:
617: exception when others then
618: pv_process_status := jai_pa_tax_pkg.process_fail;
619: pn_tax_category_id := null ;

Line 622: pv_process_flag := jai_constants.unexpected_error;

618: pv_process_status := jai_pa_tax_pkg.process_fail;
619: pn_tax_category_id := null ;
620:
621: pv_process_message := substr('get_project_tax_category='|| sqlerrm,1,1999);
622: pv_process_flag := jai_constants.unexpected_error;
623: end get_project_tax_category;
624: /*-------------------------------begin local method get_cust_tax_category -----------------------------*/
625: procedure get_cust_tax_category
626: ( pn_project_id in pa_draft_invoices_all.project_id%type ,

Line 646: context = jai_constants.setup_customer_site ;

642: select setup_value1
643: from jai_pa_setup_values
644: where attribute1 = cn_customer_id and
645: attribute2 = cn_address_id and
646: context = jai_constants.setup_customer_site ;
647:
648: cursor cur_cust_tax(cn_customer_id pa_draft_invoices_all.ship_to_customer_id%type) is
649: select setup_value1
650: from jai_pa_setup_values

Line 652: context = jai_constants.setup_customer_site and

648: cursor cur_cust_tax(cn_customer_id pa_draft_invoices_all.ship_to_customer_id%type) is
649: select setup_value1
650: from jai_pa_setup_values
651: where attribute1 = cn_customer_id and
652: context = jai_constants.setup_customer_site and
653: attribute2 is null ;
654: begin
655: ----initialization part -----------------------------------------------------
656: pv_process_status := jai_pa_tax_pkg.process_fail;

Line 692: pv_process_flag := jai_constants.successful;

688: -- when process sucess in getting tax category----------------------------------------
689: pn_tax_category_id := ln_tax_category_id ;
690: pv_process_status := jai_pa_tax_pkg.process_success;
691: pv_process_message := '';
692: pv_process_flag := jai_constants.successful;
693: ---------------------------------------------------------------------------------------
694: exception when others then
695: pv_process_status := jai_pa_tax_pkg.process_fail;
696: pn_tax_category_id := null ;

Line 698: pv_process_flag := jai_constants.unexpected_error;

694: exception when others then
695: pv_process_status := jai_pa_tax_pkg.process_fail;
696: pn_tax_category_id := null ;
697: pv_process_message := substr('get_event_tax_category='|| sqlerrm,1,1999);
698: pv_process_flag := jai_constants.unexpected_error;
699: end get_cust_tax_category;
700:
701: /*-------------------------------BEGIN LOCAL METHOD GET_EXPN_TAX_CATEGORY -----------------------------*/
702: procedure get_expn_tax_category

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

740: cursor cur_expn_tax_category(cv_expenditure_type pa_expenditure_types.expenditure_type%type ) is
741: select jpsv.setup_value1
742: from jai_pa_setup_values jpsv,
743: pa_expenditure_types pet
744: where jpsv.context = jai_constants.setup_expenditure_type and
745: jpsv.attribute1 = pet.expenditure_type_id and
746: pet.expenditure_type =cv_expenditure_type ;
747: begin
748: ----initialization part -----------------------------------------------------

Line 786: pv_process_flag := jai_constants.successful;

782: pn_tax_category_id := ln_tax_category_id ;
783: pv_process_status := jai_pa_tax_pkg.process_success;
784:
785: pv_process_message := '';
786: pv_process_flag := jai_constants.successful;
787: ---------------------------------------------------------------------------------------
788: exception when others then
789: pv_process_status := jai_pa_tax_pkg.process_fail;
790: pn_tax_category_id := null ;

Line 793: pv_process_flag := jai_constants.unexpected_error;

789: pv_process_status := jai_pa_tax_pkg.process_fail;
790: pn_tax_category_id := null ;
791:
792: pv_process_message := substr('get_event_tax_category='|| sqlerrm,1,1999);
793: pv_process_flag := jai_constants.unexpected_error;
794: end get_expn_tax_category ;
795:
796: /*-------------------------------BEGIN LOCAL METHOD INSERT_LINE_INFO -----------------------------*/
797:

Line 975: pv_process_flag := jai_constants.successful;

971: pn_draft_invoice_id := ln_draft_invoice_id;
972: pn_draft_invoice_line_id := ln_draft_invoice_line_id;
973:
974: pv_process_message := '';
975: pv_process_flag := jai_constants.successful;
976:
977: exception when others then
978: pv_process_message := substr('insert_line_info='|| sqlerrm,1,1999);
979: pv_process_flag := jai_constants.unexpected_error;

Line 979: pv_process_flag := jai_constants.unexpected_error;

975: pv_process_flag := jai_constants.successful;
976:
977: exception when others then
978: pv_process_message := substr('insert_line_info='|| sqlerrm,1,1999);
979: pv_process_flag := jai_constants.unexpected_error;
980: end insert_line_info;
981:
982: /*-------------------------------BEGIN LOCAL METHOD DEFAULT_TAXES -----------------------------*/
983: procedure default_taxes (

Line 1006: source_doc_type = jai_constants.pa_draft_invoice ;

1002: select tax_category_id
1003: from jai_cmn_document_taxes
1004: where source_doc_id = pn_draft_invoice_id and
1005: source_doc_line_id = pn_draft_invoice_line_id and
1006: source_doc_type = jai_constants.pa_draft_invoice ;
1007:
1008: cursor cur_get_inv_info is
1009: select pdia.inv_currency_code , pdia.inv_exchange_rate
1010: from pa_draft_invoices_all pdia, jai_pa_draft_invoice_lines jpdil

Line 1021: source_doc_type = jai_constants.pa_draft_invoice ;

1017: select sum(tax_amt)
1018: from jai_cmn_document_taxes
1019: where source_doc_id = pn_draft_invoice_id and
1020: source_doc_line_id = pn_draft_invoice_line_id and
1021: source_doc_type = jai_constants.pa_draft_invoice ;
1022: -- for credit invoice generation
1023: begin
1024: ln_tax_amount := 0 ;
1025: -- for credit invoice generation , tax category should be copy from parent to credit memo

Line 1097: j1.source_doc_type = jai_constants.pa_draft_invoice and

1093: fnd_global.login_id
1094: from jai_cmn_document_taxes j1 , JAI_CMN_TAXES_ALL j2
1095: where j1.source_doc_id = pkg_global_type.ln_draft_invoice_id and
1096: j1.source_doc_line_id = pkg_global_type.ln_draft_invoice_line_id and
1097: j1.source_doc_type = jai_constants.pa_draft_invoice and
1098: j1.tax_id = j2.tax_id ;
1099:
1100:
1101:

Line 1116: if lv_inv_currency_code = jai_constants.func_curr then

1112:
1113: else
1114:
1115: lv_inv_currency_code := pkg_global_type.lv_inv_currency_code;
1116: if lv_inv_currency_code = jai_constants.func_curr then
1117: ln_inv_exchange_rate := 1 ; -- for multi currecncy support
1118: else
1119: ln_inv_exchange_rate := (1/nvl(pkg_global_type.ln_inv_exchange_rate,1)); -- for multi currecncy support
1120: end if;

Line 1124: pv_process_flag := jai_constants.expected_error;

1120: end if;
1121:
1122: if pn_tax_category_id is null then
1123: pv_process_message := 'tax category can not be null ';
1124: pv_process_flag := jai_constants.expected_error;
1125: return ;
1126: end if;
1127:
1128: open cur_get_tax_caegotry ;

Line 1137: source_doc_type = jai_constants.pa_draft_invoice ;

1133: if ln_tax_category_id is not null and ln_tax_category_id <> pn_tax_category_id then
1134: delete from jai_cmn_document_taxes
1135: where source_doc_id = pn_draft_invoice_id and
1136: source_doc_line_id = pn_draft_invoice_line_id and
1137: source_doc_type = jai_constants.pa_draft_invoice ;
1138: end if ;
1139:
1140: IF PV_CALLED_FROM IS NOT NULL AND PV_CALLED_FROM = 'JAINRWDI' THEN
1141: -- procedure is being called from invoice review - india ui hence get currency related

Line 1152: if lv_inv_currency_code = jai_constants.func_curr then

1148: into lv_inv_currency_code,
1149: ln_inv_exchange_rate ;
1150: close cur_get_inv_info;
1151:
1152: if lv_inv_currency_code = jai_constants.func_curr then
1153: ln_inv_exchange_rate := 1 ; -- for multi currecncy support
1154: else
1155: ln_inv_exchange_rate := (1/nvl(ln_inv_exchange_rate,1)); -- FOR MULTI CURRECNCY SUPPORT
1156: END IF;

Line 1165: TRANSACTION_NAME => JAI_CONSTANTS.PA_DRAFT_INVOICE,

1161: LN_TAX_AMOUNT := PN_LINE_AMOUNT;
1162:
1163: jai_cmn_tax_defaultation_pkg.JA_IN_CALC_PREC_TAXES
1164: (
1165: TRANSACTION_NAME => JAI_CONSTANTS.PA_DRAFT_INVOICE,
1166: P_TAX_CATEGORY_ID => PN_TAX_CATEGORY_ID,
1167: P_HEADER_ID => PN_DRAFT_INVOICE_ID,
1168: P_LINE_ID => PN_DRAFT_INVOICE_LINE_ID,
1169: P_TAX_AMOUNT => LN_TAX_AMOUNT,

Line 1183: P_SOURCE_TRX_TYPE => JAI_CONSTANTS.PA_DRAFT_INVOICE,

1179: P_CREATED_BY => FND_GLOBAL.USER_ID,
1180: P_LAST_UPDATE_DATE => SYSDATE,
1181: P_LAST_UPDATED_BY => FND_GLOBAL.USER_ID,
1182: P_LAST_UPDATE_LOGIN => FND_GLOBAL.LOGIN_ID,
1183: P_SOURCE_TRX_TYPE => JAI_CONSTANTS.PA_DRAFT_INVOICE,
1184: P_SOURCE_TABLE_NAME => 'JAI_PA_DRAFT_INVOICE_LINES',
1185: P_ACTION => JAI_CONSTANTS.DEFAULT_TAXES
1186: ) ;
1187:

Line 1185: P_ACTION => JAI_CONSTANTS.DEFAULT_TAXES

1181: P_LAST_UPDATED_BY => FND_GLOBAL.USER_ID,
1182: P_LAST_UPDATE_LOGIN => FND_GLOBAL.LOGIN_ID,
1183: P_SOURCE_TRX_TYPE => JAI_CONSTANTS.PA_DRAFT_INVOICE,
1184: P_SOURCE_TABLE_NAME => 'JAI_PA_DRAFT_INVOICE_LINES',
1185: P_ACTION => JAI_CONSTANTS.DEFAULT_TAXES
1186: ) ;
1187:
1188:
1189: pn_tax_amount := ln_tax_amount;

Line 1198: PV_PROCESS_FLAG := JAI_CONSTANTS.SUCCESSFUL;

1194: draft_invoice_id = pn_draft_invoice_id ;
1195: end if ;
1196: END IF ;
1197: PV_PROCESS_MESSAGE := '';
1198: PV_PROCESS_FLAG := JAI_CONSTANTS.SUCCESSFUL;
1199: EXCEPTION WHEN OTHERS THEN
1200: PV_PROCESS_MESSAGE := SUBSTR('DEFAULT_TAXES : ' || sqlerrm , 1,1999);
1201: PV_PROCESS_FLAG := JAI_CONSTANTS.UNEXPECTED_ERROR;
1202: END DEFAULT_TAXES;

Line 1201: PV_PROCESS_FLAG := JAI_CONSTANTS.UNEXPECTED_ERROR;

1197: PV_PROCESS_MESSAGE := '';
1198: PV_PROCESS_FLAG := JAI_CONSTANTS.SUCCESSFUL;
1199: EXCEPTION WHEN OTHERS THEN
1200: PV_PROCESS_MESSAGE := SUBSTR('DEFAULT_TAXES : ' || sqlerrm , 1,1999);
1201: PV_PROCESS_FLAG := JAI_CONSTANTS.UNEXPECTED_ERROR;
1202: END DEFAULT_TAXES;
1203:
1204: /*-------------------------------BEGIN LOCAL METHOD SYNC_DELETION -----------------------------*/
1205:

Line 1230: pv_process_flag := jai_constants.successful;

1226: where project_id =pn_project_id and
1227: draft_invoice_num = pn_draft_invoice_num ;
1228:
1229: pv_process_message := '';
1230: pv_process_flag := jai_constants.successful;
1231:
1232: exception when others then
1233: pv_process_message := substr('sync_deletion : ' || sqlerrm , 1,1999);
1234: pv_process_flag := jai_constants.unexpected_error;

Line 1234: pv_process_flag := jai_constants.unexpected_error;

1230: pv_process_flag := jai_constants.successful;
1231:
1232: exception when others then
1233: pv_process_message := substr('sync_deletion : ' || sqlerrm , 1,1999);
1234: pv_process_flag := jai_constants.unexpected_error;
1235: end sync_deletion;
1236: /*-------------------------------BEGIN LOCAL METHOD INITIALIZE_VARIABLE -----------------------------*/
1237:
1238: procedure initialize_variable ( pn_project_id number ,

Line 1273: pv_process_flag := jai_constants.successful;

1269: pkg_global_type.ln_write_off_flag ;
1270:
1271: close cur_project_header ;
1272: pv_process_message := '';
1273: pv_process_flag := jai_constants.successful;
1274: exception when others then
1275: pv_process_message := substr('sync_deletion : ' || sqlerrm , 1,1999);
1276: pv_process_flag := jai_constants.unexpected_error;
1277: end initialize_variable ;

Line 1276: pv_process_flag := jai_constants.unexpected_error;

1272: pv_process_message := '';
1273: pv_process_flag := jai_constants.successful;
1274: exception when others then
1275: pv_process_message := substr('sync_deletion : ' || sqlerrm , 1,1999);
1276: pv_process_flag := jai_constants.unexpected_error;
1277: end initialize_variable ;
1278:
1279: /*-------------------------------begin local method tax_recalculate_line -----------------------------*/
1280:

Line 1303: if lv_inv_currency_code = jai_constants.func_curr then

1299:
1300:
1301: begin
1302: lv_inv_currency_code := pkg_global_type.lv_inv_currency_code;
1303: if lv_inv_currency_code = jai_constants.func_curr then
1304: ln_inv_exchange_rate := 1 ; -- for multi currecncy support
1305: else
1306: ln_inv_exchange_rate := (1/nvl(pkg_global_type.ln_inv_exchange_rate,1)); -- for multi currecncy support
1307: end if;

Line 1314: TRANSACTION_NAME => JAI_CONSTANTS.PA_DRAFT_INVOICE,

1310: LOOP
1311: LN_TAX_AMOUNT := R_NEW.INV_AMOUNT ;
1312: jai_cmn_tax_defaultation_pkg.JA_IN_CALC_PREC_TAXES
1313: (
1314: TRANSACTION_NAME => JAI_CONSTANTS.PA_DRAFT_INVOICE,
1315: P_TAX_CATEGORY_ID => -1 , -- for recalculation tax category not required
1316: P_HEADER_ID => R_GET_LINE_DETAIL.DRAFT_INVOICE_ID,
1317: P_LINE_ID => R_GET_LINE_DETAIL.DRAFT_INVOICE_LINE_ID,
1318: P_TAX_AMOUNT => LN_TAX_AMOUNT,

Line 1332: P_SOURCE_TRX_TYPE => JAI_CONSTANTS.PA_DRAFT_INVOICE,

1328: P_CREATED_BY => FND_GLOBAL.USER_ID,
1329: P_LAST_UPDATE_DATE => SYSDATE,
1330: P_LAST_UPDATED_BY => FND_GLOBAL.USER_ID,
1331: P_LAST_UPDATE_LOGIN => FND_GLOBAL.LOGIN_ID,
1332: P_SOURCE_TRX_TYPE => JAI_CONSTANTS.PA_DRAFT_INVOICE,
1333: P_SOURCE_TABLE_NAME => 'JAI_PA_DRAFT_INVOICE_LINES',
1334: P_ACTION => JAI_CONSTANTS.RECALCULATE_TAXES
1335: ) ;
1336:

Line 1334: P_ACTION => JAI_CONSTANTS.RECALCULATE_TAXES

1330: P_LAST_UPDATED_BY => FND_GLOBAL.USER_ID,
1331: P_LAST_UPDATE_LOGIN => FND_GLOBAL.LOGIN_ID,
1332: P_SOURCE_TRX_TYPE => JAI_CONSTANTS.PA_DRAFT_INVOICE,
1333: P_SOURCE_TABLE_NAME => 'JAI_PA_DRAFT_INVOICE_LINES',
1334: P_ACTION => JAI_CONSTANTS.RECALCULATE_TAXES
1335: ) ;
1336:
1337: update jai_pa_draft_invoice_lines
1338: set line_tax_amt = ln_tax_amount ,