[Home] [Help]
806: safety.period_start_date old_date,
807: sum(safety.safety_stock_quantity) new_quantity,
808: safety.organization_id old_quantity,
809: sum(safety.achieved_days_of_supply) dos,
810: sum(safety.safety_stock_quantity * item.standard_cost) cost
811: FROM msc_safety_stocks safety,
812: msc_form_query list ,
813: msc_system_items item
814: WHERE safety.period_start_date <= last_date
844: safety.period_start_date old_date,
845: sum(safety.TARGET_SAFETY_STOCK) new_quantity,
846: sum(safety.TOTAL_UNPOOLED_SAFETY_STOCK) old_quantity,
847: sum(safety.target_days_of_supply) dos,
848: sum(safety.TARGET_SAFETY_STOCK * item.standard_cost) cost
849: FROM msc_safety_stocks safety,
850: msc_form_query list ,
851: msc_system_items item
852: WHERE safety.period_start_date <= last_date
881: safety.period_start_date old_date,
882: sum(safety.USER_DEFINED_SAFETY_STOCKS) new_quantity,
883: sum(0) old_quantity,
884: sum(safety.user_defined_dos) dos,
885: sum(safety.USER_DEFINED_SAFETY_STOCKS * item.standard_cost) cost
886: FROM msc_safety_stocks safety,
887: msc_form_query list,
888: msc_system_items item
889: WHERE safety.period_start_date <= last_date
1084: WHERE list.query_id = item_list_id
1085: ORDER BY
1086: 1, 2, 6, 4;
1087:
1088: cursor standard_cost (p_inventory_item_id number,
1089: p_sr_instance_id number,
1090: p_organization_id number,
1091: p_plan_id number) is
1092: select nvl(standard_cost,0)
1088: cursor standard_cost (p_inventory_item_id number,
1089: p_sr_instance_id number,
1090: p_organization_id number,
1091: p_plan_id number) is
1092: select nvl(standard_cost,0)
1093: from msc_system_items
1094: where inventory_item_id=p_inventory_item_id
1095: and organization_id =p_organization_id
1096: and sr_instance_id =p_sr_instance_id
2674: -- else
2675: -- add_to_plan(bucket_counter -1,
2676: -- uss_off,
2677: -- activity_rec.new_quantity);
2678: -- open standard_cost(
2679: -- last_item_id,
2680: -- last_inst_id,
2681: -- last_org_id,
2682: -- arg_plan_id);
2679: -- last_item_id,
2680: -- last_inst_id,
2681: -- last_org_id,
2682: -- arg_plan_id);
2683: -- fetch standard_cost into l_standard_cost;
2684: -- close standard_cost;
2685: -- add_to_plan(bucket_counter-1,
2686: -- USS_val_OFF,
2687: -- activity_rec.new_quantity*l_standard_cost);
2680: -- last_inst_id,
2681: -- last_org_id,
2682: -- arg_plan_id);
2683: -- fetch standard_cost into l_standard_cost;
2684: -- close standard_cost;
2685: -- add_to_plan(bucket_counter-1,
2686: -- USS_val_OFF,
2687: -- activity_rec.new_quantity*l_standard_cost);
2688: --
2683: -- fetch standard_cost into l_standard_cost;
2684: -- close standard_cost;
2685: -- add_to_plan(bucket_counter-1,
2686: -- USS_val_OFF,
2687: -- activity_rec.new_quantity*l_standard_cost);
2688: --
2689: -- end if;
2690: end if;
2691: END IF;
3439:
3440: -- for capacity statement we always has
3441: -- to check the ASL of ATO model
3442:
3443: -- if a user selects a standard item then
3444: -- capacity_item_id will contain the standard item
3445: -- and req_item_id will contain the standard item
3446: -- else if a user selects a model / config item
3447: -- capacity_item_id will contain the base model
3440: -- for capacity statement we always has
3441: -- to check the ASL of ATO model
3442:
3443: -- if a user selects a standard item then
3444: -- capacity_item_id will contain the standard item
3445: -- and req_item_id will contain the standard item
3446: -- else if a user selects a model / config item
3447: -- capacity_item_id will contain the base model
3448: -- req_item_id will contain all the configs and model to
3441: -- to check the ASL of ATO model
3442:
3443: -- if a user selects a standard item then
3444: -- capacity_item_id will contain the standard item
3445: -- and req_item_id will contain the standard item
3446: -- else if a user selects a model / config item
3447: -- capacity_item_id will contain the base model
3448: -- req_item_id will contain all the configs and model to
3449: -- query requirements.