2400: and (status_type IS NULL OR
2401: status_type NOT IN (wip_constants.released,wip_constants.comp_chrg,
2402: wip_constants.cancelled, wip_constants.hold)))
2403: and not exists (select 1
2404: from org_acct_periods oap
2405: where oap.organization_id = wjsi.organization_id
2406: and trunc(INV_LE_TIMEZONE_PUB.GET_LE_DAY_FOR_INV_ORG(nvl(wjsi.date_released,sysdate), wjsi.organization_id))
2407: between oap.period_start_date and oap.schedule_close_date
2408: and oap.period_close_date is null)