[Home] [Help]
110: )
111: is
112: begin
113:
114: p_codepath := jai_general_pkg.plot_codepath(1, p_codepath, 'jai_ap_tds_prepayemnts_pkg.process_prepayment', 'START'); /* 1 */
115:
116: if p_prepay_amount < 0 then
117:
118: /* Event is APPLY of prepayment */
203: end if;
204:
205:
206: << exit_from_procedure >>
207: p_codepath := jai_general_pkg.plot_codepath(100, p_codepath, null, 'END'); /* 100 */
208: return;
209:
210: exception
211: when others then
326: lv_invoice_num_to_tds_apply ap_invoices_all.invoice_num%type;
327: lv_invoice_num_to_vendor_apply ap_invoices_all.invoice_num%type;
328:
329: begin
330: p_codepath := jai_general_pkg.plot_codepath(1, p_codepath, 'jai_ap_tds_prepayemnts_pkg.process_unapply', 'START'); /* 1 */
331:
332: open c_gl_sets_of_books(p_set_of_books_id);
333: fetch c_gl_sets_of_books into r_gl_sets_of_books;
334: close c_gl_sets_of_books;
334: close c_gl_sets_of_books;
335:
336: if r_gl_sets_of_books.currency_code <> p_invoice_currency_code then
337: /* Foreign currency invoice */
338: p_codepath := jai_general_pkg.plot_codepath(2, p_codepath); /* 2 */
339: ln_exchange_rate := p_exchange_rate;
340: end if;
341:
342: ln_exchange_rate := nvl(ln_exchange_rate, 1);
611:
612: end if;
613:
614: << exit_from_procedure >>
615: p_codepath := jai_general_pkg.plot_codepath(100, p_codepath, null, 'END'); /* 100 */
616: return;
617:
618: exception
619: when others then
655:
656:
657: begin
658:
659: p_codepath := jai_general_pkg.plot_codepath(1, p_codepath, 'jai_ap_tds_prepayemnts_pkg.allocate_prepayment', 'START'); /* 1 */
660:
661: ln_remaining_prepayment_amount := abs(p_prepay_amount); /* Apply amount is negative */
662:
663: /* Loop through to get the taxable basis for each line in jai_ap_tds_inv_taxes */
723: end loop; /* cur_si_distributions_rec in c_jai_ap_tds_inv_taxes */
724:
725:
726: << exit_from_procedure >>
727: p_codepath := jai_general_pkg.plot_codepath(100, p_codepath, null, 'END'); /* 100 */
728: return;
729:
730: exception
731: when others then
802:
803:
804: begin
805:
806: p_codepath := jai_general_pkg.plot_codepath(1, p_codepath, 'jai_ap_tds_prepayemnts_pkg.populate_section_tax', 'START'); /* 1 */
807:
808: /* Get the tds_application_basis :
809: This will be STANDARD INVOICE if the SI has already been validated, else it will be PREPAYMENT */
810: open c_get_tds_application_basis(p_invoice_id);
897: end loop; /* cur_rec_pp_allocations */
898:
899:
900: << exit_from_procedure >>
901: p_codepath := jai_general_pkg.plot_codepath(100, p_codepath, null, 'END'); /* 100 */
902: return;
903:
904: exception
905: when others then
1062: ln_tds_tmp_amt number;
1063:
1064: begin
1065:
1066: p_codepath := jai_general_pkg.plot_codepath(1, p_codepath, 'jai_ap_tds_prepayemnts_pkg.process_tds_invoices', 'START'); /* 1 */
1067:
1068: open c_gl_sets_of_books(p_set_of_books_id);
1069: fetch c_gl_sets_of_books into r_gl_sets_of_books;
1070: close c_gl_sets_of_books;
1070: close c_gl_sets_of_books;
1071:
1072: if r_gl_sets_of_books.currency_code <> p_invoice_currency_code then
1073: /* Foreign currency invoice */
1074: p_codepath := jai_general_pkg.plot_codepath(6.1, p_codepath); /* 6.1 */
1075: ln_exchange_rate := p_exchange_rate;
1076: end if;
1077:
1078: ln_exchange_rate := nvl(ln_exchange_rate, 1);
1530:
1531: end if;
1532:
1533: << exit_from_procedure >>
1534: p_codepath := jai_general_pkg.plot_codepath(100, p_codepath, null, 'END'); /* 100 */
1535: return;
1536:
1537: exception
1538: when others then