DBA Data[Home] [Help]

APPS.JAI_AP_TDS_PROCESSING_PKG dependencies on JAI_AP_TDS_INV_PAYMENTS

Line 221: from JAI_AP_TDS_INV_PAYMENTS

217: and nvl(jitc.section_code,'XYZ') = nvl(pv_tds_section, section_code)
218: /*bduvarag for Bug#5647725*/
219: and not exists (
220: select '1'
221: from JAI_AP_TDS_INV_PAYMENTS
222: where check_id = aca.check_id
223: and vendor_id = jattt.vendor_id /*Added by nprashar for bug # 6195566*/
224: and invoice_id = aipa.invoice_id /*Added by nprashar for bug # 6195566*/
225: and tds_tax_id in /*bduvarag for Bug#5647725*/

Line 288: from JAI_AP_TDS_INV_PAYMENTS

284: --Removed the union code by Bgowrava for Bug#6129650
285: )
286: and not exists (
287: select '1'
288: from JAI_AP_TDS_INV_PAYMENTS
289: where invoice_id = aia.invoice_id
290: )
291: and not exists (
292: SELECT 1

Line 418: from JAI_AP_TDS_INV_PAYMENTS jatip

414: --Removed the union code by Bgowrava for Bug#6129650
415: )
416: and not exists (
417: select '1'
418: from JAI_AP_TDS_INV_PAYMENTS jatip
419: where jatip.invoice_id = aia.invoice_id
420: and jatip.prepay_invoice_id = aida_prepayment.invoice_id ) --Added by nprashar for Bug # 6774129
421: having sum(aida.amount) <> 0 -- Added by nprashar for Bug # 6774129
422: group by

Line 468: from jai_ap_tds_inv_payments

464: and aipa.invoice_id = pn_invoice_id;
465:
466: cursor c_get_total_tax_basis ( cp_invoice_id number) is /*Added by nprashar for Bug # 6774129*/
467: select sum(nvl(taxable_basis,0))
468: from jai_ap_tds_inv_payments
469: where invoice_id = cp_invoice_id;
470:
471: /* START, Bgowrava for Bug#6069891*/
472:

Line 475: FROM jai_ap_tds_inv_payments jatp

471: /* START, Bgowrava for Bug#6069891*/
472:
473: CURSOR c_tds_multiple_payments IS
474: SELECT jatp.*
475: FROM jai_ap_tds_inv_payments jatp
476: WHERE (jatp.invoice_id , jatp.taxable_basis,
477: jatp.tax_amount, jatp.tds_tax_id ) IN
478: (SELECT invoice_id, taxable_basis, tax_amount , tds_tax_id
479: FROM jai_ap_tds_inv_payments

Line 479: FROM jai_ap_tds_inv_payments

475: FROM jai_ap_tds_inv_payments jatp
476: WHERE (jatp.invoice_id , jatp.taxable_basis,
477: jatp.tax_amount, jatp.tds_tax_id ) IN
478: (SELECT invoice_id, taxable_basis, tax_amount , tds_tax_id
479: FROM jai_ap_tds_inv_payments
480: GROUP BY invoice_id, taxable_basis, tax_amount , tds_tax_id
481: having count(*) > 1
482: )
483: AND jatp.check_id NOT IN /* Filter out all voided and stop initiated checks*/

Line 553: delete JAI_AP_TDS_INV_PAYMENTS

549: if pv_regenerate_flag = lv_pv_regenerate_flag then
550:
551: /* Flush the check records that have been processed earlier but are not paid */
552: Fnd_File.put_line(Fnd_File.LOG, ' Flushing the data as regenration option is set to Yes');
553: delete JAI_AP_TDS_INV_PAYMENTS
554: where check_id in
555: (
556: select
557: aca.check_id check_id

Line 629: insert into JAI_AP_TDS_INV_PAYMENTS

625: if r_ap_invoices_all.cancelled_date is not null then
626: lv_parent_invoice_cancel_flag := 'Y';
627: end if;
628:
629: insert into JAI_AP_TDS_INV_PAYMENTS
630: (
631: tds_payment_id ,
632: check_id ,
633: check_amount ,

Line 665: jai_ap_tds_inv_payments_s.nextval ,

661: request_id
662: )
663: values
664: (
665: jai_ap_tds_inv_payments_s.nextval ,
666: cur_rec.check_id ,
667: cur_rec.check_amount ,
668: cur_rec.check_date ,
669: cur_rec.invoice_payment_id ,

Line 812: insert into JAI_AP_TDS_INV_PAYMENTS

808: close c_ap_invoices_all;
809: -- ended, Harshita for Bug 4643633
810:
811: << populate_old_invoice_details >>
812: insert into JAI_AP_TDS_INV_PAYMENTS
813: (
814: tds_payment_id ,
815: check_id ,
816: check_amount ,

Line 849: jai_ap_tds_inv_payments_s.nextval ,

845: request_id
846: )
847: values
848: (
849: jai_ap_tds_inv_payments_s.nextval ,
850: cur_rec.check_id ,
851: cur_rec.check_amount ,
852: cur_rec.check_date ,
853: cur_rec.invoice_payment_id ,

Line 1033: insert into JAI_AP_TDS_INV_PAYMENTS

1029: ln_tax_amount := cur_rec.prepaid_amount;
1030: ln_taxable_basis := ln_inv_tax_basis - ln_taxable_basis;
1031: -- End for bug 6774129
1032:
1033: insert into JAI_AP_TDS_INV_PAYMENTS
1034: (
1035: tds_payment_id ,
1036: check_id ,
1037: check_amount ,

Line 1071: jai_ap_tds_inv_payments_s.nextval ,

1067: request_id
1068: )
1069: values
1070: (
1071: jai_ap_tds_inv_payments_s.nextval ,
1072: r_get_payment_details.check_id ,
1073: r_get_payment_details.check_amount ,
1074: r_get_payment_details.check_date ,
1075: r_get_payment_details.invoice_payment_id ,

Line 1111: update jai_ap_tds_inv_payments

1107: -- bug 6774129. Added by Lakshmi Gopalsami
1108: -- Observation as part of QA.
1109: -- this will update the tax amount with the payment amount for
1110: -- all lines which has been paid by check.
1111: update jai_ap_tds_inv_payments
1112: set tax_amount = payment_amount
1113: where invoice_id = cur_rec.invoice_id
1114: and prepay_invoice_id is null
1115: and nvl(source,'ABC') <> 'Invoice paid by prepayment';

Line 1132: UPDATE jai_ap_tds_inv_payments jatp

1128: r_get_tds_inv_details(tab_index).taxable_basis := c_get_multiple_payments.taxable_basis;
1129: r_get_tds_inv_details(tab_index).invoice_id := c_get_multiple_payments.invoice_id;
1130: tab_index := tab_index + 1;
1131: END IF ;
1132: UPDATE jai_ap_tds_inv_payments jatp
1133: SET jatp.taxable_basis = round(jatp.taxable_basis * jatp.payment_amount / jatp.tax_amount,2)
1134: WHERE jatp.tds_payment_id = c_get_multiple_payments.tds_payment_id ;
1135: UPDATE jai_ap_tds_inv_payments jatp
1136: SET jatp.tax_amount = jatp.payment_amount

Line 1135: UPDATE jai_ap_tds_inv_payments jatp

1131: END IF ;
1132: UPDATE jai_ap_tds_inv_payments jatp
1133: SET jatp.taxable_basis = round(jatp.taxable_basis * jatp.payment_amount / jatp.tax_amount,2)
1134: WHERE jatp.tds_payment_id = c_get_multiple_payments.tds_payment_id ;
1135: UPDATE jai_ap_tds_inv_payments jatp
1136: SET jatp.tax_amount = jatp.payment_amount
1137: WHERE jatp.tds_payment_id = c_get_multiple_payments.tds_payment_id ;
1138: END LOOP ;
1139:

Line 1143: UPDATE jai_ap_tds_inv_payments jatp

1139:
1140: /* Round the taxable basis correct if not rounded properly. */
1141: FOR ind IN 1..tab_index - 1
1142: LOOP
1143: UPDATE jai_ap_tds_inv_payments jatp
1144: SET jatp.taxable_basis = jatp.taxable_basis +
1145: ( r_get_tds_inv_details(ind).taxable_basis -
1146: (SELECT sum(jatp1.taxable_basis)
1147: FROM jai_ap_tds_inv_payments jatp1

Line 1147: FROM jai_ap_tds_inv_payments jatp1

1143: UPDATE jai_ap_tds_inv_payments jatp
1144: SET jatp.taxable_basis = jatp.taxable_basis +
1145: ( r_get_tds_inv_details(ind).taxable_basis -
1146: (SELECT sum(jatp1.taxable_basis)
1147: FROM jai_ap_tds_inv_payments jatp1
1148: WHERE jatp1.invoice_id = r_get_tds_inv_details(ind).invoice_id
1149: AND jatp1.check_id NOT IN
1150: (SELECT check_id
1151: FROM ap_checks_all ac

Line 1163: Fnd_File.put_line(Fnd_File.LOG, 'No of records inserted into JAI_AP_TDS_INV_PAYMENTS : ' || to_char(ln_record_count));

1159: END LOOP ;
1160: /* END, Bgowrava for Bug#6069891*/
1161:
1162: <>
1163: Fnd_File.put_line(Fnd_File.LOG, 'No of records inserted into JAI_AP_TDS_INV_PAYMENTS : ' || to_char(ln_record_count));
1164: Fnd_File.put_line(Fnd_File.LOG, '** Successful End of procedure jai_ap_tds_processing_pkg.process_tds_payments **');
1165:
1166: return;
1167:

Line 1210: from jai_ap_tds_inv_payments

1206: pn_vendor_site_id number
1207: )
1208: is
1209: select distinct operating_unit_id operating_unit_id
1210: from jai_ap_tds_inv_payments
1211: where parent_invoice_id is not null
1212: and tds_tax_id is not null
1213: and tds_tax_rate is not null
1214: and invoice_date between pd_tds_payment_from_date and pd_tds_payment_to_date

Line 1242: from jai_ap_tds_inv_payments

1238: pn_operating_unit_id number
1239: )
1240: is
1241: select distinct invoice_date invoice_date
1242: from jai_ap_tds_inv_payments
1243: where parent_invoice_id is not null
1244: and tds_tax_id is not null
1245: and tds_tax_rate is not null
1246: and invoice_date between pd_tds_payment_from_date and pd_tds_payment_to_date

Line 1294: from jai_ap_tds_inv_payments /*Added by nprashar for bug 6774129*/

1290: --tds_tax_id,
1291: tds_section,
1292: tax_authority_id,
1293: parent_invoice_id
1294: from jai_ap_tds_inv_payments /*Added by nprashar for bug 6774129*/
1295: where parent_invoice_id is not null
1296: and tds_tax_id is not null
1297: and tds_tax_rate is not null
1298: and invoice_date between pd_tds_payment_from_date and pd_tds_payment_to_date

Line 1344: from jai_ap_tds_inv_payments

1340: vendor_site_id,
1341: /*tds_tax_id, commented by nprashar for Bug : 6774129*/
1342: tds_section,
1343: tax_authority_id
1344: from jai_ap_tds_inv_payments
1345: where parent_invoice_id is not null
1346: and tds_tax_id is not null
1347: and tds_tax_rate is not null
1348: and invoice_date between pd_tds_payment_from_date and pd_tds_payment_to_date

Line 1375: from jai_ap_tds_inv_payments

1371:
1372:
1373: cursor c_form16_cert_lines(cp_form16_hdr_id number) is
1374: select rowid row_id, parent_invoice_id, threshold_trx_id
1375: from jai_ap_tds_inv_payments
1376: where form16_hdr_id = cp_form16_hdr_id
1377: order by parent_invoice_id, invoice_id
1378: for update of certificate_line_num;
1379:

Line 1489: update jai_ap_tds_inv_payments

1485: close c_ja_in_tds_year_info;
1486:
1487: Fnd_File.put_line(Fnd_File.LOG, 'Updating ' || r_ja_in_tds_year_info.fin_year);
1488:
1489: update jai_ap_tds_inv_payments
1490: set fin_year = r_ja_in_tds_year_info.fin_year
1491: where parent_invoice_id is not null
1492: and tds_tax_id is not null
1493: and tds_tax_rate is not null

Line 1540: update jai_ap_tds_inv_payments /*changed by nprashar for bug 6774129 */

1536: open c_get_form16_hdr_id;
1537: fetch c_get_form16_hdr_id into ln_form16_hdr_id;
1538: close c_get_form16_hdr_id;
1539:
1540: update jai_ap_tds_inv_payments /*changed by nprashar for bug 6774129 */
1541: set form16_hdr_id = -1 * ln_form16_hdr_id
1542: , last_update_date = sysdate
1543: , last_update_login = ln_last_update_login
1544: where parent_invoice_id = cur_rec.parent_invoice_id

Line 1597: update jai_ap_tds_inv_payments

1593: open c_get_form16_hdr_id;
1594: fetch c_get_form16_hdr_id into ln_form16_hdr_id;
1595: close c_get_form16_hdr_id;
1596:
1597: update jai_ap_tds_inv_payments
1598: set form16_hdr_id = ln_form16_hdr_id
1599: , certificate_num = ln_certificate_num
1600: , last_update_date = sysdate
1601: , last_update_login = ln_last_update_login

Line 1753: update jai_ap_tds_inv_payments

1749: -- lv_prev_tds_event := lv_tds_event;
1750: /*bduvarag for Bug#5647725*/
1751: end if;
1752:
1753: update jai_ap_tds_inv_payments
1754: set certificate_line_num = ln_cert_line_num
1755: where current of c_form16_cert_lines;
1756:
1757: Fnd_File.put_line(Fnd_File.LOG, 'Line number / No of records for the line :'