288: -- Get the number of holds for the invoice
289: --
290: SELECT count(*)
291: INTO invoice_holds
292: FROM ap_holds_all
293: WHERE invoice_id = p_invoice_id
294: AND release_lookup_code is NULL;
295:
296: ---------------------------------------------------------------------
300: -- status should be NEEDS REAPPROVAL.
301: --
302: SELECT count(*)
303: INTO dist_var_hold
304: FROM ap_holds_all
305: WHERE invoice_id = p_invoice_id
306: AND hold_lookup_code = 'DIST VARIANCE'
307: AND release_lookup_code is NULL;
308: