2668:
2669: END IF;
2670:
2671:
2672: -- Get terms_date_basis from ap_system_parameters
2673: /*SELECT terms_date_basis
2674: INTO p_terms_date_basis
2675: FROM ap_system_parameters
2676: WHERE org_id = p_invoice_rec.org_id;*/ --Bug8323165
2671:
2672: -- Get terms_date_basis from ap_system_parameters
2673: /*SELECT terms_date_basis
2674: INTO p_terms_date_basis
2675: FROM ap_system_parameters
2676: WHERE org_id = p_invoice_rec.org_id;*/ --Bug8323165
2677:
2678: SELECT terms_date_basis
2679: INTO p_terms_date_basis
2963: -- If No curr code in vendor site ,then the default exception
2964: -- will reject.
2965: SELECT Invoice_currency_code
2966: INTO p_inv_currency_code
2967: FROM AP_System_Parameters
2968: WHERE Org_ID = p_invoice_rec.org_id;
2969:
2970: ELSE
2971: -- If No curr code in vendor site ,then the default exception
2992: IF p_inv_currency_code IS NULL
2993: THEN
2994: SELECT Invoice_currency_code
2995: INTO p_inv_currency_code
2996: FROM AP_System_Parameters
2997: WHERE Org_ID = p_invoice_rec.org_id;
2998: END IF;
2999:
3000: --End Bug9184247
4990: begin
4991: if (p_invoice_rec.invoice_type_lookup_code = 'PAYMENT REQUEST') then
4992: SELECT fsp.accts_pay_code_combination_id
4993: INTO p_invoice_rec.accts_pay_code_combination_id
4994: FROM ap_system_parameters asp,
4995: financials_system_parameters fsp
4996: WHERE asp.org_id = p_invoice_rec.org_id
4997: AND asp.org_id = fsp.org_id;
4998: else
6553: current_calling_sequence VARCHAR2(2000);
6554: debug_info VARCHAR2(500);
6555:
6556: --bug 9326733 starts
6557: l_make_rate_mand_flag AP_SYSTEM_PARAMETERS_ALL.MAKE_RATE_MANDATORY_FLAG%TYPE;
6558:
6559: CURSOR c_get_rate_mand_flag(l_org_id IN NUMBER) IS
6560: select nvl(make_rate_mandatory_flag, 'N')
6561: from ap_system_parameters_all
6557: l_make_rate_mand_flag AP_SYSTEM_PARAMETERS_ALL.MAKE_RATE_MANDATORY_FLAG%TYPE;
6558:
6559: CURSOR c_get_rate_mand_flag(l_org_id IN NUMBER) IS
6560: select nvl(make_rate_mandatory_flag, 'N')
6561: from ap_system_parameters_all
6562: where org_id = l_org_id
6563: and multi_currency_flag = 'Y';
6564: --bug 9326733 ends
6565:
20131: ||P_calling_sequence;
20132:
20133: --Bug12612189
20134: select awt_include_tax_amt into l_awt_include_tax_amt
20135: from ap_system_parameters_all
20136: where ORG_ID=P_INVOICE_REC.ORG_ID;
20137:
20138: --bug12612189, start comment
20139: /*
20334: 'AP_IMPORT_VALIDATION_PKG.v_check_invalid_line_pay_awt_g<-'
20335: ||P_calling_sequence;
20336: --Bug11728066
20337: select awt_include_tax_amt into l_awt_include_tax_amt
20338: from ap_system_parameters_all
20339: where org_id=p_invoice_rec.org_id;
20340:
20341: IF p_invoice_lines_rec.line_type_lookup_code ='TAX' --l_awt_include_tax_amt check
20342: and nvl(l_awt_include_tax_amt ,'N') <> 'Y' THEN
20630: l_income_tax_type ap_income_tax_types.income_tax_type%TYPE;
20631: l_income_tax_region ap_income_tax_regions.region_short_name%TYPE;
20632:
20633: -- Bug 9189995
20634: l_income_tax_region_flag ap_system_parameters_all.income_tax_region_flag%TYPE;
20635:
20636: -- Bug 7599916
20637: Cursor c_type_1099(c_vendor_id NUMBER) Is
20638: Select pov.type_1099
20872: select asp.income_tax_region,
20873: NVL(asp.income_tax_region_flag, 'N')
20874: into l_income_tax_region,
20875: l_income_tax_region_flag
20876: from ap_system_parameters asp
20877: where asp.org_id = p_invoice_rec.org_id;
20878:
20879: if (l_income_tax_region_flag = 'Y') then
20880: select pvs.state