985: inv_mwb_query_manager.add_group_clause('moqd.cost_group_id', 'ONHAND');
986:
987: -- Onhand Material Status Support
988: -- For serial controlled items, the status_id will be populated in post_query of IMVMWQMB.
989: if (inv_cache.set_org_rec(inv_mwb_globals.g_tree_organization_id)) then
990: l_default_status_id := inv_cache.org_rec.default_status_id;
991: end if;
992:
993: if inv_cache.set_item_rec(inv_mwb_globals.g_tree_organization_id, inv_mwb_globals.g_tree_item_id) then
986:
987: -- Onhand Material Status Support
988: -- For serial controlled items, the status_id will be populated in post_query of IMVMWQMB.
989: if (inv_cache.set_org_rec(inv_mwb_globals.g_tree_organization_id)) then
990: l_default_status_id := inv_cache.org_rec.default_status_id;
991: end if;
992:
993: if inv_cache.set_item_rec(inv_mwb_globals.g_tree_organization_id, inv_mwb_globals.g_tree_item_id) then
994: if (inv_cache.item_rec.serial_number_control_code in (2,5)) then
989: if (inv_cache.set_org_rec(inv_mwb_globals.g_tree_organization_id)) then
990: l_default_status_id := inv_cache.org_rec.default_status_id;
991: end if;
992:
993: if inv_cache.set_item_rec(inv_mwb_globals.g_tree_organization_id, inv_mwb_globals.g_tree_item_id) then
994: if (inv_cache.item_rec.serial_number_control_code in (2,5)) then
995: l_serial_controlled := 1; -- Item is serial controlled
996: end if;
997:
990: l_default_status_id := inv_cache.org_rec.default_status_id;
991: end if;
992:
993: if inv_cache.set_item_rec(inv_mwb_globals.g_tree_organization_id, inv_mwb_globals.g_tree_item_id) then
994: if (inv_cache.item_rec.serial_number_control_code in (2,5)) then
995: l_serial_controlled := 1; -- Item is serial controlled
996: end if;
997:
998: if (inv_cache.item_rec.lot_control_code <> 1) then
994: if (inv_cache.item_rec.serial_number_control_code in (2,5)) then
995: l_serial_controlled := 1; -- Item is serial controlled
996: end if;
997:
998: if (inv_cache.item_rec.lot_control_code <> 1) then
999: l_lot_controlled := 1; -- Item is lot controlled
1000: end if;
1001: end if;
1002:
1546: inv_mwb_query_manager.add_group_clause('moqd.revision', 'ONHAND');
1547:
1548: -- Onhand Material Status Support
1549: -- For serial controlled items, the status_id will be populated in post_query of IMVMWQMB.
1550: if (inv_cache.set_org_rec(inv_mwb_globals.g_tree_organization_id)) then
1551: l_default_status_id := inv_cache.org_rec.default_status_id;
1552: end if;
1553:
1554: if inv_cache.set_item_rec(inv_mwb_globals.g_tree_organization_id, inv_mwb_globals.g_tree_item_id) then
1547:
1548: -- Onhand Material Status Support
1549: -- For serial controlled items, the status_id will be populated in post_query of IMVMWQMB.
1550: if (inv_cache.set_org_rec(inv_mwb_globals.g_tree_organization_id)) then
1551: l_default_status_id := inv_cache.org_rec.default_status_id;
1552: end if;
1553:
1554: if inv_cache.set_item_rec(inv_mwb_globals.g_tree_organization_id, inv_mwb_globals.g_tree_item_id) then
1555: if (inv_cache.item_rec.serial_number_control_code in (2,5)) then
1550: if (inv_cache.set_org_rec(inv_mwb_globals.g_tree_organization_id)) then
1551: l_default_status_id := inv_cache.org_rec.default_status_id;
1552: end if;
1553:
1554: if inv_cache.set_item_rec(inv_mwb_globals.g_tree_organization_id, inv_mwb_globals.g_tree_item_id) then
1555: if (inv_cache.item_rec.serial_number_control_code in (2,5)) then
1556: l_serial_controlled := 1; -- Item is serial controlled
1557: end if;
1558:
1551: l_default_status_id := inv_cache.org_rec.default_status_id;
1552: end if;
1553:
1554: if inv_cache.set_item_rec(inv_mwb_globals.g_tree_organization_id, inv_mwb_globals.g_tree_item_id) then
1555: if (inv_cache.item_rec.serial_number_control_code in (2,5)) then
1556: l_serial_controlled := 1; -- Item is serial controlled
1557: end if;
1558:
1559: if (inv_cache.item_rec.lot_control_code <> 1) then
1555: if (inv_cache.item_rec.serial_number_control_code in (2,5)) then
1556: l_serial_controlled := 1; -- Item is serial controlled
1557: end if;
1558:
1559: if (inv_cache.item_rec.lot_control_code <> 1) then
1560: l_lot_controlled := 1; -- Item is lot controlled
1561: end if;
1562: end if;
1563:
1965: -- For serial controlled items, the status_id will be populated in post_query of IMVMWQMB.
1966:
1967: inv_mwb_globals.print_msg(g_pkg_name, l_procedure_name, 'org id' ||inv_mwb_globals.g_tree_organization_id );
1968:
1969: if (inv_cache.set_org_rec(inv_mwb_globals.g_tree_organization_id)) then
1970: l_default_status_id := inv_cache.org_rec.default_status_id;
1971: end if;
1972:
1973: inv_mwb_globals.print_msg(g_pkg_name, l_procedure_name, 'org status id' || l_default_status_id);
1966:
1967: inv_mwb_globals.print_msg(g_pkg_name, l_procedure_name, 'org id' ||inv_mwb_globals.g_tree_organization_id );
1968:
1969: if (inv_cache.set_org_rec(inv_mwb_globals.g_tree_organization_id)) then
1970: l_default_status_id := inv_cache.org_rec.default_status_id;
1971: end if;
1972:
1973: inv_mwb_globals.print_msg(g_pkg_name, l_procedure_name, 'org status id' || l_default_status_id);
1974:
1971: end if;
1972:
1973: inv_mwb_globals.print_msg(g_pkg_name, l_procedure_name, 'org status id' || l_default_status_id);
1974:
1975: if inv_cache.set_item_rec(inv_mwb_globals.g_tree_organization_id, inv_mwb_globals.g_tree_item_id) then
1976: if (inv_cache.item_rec.serial_number_control_code in (2,5)) then
1977: l_serial_controlled := 1; -- Item is serial controlled
1978: end if;
1979: end if;
1972:
1973: inv_mwb_globals.print_msg(g_pkg_name, l_procedure_name, 'org status id' || l_default_status_id);
1974:
1975: if inv_cache.set_item_rec(inv_mwb_globals.g_tree_organization_id, inv_mwb_globals.g_tree_item_id) then
1976: if (inv_cache.item_rec.serial_number_control_code in (2,5)) then
1977: l_serial_controlled := 1; -- Item is serial controlled
1978: end if;
1979: end if;
1980: