269: | Step 4. If invoice is a credited invoice return FALSE |
270: +-----------------------------------------------------------------*/
271: l_debug_info := 'Check if invoice is a credited invoice';
272:
273: l_credited_inv_flag := AP_INVOICES_UTILITY_PKG.Is_Inv_Credit_Referenced(
274: P_invoice_id);
275:
276: IF (l_credited_inv_flag <> FALSE ) THEN
277: P_error_code := 'AP_INV_IS_CREDITED_INV';
286:
287: l_debug_info := 'Check if invoices have been applied against this invoice';
288:
289: l_prepay_applied_flag :=
290: AP_INVOICES_UTILITY_PKG.get_prepayments_applied_flag(P_invoice_id);
291:
292: IF (nvl(l_prepay_applied_flag,'N') = 'Y') THEN
293: P_error_code := 'AP_INV_PP_NO_CANCEL';
294: P_debug_info := l_debug_info;