2936: -- Bug # 2743382
2937:
2938: SELECT negative_inv_receipt_code
2939: INTO l_neg_inv_rcpt_code --Negative Balance 1:Allowed 2:Disallowed
2940: FROM mtl_parameters
2941: WHERE organization_id = l_org_id;
2942:
2943: --4870490
2944: l_allow_neg_onhand_prof_val := NVL(FND_PROFILE.VALUE('INV_ALLOW_CC_TXNS_ONHAND_NEG'),2);
4981: BEGIN
4982: SELECT NVL ( ccicv.item_cost, 0 )
4983: INTO l_item_cost
4984: FROM cst_cg_item_costs_view ccicv,
4985: mtl_parameters mp
4986: WHERE l_locator_id IS NULL
4987: AND ccicv.organization_id = in_org_id
4988: AND ccicv.inventory_item_id = in_item_id
4989: AND ccicv.organization_id = mp.organization_id
5002: UNION ALL
5003: SELECT NVL ( ccicv.item_cost, 0 )
5004: FROM mtl_item_locations mil,
5005: cst_cg_item_costs_view ccicv,
5006: mtl_parameters mp
5007: WHERE l_locator_id IS NOT NULL
5008: AND mil.organization_id = in_org_id
5009: AND mil.inventory_location_id = l_locator_id
5010: AND mil.project_id IS NULL
5027: SELECT NVL ( ccicv.item_cost, 0 )
5028: FROM mtl_item_locations mil,
5029: mrp_project_parameters mrp,
5030: cst_cg_item_costs_view ccicv,
5031: mtl_parameters mp
5032: WHERE l_locator_id IS NOT NULL
5033: AND mil.organization_id = in_org_id
5034: AND mil.inventory_location_id = l_locator_id
5035: AND mil.project_id IS NOT NULL
6117: ELSE
6118: IF ( l_org_id IS NOT NULL ) THEN
6119: SELECT SERIAL_NUMBER_TYPE
6120: INTO l_serial_number_type
6121: FROM MTL_PARAMETERS
6122: WHERE ORGANIZATION_ID = l_org_id;
6123: END IF;
6124:
6125: IF ( l_debug = 1 ) THEN
6489: -- Bug # 2743382
6490:
6491: SELECT negative_inv_receipt_code
6492: INTO l_neg_inv_rcpt_code --Negative Balance 1:Allowed 2:Disallowed
6493: FROM mtl_parameters
6494: WHERE organization_id = l_org_id;
6495:
6496: --4870490
6497: l_allow_neg_onhand_prof_val := NVL(FND_PROFILE.VALUE('INV_ALLOW_CC_TXNS_ONHAND_NEG'),2);
7716: -- If there is no default at the sub level, get it at the org level
7717: IF ( l_default_cost_group_id IS NULL ) THEN
7718: SELECT NVL ( default_cost_group_id, -999 )
7719: INTO l_default_cost_group_id
7720: FROM mtl_parameters
7721: WHERE organization_id = p_organization_id;
7722: END IF;
7723:
7724: -- Set the out parameters