333: ln_vat_recoverable number;
334:
335: --lv_accounting_method_option ap_system_parameters_all.accounting_method_option%type; /* Service */
336: --commented the above by Sanjikum for Bug#4474501
337: lv_accrue_on_receipt_flag po_distributions_all.accrue_on_receipt_flag%type;
338: ln_excise_edu_cess number; /* Educational Cess */
339: ln_excise_sh_edu_cess number; /*Bug 5989740 bduvarag*/
340: ln_cvd_edu_cess number; /* Educational Cess */
341: ln_cvd_sh_edu_cess number; /*Bug 5989740 bduvarag*/
954: select ap_accrual_account
955: from mtl_parameters
956: where organization_id = cp_organization_id;
957:
958: cursor c_po_distributions_all(cp_po_distribution_id number) is
959: select accrual_account_id
960: from po_distributions_all
961: where po_distribution_id = cp_po_distribution_id;
962:
956: where organization_id = cp_organization_id;
957:
958: cursor c_po_distributions_all(cp_po_distribution_id number) is
959: select accrual_account_id
960: from po_distributions_all
961: where po_distribution_id = cp_po_distribution_id;
962:
963: cursor c_po_distributions_all_1(cp_po_line_location_id number) is
964: select accrual_account_id
959: select accrual_account_id
960: from po_distributions_all
961: where po_distribution_id = cp_po_distribution_id;
962:
963: cursor c_po_distributions_all_1(cp_po_line_location_id number) is
964: select accrual_account_id
965: from po_distributions_all
966: where po_distribution_id =
967: (
961: where po_distribution_id = cp_po_distribution_id;
962:
963: cursor c_po_distributions_all_1(cp_po_line_location_id number) is
964: select accrual_account_id
965: from po_distributions_all
966: where po_distribution_id =
967: (
968: select max(po_distribution_id)
969: from po_distributions_all
965: from po_distributions_all
966: where po_distribution_id =
967: (
968: select max(po_distribution_id)
969: from po_distributions_all
970: where line_location_id = cp_po_line_location_id
971: );
972:
973: cursor c_mtl_interorg_parameters
990:
991: r_ja_in_hr_organization_units c_ja_in_hr_organization_units%rowtype;
992: r_ja_in_hr_organization_units1 c_ja_in_hr_organization_units%rowtype;
993: r_mtl_parameters c_mtl_parameters%rowtype;
994: r_po_distributions_all c_po_distributions_all%rowtype;
995: r_po_distributions_all_1 c_po_distributions_all_1%rowtype;
996: r_rcv_parameters c_rcv_parameters%rowtype;
997: r_mtl_interorg_parameters c_mtl_interorg_parameters%rowtype;
998: r_iso_from_org_type c_iso_from_org_type%rowtype; /* Bug#4171469 */
991: r_ja_in_hr_organization_units c_ja_in_hr_organization_units%rowtype;
992: r_ja_in_hr_organization_units1 c_ja_in_hr_organization_units%rowtype;
993: r_mtl_parameters c_mtl_parameters%rowtype;
994: r_po_distributions_all c_po_distributions_all%rowtype;
995: r_po_distributions_all_1 c_po_distributions_all_1%rowtype;
996: r_rcv_parameters c_rcv_parameters%rowtype;
997: r_mtl_interorg_parameters c_mtl_interorg_parameters%rowtype;
998: r_iso_from_org_type c_iso_from_org_type%rowtype; /* Bug#4171469 */
999:
1067: p_codepath := jai_general_pkg.plot_codepath(9, p_codepath); /* 9 */
1068: if p_po_distribution_id is not null then
1069:
1070: p_codepath := jai_general_pkg.plot_codepath(10, p_codepath); /* 10 */
1071: open c_po_distributions_all(p_po_distribution_id);
1072: fetch c_po_distributions_all into r_po_distributions_all;
1073: close c_po_distributions_all;
1074:
1075: p_po_accrual_account_id := r_po_distributions_all.accrual_account_id;
1068: if p_po_distribution_id is not null then
1069:
1070: p_codepath := jai_general_pkg.plot_codepath(10, p_codepath); /* 10 */
1071: open c_po_distributions_all(p_po_distribution_id);
1072: fetch c_po_distributions_all into r_po_distributions_all;
1073: close c_po_distributions_all;
1074:
1075: p_po_accrual_account_id := r_po_distributions_all.accrual_account_id;
1076:
1069:
1070: p_codepath := jai_general_pkg.plot_codepath(10, p_codepath); /* 10 */
1071: open c_po_distributions_all(p_po_distribution_id);
1072: fetch c_po_distributions_all into r_po_distributions_all;
1073: close c_po_distributions_all;
1074:
1075: p_po_accrual_account_id := r_po_distributions_all.accrual_account_id;
1076:
1077: end if;
1071: open c_po_distributions_all(p_po_distribution_id);
1072: fetch c_po_distributions_all into r_po_distributions_all;
1073: close c_po_distributions_all;
1074:
1075: p_po_accrual_account_id := r_po_distributions_all.accrual_account_id;
1076:
1077: end if;
1078:
1079:
1076:
1077: end if;
1078:
1079:
1080: if r_po_distributions_all.accrual_account_id is null and
1081: p_po_line_location_id is not null then
1082:
1083: p_codepath := jai_general_pkg.plot_codepath(11, p_codepath); /* 11 */
1084: open c_po_distributions_all_1(p_po_line_location_id);
1080: if r_po_distributions_all.accrual_account_id is null and
1081: p_po_line_location_id is not null then
1082:
1083: p_codepath := jai_general_pkg.plot_codepath(11, p_codepath); /* 11 */
1084: open c_po_distributions_all_1(p_po_line_location_id);
1085: fetch c_po_distributions_all_1 into r_po_distributions_all_1;
1086: close c_po_distributions_all_1;
1087:
1088: p_po_accrual_account_id := r_po_distributions_all_1.accrual_account_id;
1081: p_po_line_location_id is not null then
1082:
1083: p_codepath := jai_general_pkg.plot_codepath(11, p_codepath); /* 11 */
1084: open c_po_distributions_all_1(p_po_line_location_id);
1085: fetch c_po_distributions_all_1 into r_po_distributions_all_1;
1086: close c_po_distributions_all_1;
1087:
1088: p_po_accrual_account_id := r_po_distributions_all_1.accrual_account_id;
1089:
1082:
1083: p_codepath := jai_general_pkg.plot_codepath(11, p_codepath); /* 11 */
1084: open c_po_distributions_all_1(p_po_line_location_id);
1085: fetch c_po_distributions_all_1 into r_po_distributions_all_1;
1086: close c_po_distributions_all_1;
1087:
1088: p_po_accrual_account_id := r_po_distributions_all_1.accrual_account_id;
1089:
1090: p_codepath := jai_general_pkg.plot_codepath(12, p_codepath); /* 12 */
1084: open c_po_distributions_all_1(p_po_line_location_id);
1085: fetch c_po_distributions_all_1 into r_po_distributions_all_1;
1086: close c_po_distributions_all_1;
1087:
1088: p_po_accrual_account_id := r_po_distributions_all_1.accrual_account_id;
1089:
1090: p_codepath := jai_general_pkg.plot_codepath(12, p_codepath); /* 12 */
1091:
1092: end if;