1071: DECLARE
1072: CURSOR c_tax_account_id -- tax_account_id of tax_id and tax type Other
1073: IS
1074: SELECT tax_account_id
1075: FROM jai_cmn_taxes_all
1076: WHERE tax_id = p_tax_line_rec.tax_id
1077: AND tax_type = 'Other';
1078:
1079: v_tax_account_id jai_cmn_taxes_all.tax_account_id%type := NULL;
1075: FROM jai_cmn_taxes_all
1076: WHERE tax_id = p_tax_line_rec.tax_id
1077: AND tax_type = 'Other';
1078:
1079: v_tax_account_id jai_cmn_taxes_all.tax_account_id%type := NULL;
1080: BEGIN
1081: OPEN c_tax_account_id;
1082: FETCH c_tax_account_id INTO v_tax_account_id;
1083: CLOSE c_tax_account_id;
1602: adhoc_flag,
1603: nvl(tax_rate,-1) tax_rate,
1604: tax_type,
1605: NVL(rounding_factor,0) rounding_factor
1606: FROM JAI_CMN_TAXES_ALL
1607: WHERE tax_id = t_id;
1608:
1609: CURSOR for_org_id IS
1610: SELECT org_id, vendor_id, NVL(exchange_rate, 1) exchange_rate, invoice_currency_code,batch_id
3343: -- get the corresponding tax lin amount in the original invoice
3344: CURSOR c_get_orig_tax_line(p_orig_invoice_id NUMBER, p_orig_invoice_dist_id NUMBER, p_tax_id NUMBER) IS
3345:
3346: SELECT SUM(jam.tax_amount) tax_amount
3347: FROM jai_ap_match_inv_taxes jam, jai_cmn_taxes_all jct
3348: WHERE p_orig_invoice_id = p_orig_invoice_id AND
3349: parent_invoice_distribution_id = p_orig_invoice_dist_id AND
3350: jam.tax_id = p_tax_id
3351: AND jam.tax_id = jct.tax_id AND