688: goto exit_from_procedure;
689: end if;
690:
691: /* prepayment apply scenario for backward compatibility*/
692: update JAI_AP_TDS_INVOICES
693: set amt_reversed = nvl(amt_reversed, 0) - r_get_total_prepayment_tax.tds_amount,
694: amt_applied = nvl(amt_applied, 0) - abs(p_prepay_amount)
695: where invoice_id = p_invoice_id;
696: /* prepayment apply scenario for backward compatibility*/
954: where invoice_id = p_invoice_id
955: and invoice_distribution_id_prepay = p_parent_distribution_id;
956:
957: /* prepayment apply scenario for backward compatibility*/
958: update JAI_AP_TDS_INVOICES
959: set amt_reversed = nvl(amt_reversed, 0) - r_get_total_prepayment_tax.tds_amount_orig,
960: amt_applied = nvl(amt_applied, 0) - abs(p_prepay_amount)
961: where invoice_id = p_invoice_id;
962:
2197: end if ; /* IF ln_tot_tds_amt > 0 THEN */
2198: /*Bug 8431516 - End*/
2199:
2200: /* prepayment apply scenario for backward compatibility*/
2201: update JAI_AP_TDS_INVOICES
2202: set amt_reversed = nvl(amt_reversed, 0) + r_get_total_prepayment_tax.tds_amount,
2203: amt_applied = nvl(amt_applied, 0) + abs(p_prepay_amount)
2204: where invoice_id = p_invoice_id;
2205:
2370: is
2371:
2372: cursor c_tds_count(p_invoice_id number, p_source_attribute varchar2) is
2373: select count(1)
2374: from JAI_AP_TDS_INVOICES
2375: where invoice_id = p_invoice_id
2376: and source_attribute = p_source_attribute;
2377:
2378: /* Following cursor definition has been changed to cater for the obsoletion of table ja_in_ap_tds_inv_temp */