DBA Data[Home] [Help]

APPS.JAI_AP_TDS_PREPAYMENTS_PKG dependencies on JAI_AP_TDS_PREPAYMENTS

Line 1: PACKAGE BODY jai_ap_tds_prepayments_pkg AS

1: PACKAGE BODY jai_ap_tds_prepayments_pkg AS
2: /* $Header: jai_ap_tds_ppay.plb 120.5.12010000.2 2008/09/15 12:51:25 lgopalsa ship $ */
3:
4: /* ----------------------------------------------------------------------------
5: FILENAME : jai_ap_tds_prepayemnts_pkg_b.sql

Line 120: jai_ap_tds_prepayments_pkg.allocate_prepayment

116: if p_prepay_amount < 0 then
117:
118: /* Event is APPLY of prepayment */
119:
120: jai_ap_tds_prepayments_pkg.allocate_prepayment
121: (
122: p_invoice_id => p_invoice_id ,
123: p_invoice_distribution_id => p_invoice_distribution_id ,
124: p_prepay_amount => p_prepay_amount ,

Line 134: jai_ap_tds_prepayments_pkg.populate_section_tax

130: if p_process_flag = 'E' then
131: goto exit_from_procedure;
132: end if;
133:
134: jai_ap_tds_prepayments_pkg.populate_section_tax
135: (
136: p_invoice_id => p_invoice_id ,
137: p_invoice_distribution_id => p_invoice_distribution_id ,
138: p_prepay_distribution_id => p_prepay_distribution_id ,

Line 149: jai_ap_tds_prepayments_pkg.process_tds_invoices

145: goto exit_from_procedure;
146: end if;
147:
148:
149: jai_ap_tds_prepayments_pkg.process_tds_invoices
150: (
151: p_invoice_id => p_invoice_id ,
152: p_invoice_distribution_id => p_invoice_distribution_id ,
153: p_prepay_distribution_id => p_prepay_distribution_id ,

Line 178: jai_ap_tds_prepayments_pkg.process_unapply

174: elsif p_prepay_amount > 0 then
175:
176: /* Event is UNAPPLY of prepayment */
177:
178: jai_ap_tds_prepayments_pkg.process_unapply
179: (
180: p_invoice_id => p_invoice_id ,
181: p_invoice_distribution_id => p_invoice_distribution_id ,
182: p_parent_distribution_id => p_parent_reversal_id ,

Line 249: from jai_ap_tds_prepayments

245: sum( decode(wct_applicable_flag, 'Y', application_amount*p_exchange_rate, 0) ) wct_taxable_basis,
246: sum( decode(wct_applicable_flag, 'Y', wct_application_amount, 0) ) wct_amount,
247: sum( decode(essi_applicable_flag, 'Y', application_amount*p_exchange_rate, 0) ) essi_taxable_basis,
248: sum( decode(essi_applicable_flag, 'Y', essi_application_amount, 0) ) essi_amount
249: from jai_ap_tds_prepayments
250: where invoice_id = p_invoice_id
251: and invoice_distribution_id_prepay = p_invoice_distribution_id;
252:
253: cursor c_tds_details_apply(p_invoice_id number, p_invoice_distribution_id number) is

Line 256: from jai_ap_tds_prepayments

252:
253: cursor c_tds_details_apply(p_invoice_id number, p_invoice_distribution_id number) is
254: select tds_threshold_grp_id,
255: tds_threshold_trx_id_apply
256: from jai_ap_tds_prepayments
257: where invoice_id = p_invoice_id
258: and invoice_distribution_id_prepay = p_invoice_distribution_id
259: and tds_threshold_grp_id is not null;
260:

Line 263: from jai_ap_tds_prepayments

259: and tds_threshold_grp_id is not null;
260:
261: cursor c_wct_details_apply(p_invoice_id number, p_invoice_distribution_id number) is
262: select wct_threshold_trx_id_apply
263: from jai_ap_tds_prepayments
264: where invoice_id = p_invoice_id
265: and invoice_distribution_id_prepay = p_invoice_distribution_id
266: and wct_threshold_trx_id_apply is not null;
267:

Line 270: from jai_ap_tds_prepayments

266: and wct_threshold_trx_id_apply is not null;
267:
268: cursor c_essi_details_apply(p_invoice_id number, p_invoice_distribution_id number) is
269: select essi_threshold_trx_id_apply
270: from jai_ap_tds_prepayments
271: where invoice_id = p_invoice_id
272: and invoice_distribution_id_prepay = p_invoice_distribution_id
273: and essi_threshold_trx_id_apply is not null;
274:

Line 282: from jai_ap_tds_prepayments

278: where set_of_books_id = cp_set_of_books_id;
279:
280: cursor c_get_tds_tax_id(p_invoice_id number, p_prepay_distribution_id number) is
281: select tds_tax_id_prepay
282: from jai_ap_tds_prepayments
283: where invoice_id = p_invoice_id
284: and invoice_distribution_id_prepay = p_prepay_distribution_id
285: and tds_tax_id_prepay is not null
286: and tds_applicable_flag = 'Y';

Line 290: from jai_ap_tds_prepayments

286: and tds_applicable_flag = 'Y';
287:
288: cursor c_get_wct_tax_id(p_invoice_id number, p_prepay_distribution_id number) is
289: select wct_tax_id_prepay
290: from jai_ap_tds_prepayments
291: where invoice_id = p_invoice_id
292: and invoice_distribution_id_prepay = p_prepay_distribution_id
293: and wct_tax_id_prepay is not null
294: and wct_applicable_flag = 'Y';

Line 298: from jai_ap_tds_prepayments

294: and wct_applicable_flag = 'Y';
295:
296: cursor c_get_essi_tax_id(p_invoice_id number, p_prepay_distribution_id number) is
297: select essi_tax_id_prepay
298: from jai_ap_tds_prepayments
299: where invoice_id = p_invoice_id
300: and invoice_distribution_id_prepay = p_prepay_distribution_id
301: and essi_tax_id_prepay is not null
302: and essi_applicable_flag = 'Y';

Line 443: update jai_ap_tds_prepayments

439: IF p_process_flag = 'E' THEN
440: goto exit_from_procedure;
441: END IF;
442:
443: update jai_ap_tds_prepayments
444: set tds_threshold_trx_id_unapply = ln_threshold_trx_id_tds
445: where invoice_id = p_invoice_id
446: and invoice_distribution_id_prepay = p_parent_distribution_id
447: and tds_threshold_trx_id_apply is not null

Line 509: update jai_ap_tds_prepayments

505: if p_process_flag = 'E' then
506: goto exit_from_procedure;
507: end if;
508:
509: update jai_ap_tds_prepayments
510: set wct_threshold_trx_id_unapply = ln_threshold_trx_id_wct
511: where invoice_id = p_invoice_id
512: and invoice_distribution_id_prepay = p_parent_distribution_id
513: and wct_threshold_trx_id_apply is not null

Line 573: update jai_ap_tds_prepayments

569: if p_process_flag = 'E' then
570: goto exit_from_procedure;
571: end if;
572:
573: update jai_ap_tds_prepayments
574: set essi_threshold_trx_id_unapply = ln_threshold_trx_id_essi
575: where invoice_id = p_invoice_id
576: and invoice_distribution_id_prepay = p_parent_distribution_id
577: and essi_threshold_trx_id_apply is not null

Line 591: update jai_ap_tds_prepayments

587: end if;
588: /* Unapply ESSI */
589:
590: /* update the unapply flag for all */
591: update jai_ap_tds_prepayments
592: set unapply_flag = 'Y'
593: where invoice_id = p_invoice_id
594: and invoice_distribution_id_prepay = p_parent_distribution_id;
595:

Line 647: from jai_ap_tds_prepayments

643: and section_type = cp_section_type;
644:
645: cursor c_get_amount_already_applied(p_invoice_distribution_id number) is
646: select sum(application_amount)
647: from jai_ap_tds_prepayments
648: where invoice_distribution_id = p_invoice_distribution_id
649: and nvl(unapply_flag, 'N') <> 'Y';
650:
651: ln_remaining_prepayment_amount number;

Line 687: /* Insert into jai_ap_tds_prepayments */

683: ln_application_amount := least(ln_remaining_prepayment_amount, ln_effective_available_amount);
684:
685: if ln_application_amount > 0 then
686:
687: /* Insert into jai_ap_tds_prepayments */
688: insert into jai_ap_tds_prepayments
689: (
690: tds_prepayment_id ,
691: invoice_id ,

Line 688: insert into jai_ap_tds_prepayments

684:
685: if ln_application_amount > 0 then
686:
687: /* Insert into jai_ap_tds_prepayments */
688: insert into jai_ap_tds_prepayments
689: (
690: tds_prepayment_id ,
691: invoice_id ,
692: invoice_distribution_id_prepay ,

Line 703: jai_ap_tds_prepayments_s.nextval ,

699: last_update_login
700: )
701: values
702: (
703: jai_ap_tds_prepayments_s.nextval ,
704: p_invoice_id ,
705: p_invoice_distribution_id ,
706: cur_si_distributions_rec.invoice_distribution_id ,
707: ln_application_amount ,

Line 767: cursor c_jai_ap_tds_prepayments(p_invoice_id number, p_invoice_distribution_id number) is

763: where invoice_id = p_invoice_id
764: and invoice_distribution_id = p_invoice_distribution_id;
765:
766:
767: cursor c_jai_ap_tds_prepayments(p_invoice_id number, p_invoice_distribution_id number) is
768: select tds_prepayment_id,
769: invoice_distribution_id
770: from jai_ap_tds_prepayments
771: where invoice_id = p_invoice_id

Line 770: from jai_ap_tds_prepayments

766:
767: cursor c_jai_ap_tds_prepayments(p_invoice_id number, p_invoice_distribution_id number) is
768: select tds_prepayment_id,
769: invoice_distribution_id
770: from jai_ap_tds_prepayments
771: where invoice_id = p_invoice_id
772: and invoice_distribution_id_prepay = p_invoice_distribution_id;
773:
774:

Line 786: lv_tds_section_code_prepay jai_ap_tds_prepayments.tds_section_code_prepay%type;

782:
783: lv_applicable_flag varchar2(1);
784: lv_is_si_validated_flag varchar2(1);
785:
786: lv_tds_section_code_prepay jai_ap_tds_prepayments.tds_section_code_prepay%type;
787: ln_tds_tax_id_prepay jai_ap_tds_prepayments.tds_tax_id_prepay%type;
788: ln_wct_tax_id_prepay jai_ap_tds_prepayments.wct_tax_id_prepay%type;
789: ln_essi_tax_id_prepay jai_ap_tds_prepayments.essi_tax_id_prepay%type;
790: lv_application_basis jai_ap_tds_prepayments.application_basis%type;

Line 787: ln_tds_tax_id_prepay jai_ap_tds_prepayments.tds_tax_id_prepay%type;

783: lv_applicable_flag varchar2(1);
784: lv_is_si_validated_flag varchar2(1);
785:
786: lv_tds_section_code_prepay jai_ap_tds_prepayments.tds_section_code_prepay%type;
787: ln_tds_tax_id_prepay jai_ap_tds_prepayments.tds_tax_id_prepay%type;
788: ln_wct_tax_id_prepay jai_ap_tds_prepayments.wct_tax_id_prepay%type;
789: ln_essi_tax_id_prepay jai_ap_tds_prepayments.essi_tax_id_prepay%type;
790: lv_application_basis jai_ap_tds_prepayments.application_basis%type;
791:

Line 788: ln_wct_tax_id_prepay jai_ap_tds_prepayments.wct_tax_id_prepay%type;

784: lv_is_si_validated_flag varchar2(1);
785:
786: lv_tds_section_code_prepay jai_ap_tds_prepayments.tds_section_code_prepay%type;
787: ln_tds_tax_id_prepay jai_ap_tds_prepayments.tds_tax_id_prepay%type;
788: ln_wct_tax_id_prepay jai_ap_tds_prepayments.wct_tax_id_prepay%type;
789: ln_essi_tax_id_prepay jai_ap_tds_prepayments.essi_tax_id_prepay%type;
790: lv_application_basis jai_ap_tds_prepayments.application_basis%type;
791:
792:

Line 789: ln_essi_tax_id_prepay jai_ap_tds_prepayments.essi_tax_id_prepay%type;

785:
786: lv_tds_section_code_prepay jai_ap_tds_prepayments.tds_section_code_prepay%type;
787: ln_tds_tax_id_prepay jai_ap_tds_prepayments.tds_tax_id_prepay%type;
788: ln_wct_tax_id_prepay jai_ap_tds_prepayments.wct_tax_id_prepay%type;
789: ln_essi_tax_id_prepay jai_ap_tds_prepayments.essi_tax_id_prepay%type;
790: lv_application_basis jai_ap_tds_prepayments.application_basis%type;
791:
792:
793: lv_tds_section_code_other jai_ap_tds_prepayments.tds_section_code_other%type;

Line 790: lv_application_basis jai_ap_tds_prepayments.application_basis%type;

786: lv_tds_section_code_prepay jai_ap_tds_prepayments.tds_section_code_prepay%type;
787: ln_tds_tax_id_prepay jai_ap_tds_prepayments.tds_tax_id_prepay%type;
788: ln_wct_tax_id_prepay jai_ap_tds_prepayments.wct_tax_id_prepay%type;
789: ln_essi_tax_id_prepay jai_ap_tds_prepayments.essi_tax_id_prepay%type;
790: lv_application_basis jai_ap_tds_prepayments.application_basis%type;
791:
792:
793: lv_tds_section_code_other jai_ap_tds_prepayments.tds_section_code_other%type;
794: ln_tds_tax_id_other jai_ap_tds_prepayments.tds_tax_id_other%type;

Line 793: lv_tds_section_code_other jai_ap_tds_prepayments.tds_section_code_other%type;

789: ln_essi_tax_id_prepay jai_ap_tds_prepayments.essi_tax_id_prepay%type;
790: lv_application_basis jai_ap_tds_prepayments.application_basis%type;
791:
792:
793: lv_tds_section_code_other jai_ap_tds_prepayments.tds_section_code_other%type;
794: ln_tds_tax_id_other jai_ap_tds_prepayments.tds_tax_id_other%type;
795: lv_tds_applicable_flag jai_ap_tds_prepayments.tds_applicable_flag%type;
796: ln_wct_tax_id_other jai_ap_tds_prepayments.wct_tax_id_other%type;
797: lv_wct_applicable_flag jai_ap_tds_prepayments.wct_applicable_flag%type;

Line 794: ln_tds_tax_id_other jai_ap_tds_prepayments.tds_tax_id_other%type;

790: lv_application_basis jai_ap_tds_prepayments.application_basis%type;
791:
792:
793: lv_tds_section_code_other jai_ap_tds_prepayments.tds_section_code_other%type;
794: ln_tds_tax_id_other jai_ap_tds_prepayments.tds_tax_id_other%type;
795: lv_tds_applicable_flag jai_ap_tds_prepayments.tds_applicable_flag%type;
796: ln_wct_tax_id_other jai_ap_tds_prepayments.wct_tax_id_other%type;
797: lv_wct_applicable_flag jai_ap_tds_prepayments.wct_applicable_flag%type;
798: ln_essi_tax_id_other jai_ap_tds_prepayments.essi_tax_id_other%type;

Line 795: lv_tds_applicable_flag jai_ap_tds_prepayments.tds_applicable_flag%type;

791:
792:
793: lv_tds_section_code_other jai_ap_tds_prepayments.tds_section_code_other%type;
794: ln_tds_tax_id_other jai_ap_tds_prepayments.tds_tax_id_other%type;
795: lv_tds_applicable_flag jai_ap_tds_prepayments.tds_applicable_flag%type;
796: ln_wct_tax_id_other jai_ap_tds_prepayments.wct_tax_id_other%type;
797: lv_wct_applicable_flag jai_ap_tds_prepayments.wct_applicable_flag%type;
798: ln_essi_tax_id_other jai_ap_tds_prepayments.essi_tax_id_other%type;
799: lv_essi_applicable_flag jai_ap_tds_prepayments.essi_applicable_flag%type;

Line 796: ln_wct_tax_id_other jai_ap_tds_prepayments.wct_tax_id_other%type;

792:
793: lv_tds_section_code_other jai_ap_tds_prepayments.tds_section_code_other%type;
794: ln_tds_tax_id_other jai_ap_tds_prepayments.tds_tax_id_other%type;
795: lv_tds_applicable_flag jai_ap_tds_prepayments.tds_applicable_flag%type;
796: ln_wct_tax_id_other jai_ap_tds_prepayments.wct_tax_id_other%type;
797: lv_wct_applicable_flag jai_ap_tds_prepayments.wct_applicable_flag%type;
798: ln_essi_tax_id_other jai_ap_tds_prepayments.essi_tax_id_other%type;
799: lv_essi_applicable_flag jai_ap_tds_prepayments.essi_applicable_flag%type;
800:

Line 797: lv_wct_applicable_flag jai_ap_tds_prepayments.wct_applicable_flag%type;

793: lv_tds_section_code_other jai_ap_tds_prepayments.tds_section_code_other%type;
794: ln_tds_tax_id_other jai_ap_tds_prepayments.tds_tax_id_other%type;
795: lv_tds_applicable_flag jai_ap_tds_prepayments.tds_applicable_flag%type;
796: ln_wct_tax_id_other jai_ap_tds_prepayments.wct_tax_id_other%type;
797: lv_wct_applicable_flag jai_ap_tds_prepayments.wct_applicable_flag%type;
798: ln_essi_tax_id_other jai_ap_tds_prepayments.essi_tax_id_other%type;
799: lv_essi_applicable_flag jai_ap_tds_prepayments.essi_applicable_flag%type;
800:
801:

Line 798: ln_essi_tax_id_other jai_ap_tds_prepayments.essi_tax_id_other%type;

794: ln_tds_tax_id_other jai_ap_tds_prepayments.tds_tax_id_other%type;
795: lv_tds_applicable_flag jai_ap_tds_prepayments.tds_applicable_flag%type;
796: ln_wct_tax_id_other jai_ap_tds_prepayments.wct_tax_id_other%type;
797: lv_wct_applicable_flag jai_ap_tds_prepayments.wct_applicable_flag%type;
798: ln_essi_tax_id_other jai_ap_tds_prepayments.essi_tax_id_other%type;
799: lv_essi_applicable_flag jai_ap_tds_prepayments.essi_applicable_flag%type;
800:
801:
802:

Line 799: lv_essi_applicable_flag jai_ap_tds_prepayments.essi_applicable_flag%type;

795: lv_tds_applicable_flag jai_ap_tds_prepayments.tds_applicable_flag%type;
796: ln_wct_tax_id_other jai_ap_tds_prepayments.wct_tax_id_other%type;
797: lv_wct_applicable_flag jai_ap_tds_prepayments.wct_applicable_flag%type;
798: ln_essi_tax_id_other jai_ap_tds_prepayments.essi_tax_id_other%type;
799: lv_essi_applicable_flag jai_ap_tds_prepayments.essi_applicable_flag%type;
800:
801:
802:
803:

Line 837: for cur_rec_pp_allocations in c_jai_ap_tds_prepayments(p_invoice_id, p_invoice_distribution_id) loop

833:
834:
835: /* Loop and get all the distribution is that has been been allocated for this prepayment and
836: get the tax details that is applicable on the allocated line */
837: for cur_rec_pp_allocations in c_jai_ap_tds_prepayments(p_invoice_id, p_invoice_distribution_id) loop
838:
839: for cur_rec in c_get_tax_details_si_inv_dist(p_invoice_id, cur_rec_pp_allocations.invoice_distribution_id) loop
840: -- Bug 4754213. Added by Lakshmi Gopalsami
841: if cur_rec.section_type = 'TDS_SECTION' then

Line 880: /* Update jai_ap_tds_prepayments */

876:
877: end loop; /* Cur rec */
878:
879:
880: /* Update jai_ap_tds_prepayments */
881: update jai_ap_tds_prepayments
882: set application_basis = lv_application_basis ,
883: tds_section_code_prepay = lv_tds_section_code_prepay ,
884: tds_section_code_other = lv_tds_section_code_other ,

Line 881: update jai_ap_tds_prepayments

877: end loop; /* Cur rec */
878:
879:
880: /* Update jai_ap_tds_prepayments */
881: update jai_ap_tds_prepayments
882: set application_basis = lv_application_basis ,
883: tds_section_code_prepay = lv_tds_section_code_prepay ,
884: tds_section_code_other = lv_tds_section_code_other ,
885: tds_tax_id_prepay = ln_tds_tax_id_prepay ,

Line 938: cursor c_jai_ap_tds_prepayments(p_invoice_id number, p_invoice_distribution_id number) is

934: select currency_code
935: from gl_sets_of_books
936: where set_of_books_id = cp_set_of_books_id;
937:
938: cursor c_jai_ap_tds_prepayments(p_invoice_id number, p_invoice_distribution_id number) is
939: select tds_prepayment_id,
940: application_amount,
941: application_basis,
942: decode(tds_applicable_flag, 'Y',

Line 951: from jai_ap_tds_prepayments

947: null) wct_tax_id,
948: decode(essi_applicable_flag, 'Y',
949: decode(application_basis, 'STANDARD INVOICE', essi_tax_id_other, essi_tax_id_prepay),
950: null) essi_tax_id
951: from jai_ap_tds_prepayments
952: where invoice_id = p_invoice_id
953: and invoice_distribution_id_prepay = p_invoice_distribution_id;
954:
955:

Line 997: from jai_ap_tds_prepayments

993: sum( decode(wct_applicable_flag, 'Y', application_amount*p_exchange_rate, 0) ) wct_taxable_basis,
994: sum( decode(wct_applicable_flag, 'Y', wct_application_amount, 0) ) wct_amount,
995: sum( decode(essi_applicable_flag, 'Y', application_amount*p_exchange_rate, 0) ) essi_taxable_basis,
996: sum( decode(essi_applicable_flag, 'Y', essi_application_amount, 0) ) essi_amount
997: from jai_ap_tds_prepayments
998: where invoice_id = p_invoice_id
999: and invoice_distribution_id_prepay = p_invoice_distribution_id;
1000:
1001: /* Bug 4522507. Added by Lakshmi Gopalsami */

Line 1012: from jai_ap_tds_prepayments jatp

1008: and section_type = 'TDS_SECTION';
1009:
1010: cursor c_get_amt_tds_inv_generated_si(p_invoice_id number, p_invoice_distribution_id number) is
1011: select sum(tds_application_amount)
1012: from jai_ap_tds_prepayments jatp
1013: where invoice_id = p_invoice_id
1014: and invoice_distribution_id_prepay = p_invoice_distribution_id
1015: and tds_applicable_flag = 'Y'
1016: and exists (select '1'

Line 1049: lv_application_basis jai_ap_tds_prepayments.application_basis%type;

1045: lb_result boolean;
1046: ln_req_id number;
1047: ln_pp_section_tax_id number;
1048: ln_threshold_grp_audit_id number;
1049: lv_application_basis jai_ap_tds_prepayments.application_basis%type;
1050: /* Bug 4522507. Added by Lakshmi Gopalsami */
1051: ln_threshold_trx_id_prepay jai_ap_tds_inv_taxes.threshold_trx_id%type;
1052: ln_amt_tds_inv_generated_si number;
1053: --Added the below 6 variables by Sanjikum for Bug#5131075(4718907)

Line 1083: for cur_rec in c_jai_ap_tds_prepayments(p_invoice_id, p_invoice_distribution_id)

1079:
1080: ln_prepayment_amount := -1 * p_prepay_amount * ln_exchange_rate;
1081:
1082: /* update the tax amount for the prepayements */
1083: for cur_rec in c_jai_ap_tds_prepayments(p_invoice_id, p_invoice_distribution_id)
1084: loop
1085:
1086: if lv_application_basis is null then
1087: lv_application_basis := cur_rec.application_basis;

Line 1118: update jai_ap_tds_prepayments

1114: END IF;
1115: -- End for bug 5722028
1116:
1117:
1118: update jai_ap_tds_prepayments
1119: set tds_application_amount = ln_tds_tmp_amt, -- Bug 5722028
1120: calc_tds_appln_amt = cur_rec.application_amount * ln_exchange_rate * (r_ja_in_tax_codes.tax_rate/100)
1121: where tds_prepayment_id = cur_rec.tds_prepayment_id;
1122:

Line 1157: update jai_ap_tds_prepayments

1153: END IF;
1154: */
1155: -- End for bug 5722028
1156:
1157: update jai_ap_tds_prepayments
1158: set wct_application_amount = ln_tds_tmp_amt, -- Bug 5722028
1159: calc_wct_appln_amt = cur_rec.application_amount * ln_exchange_rate * (r_ja_in_tax_codes.tax_rate/100)
1160: where tds_prepayment_id = cur_rec.tds_prepayment_id;
1161:

Line 1195: update jai_ap_tds_prepayments

1191: END IF;
1192: */
1193: -- End for bug 5722028
1194:
1195: update jai_ap_tds_prepayments
1196: set essi_application_amount = ln_tds_tmp_amt, --Bug 5722028
1197: calc_essi_appln_amt = cur_rec.application_amount * ln_exchange_rate * (r_ja_in_tax_codes.tax_rate/100)
1198: where tds_prepayment_id = cur_rec.tds_prepayment_id;
1199:

Line 1272: update jai_ap_tds_prepayments

1268: fetch c_jai_ap_tds_thhold_grps into ln_current_threshold_slab_id;
1269: close c_jai_ap_tds_thhold_grps;
1270: */
1271:
1272: update jai_ap_tds_prepayments
1273: set tds_threshold_grp_id = ln_threshold_grp_id
1274: where invoice_id = p_invoice_id
1275: and invoice_distribution_id_prepay = p_invoice_distribution_id
1276: and tds_applicable_flag = 'Y';

Line 1382: /* Update jai_ap_tds_prepayments with threshold_trx_id_apply*/

1378: IF p_process_flag = 'E' THEN
1379: goto exit_from_procedure;
1380: END IF;
1381:
1382: /* Update jai_ap_tds_prepayments with threshold_trx_id_apply*/
1383:
1384: update jai_ap_tds_prepayments
1385: set tds_threshold_trx_id_apply = ln_threshold_trx_id_tds
1386: where invoice_id = p_invoice_id

Line 1384: update jai_ap_tds_prepayments

1380: END IF;
1381:
1382: /* Update jai_ap_tds_prepayments with threshold_trx_id_apply*/
1383:
1384: update jai_ap_tds_prepayments
1385: set tds_threshold_trx_id_apply = ln_threshold_trx_id_tds
1386: where invoice_id = p_invoice_id
1387: and invoice_distribution_id_prepay = p_invoice_distribution_id
1388: and tds_applicable_flag = 'Y';

Line 1426: update jai_ap_tds_prepayments

1422: if p_process_flag = 'E' then
1423: goto exit_from_procedure;
1424: end if;
1425:
1426: update jai_ap_tds_prepayments
1427: set wct_threshold_trx_id_apply = ln_threshold_trx_id_wct
1428: where invoice_id = p_invoice_id
1429: and invoice_distribution_id_prepay = p_invoice_distribution_id
1430: and wct_applicable_flag = 'Y';

Line 1470: update jai_ap_tds_prepayments

1466: if p_process_flag = 'E' then
1467: goto exit_from_procedure;
1468: end if;
1469:
1470: update jai_ap_tds_prepayments
1471: set essi_threshold_trx_id_apply = ln_threshold_trx_id_essi
1472: where invoice_id = p_invoice_id
1473: and invoice_distribution_id_prepay = p_invoice_distribution_id
1474: and essi_applicable_flag = 'Y';

Line 1811: end jai_ap_tds_prepayments_pkg;

1807: end process_old_transaction;
1808:
1809: /* **************************************** process_old_transaction **************************************** */
1810:
1811: end jai_ap_tds_prepayments_pkg;