343: WHERE invoice_id = P_invoice_original
344: AND payment_num = P_payment_num_org;
345:
346: -- *********************************************************
347: -- Get the payment_date from ap_invoices (interest invoice)
348: -- *********************************************************
349: SELECT invoice_date
350: INTO l_check_date
351: FROM ap_invoices
347: -- Get the payment_date from ap_invoices (interest invoice)
348: -- *********************************************************
349: SELECT invoice_date
350: INTO l_check_date
351: FROM ap_invoices
352: WHERE invoice_id = P_invoice_related;
353:
354:
355: -- *********************************************************
370: -- Get the currency symbol
371: -- *********************************************************
372: SELECT fc.symbol
373: INTO l_currency_symbol
374: FROM ap_invoices ai, fnd_currencies_vl fc
375: WHERE ai.invoice_currency_code = fc.currency_code
376: AND ai.invoice_id = P_invoice_original;
377:
378: l_invoice_description := l_nls_interest || ' ' || to_char(l_invoice_days_late)
380: ELSE
381: l_invoice_description := 'Invalid Interest Type: ' || l_interest_type;
382: END IF;
383:
384: UPDATE ap_invoices
385: SET description = l_invoice_description
386: WHERE invoice_id = P_invoice_related;
387:
388: EXCEPTION