415: IF (l_scale_type = 1) THEN
416: l_item_qty := l_item_qty * l_output_ratio;
417: IF (l_line_um <> get_rec.detail_uom) THEN
418:
419: -- NPD Conv. Changed the call to INV_CONVERT.inv_um_convert from gmicuom.uom_conversion
420:
421: l_item_qty := INV_CONVERT.inv_um_convert(item_id => get_rec.inventory_item_id
422: ,precision => 5
423: ,from_quantity => l_item_qty
417: IF (l_line_um <> get_rec.detail_uom) THEN
418:
419: -- NPD Conv. Changed the call to INV_CONVERT.inv_um_convert from gmicuom.uom_conversion
420:
421: l_item_qty := INV_CONVERT.inv_um_convert(item_id => get_rec.inventory_item_id
422: ,precision => 5
423: ,from_quantity => l_item_qty
424: ,from_unit => l_line_um
425: ,to_unit => get_rec.detail_uom
461: FETCH cur_item_uom INTO l_item_uom;
462: CLOSE cur_item_uom;
463:
464: IF (p_uom <> l_item_uom) THEN
465: -- NPD Conv. Changed the call to INV_CONVERT.inv_um_convert from gmicuom.uom_conversion
466: l_quantity := ROUND(gmicuom.uom_conversion(p_item_id,0,p_product_qty, p_uom, l_item_uom, 0),9);
467:
468: l_quantity := INV_CONVERT.inv_um_convert(item_id => p_item_id
469: ,precision => 5
464: IF (p_uom <> l_item_uom) THEN
465: -- NPD Conv. Changed the call to INV_CONVERT.inv_um_convert from gmicuom.uom_conversion
466: l_quantity := ROUND(gmicuom.uom_conversion(p_item_id,0,p_product_qty, p_uom, l_item_uom, 0),9);
467:
468: l_quantity := INV_CONVERT.inv_um_convert(item_id => p_item_id
469: ,precision => 5
470: ,from_quantity => p_product_qty
471: ,from_unit => p_uom
472: ,to_unit => l_item_uom
571: /* Bug No.8643350 - END */
572:
573: IF p_product_qty IS NOT NULL THEN -- Add Check to see if Prod Qty. is passed as NULL
574: -- check uom conversion here
575: -- NPD Conv. Changed the call to INV_CONVERT.inv_um_convert from gmicuom.uom_conversion
576: l_quantity := INV_CONVERT.inv_um_convert(item_id => p_item_id
577: ,precision => 5
578: ,from_quantity => p_product_qty
579: ,from_unit => p_uom
572:
573: IF p_product_qty IS NOT NULL THEN -- Add Check to see if Prod Qty. is passed as NULL
574: -- check uom conversion here
575: -- NPD Conv. Changed the call to INV_CONVERT.inv_um_convert from gmicuom.uom_conversion
576: l_quantity := INV_CONVERT.inv_um_convert(item_id => p_item_id
577: ,precision => 5
578: ,from_quantity => p_product_qty
579: ,from_unit => p_uom
580: ,to_unit => l_item_uom
586: ELSE
587: -- NPD Conv. Commented out below logic as ic_plnt_inv table is obsolete after conv.
588: /* Bug No.8643350 - Start */
589: IF (l_prod_uom <> l_item_uom) THEN
590: l_quantity := INV_CONVERT.inv_um_convert(item_id => l_prod_id
591: ,precision => 5
592: ,from_quantity => l_form_qty
593: ,from_unit => l_prod_uom
594: ,to_unit => l_item_uom
817: LOOP
818: IF (get_rec.scale_type = 0) THEN
819: IF (get_rec.detail_uom <> p_yield_um) THEN
820:
821: -- NPD Conv. Changed the call to INV_CONVERT.inv_um_convert from gmicuom.uom_conversion
822: l_conv_qty := INV_CONVERT.inv_um_convert(item_id => get_rec.inventory_item_id
823: ,precision => 5
824: ,from_quantity => get_rec.qty
825: ,from_unit => get_rec.detail_uom
818: IF (get_rec.scale_type = 0) THEN
819: IF (get_rec.detail_uom <> p_yield_um) THEN
820:
821: -- NPD Conv. Changed the call to INV_CONVERT.inv_um_convert from gmicuom.uom_conversion
822: l_conv_qty := INV_CONVERT.inv_um_convert(item_id => get_rec.inventory_item_id
823: ,precision => 5
824: ,from_quantity => get_rec.qty
825: ,from_unit => get_rec.detail_uom
826: ,to_unit => p_yield_um
888: --Get sum of products in yield UM.
889: FOR get_rec IN Cur_get_details(1)
890: LOOP
891: IF (get_rec.detail_uom <> p_yield_um) THEN
892: -- NPD Conv. Changed the call to INV_CONVERT.inv_um_convert from gmicuom.uom_conversion
893: l_conv_qty := INV_CONVERT.inv_um_convert(item_id => get_rec.inventory_item_id
894: ,precision => 5
895: ,from_quantity => get_rec.qty
896: ,from_unit => get_rec.detail_uom
889: FOR get_rec IN Cur_get_details(1)
890: LOOP
891: IF (get_rec.detail_uom <> p_yield_um) THEN
892: -- NPD Conv. Changed the call to INV_CONVERT.inv_um_convert from gmicuom.uom_conversion
893: l_conv_qty := INV_CONVERT.inv_um_convert(item_id => get_rec.inventory_item_id
894: ,precision => 5
895: ,from_quantity => get_rec.qty
896: ,from_unit => get_rec.detail_uom
897: ,to_unit => p_yield_um
912: FOR get_rec IN Cur_get_details(-1)
913: LOOP
914: IF (get_rec.contribute_yield_ind = 'Y') THEN
915: IF (get_rec.detail_uom <> p_yield_um) THEN
916: -- NPD Conv. Changed the call to INV_CONVERT.inv_um_convert from gmicuom.uom_conversion
917: l_conv_qty := INV_CONVERT.inv_um_convert(item_id => get_rec.inventory_item_id
918: ,precision => 5
919: ,from_quantity => get_rec.qty
920: ,from_unit => get_rec.detail_uom
913: LOOP
914: IF (get_rec.contribute_yield_ind = 'Y') THEN
915: IF (get_rec.detail_uom <> p_yield_um) THEN
916: -- NPD Conv. Changed the call to INV_CONVERT.inv_um_convert from gmicuom.uom_conversion
917: l_conv_qty := INV_CONVERT.inv_um_convert(item_id => get_rec.inventory_item_id
918: ,precision => 5
919: ,from_quantity => get_rec.qty
920: ,from_unit => get_rec.detail_uom
921: ,to_unit => p_yield_um
989: FOR get_rec IN Cur_get_ingreds LOOP
990: IF (get_rec.scale_type = 0) THEN
991: IF (get_rec.detail_uom <> p_yield_um) THEN
992:
993: -- NPD Conv. Changed the call to INV_CONVERT.inv_um_convert from gmicuom.uom_conversion
994: l_conv_qty := INV_CONVERT.inv_um_convert(item_id => get_rec.inventory_item_id
995: ,precision => 5
996: ,from_quantity => get_rec.qty
997: ,from_unit => get_rec.detail_uom
990: IF (get_rec.scale_type = 0) THEN
991: IF (get_rec.detail_uom <> p_yield_um) THEN
992:
993: -- NPD Conv. Changed the call to INV_CONVERT.inv_um_convert from gmicuom.uom_conversion
994: l_conv_qty := INV_CONVERT.inv_um_convert(item_id => get_rec.inventory_item_id
995: ,precision => 5
996: ,from_quantity => get_rec.qty
997: ,from_unit => get_rec.detail_uom
998: ,to_unit => p_yield_um
1067: FOR get_rec IN Cur_get_ingreds LOOP
1068: IF (get_rec.contribute_yield_ind = 'Y') THEN
1069: /* Convert all ingredient values to yield UM and determine contributing qty */
1070: IF (get_rec.detail_uom <> p_yield_um) THEN
1071: -- NPD Conv. Changed the call to INV_CONVERT.inv_um_convert from gmicuom.uom_conversion
1072: l_conv_qty := INV_CONVERT.inv_um_convert(item_id => get_rec.inventory_item_id
1073: ,precision => 5
1074: ,from_quantity => get_rec.qty
1075: ,from_unit => get_rec.detail_uom
1068: IF (get_rec.contribute_yield_ind = 'Y') THEN
1069: /* Convert all ingredient values to yield UM and determine contributing qty */
1070: IF (get_rec.detail_uom <> p_yield_um) THEN
1071: -- NPD Conv. Changed the call to INV_CONVERT.inv_um_convert from gmicuom.uom_conversion
1072: l_conv_qty := INV_CONVERT.inv_um_convert(item_id => get_rec.inventory_item_id
1073: ,precision => 5
1074: ,from_quantity => get_rec.qty
1075: ,from_unit => get_rec.detail_uom
1076: ,to_unit => p_yield_um
1155: FOR get_rec IN Cur_get_prods LOOP
1156: IF (get_rec.scale_type = 0) THEN
1157: IF (get_rec.detail_uom <> p_yield_um) THEN
1158:
1159: -- NPD Conv. Changed the call to INV_CONVERT.inv_um_convert from gmicuom.uom_conversion
1160: l_conv_qty := INV_CONVERT.inv_um_convert(item_id => get_rec.inventory_item_id
1161: ,precision => 5
1162: ,from_quantity => get_rec.qty
1163: ,from_unit => get_rec.detail_uom
1156: IF (get_rec.scale_type = 0) THEN
1157: IF (get_rec.detail_uom <> p_yield_um) THEN
1158:
1159: -- NPD Conv. Changed the call to INV_CONVERT.inv_um_convert from gmicuom.uom_conversion
1160: l_conv_qty := INV_CONVERT.inv_um_convert(item_id => get_rec.inventory_item_id
1161: ,precision => 5
1162: ,from_quantity => get_rec.qty
1163: ,from_unit => get_rec.detail_uom
1164: ,to_unit => p_yield_um
1520: LOOP
1521: IF l_prod_rec.detail_uom = p_std_um THEN
1522: l_prod_qty := l_prod_qty + l_prod_rec.qty;
1523: ELSE
1524: -- NPD Conv. Changed the call to INV_CONVERT.inv_um_convert from gmicuom.uom_conversion
1525: l_temp_qty := INV_CONVERT.inv_um_convert(item_id => p_item_id
1526: ,precision => 5
1527: ,from_quantity => l_prod_rec.qty
1528: ,from_unit => l_prod_rec.detail_uom
1521: IF l_prod_rec.detail_uom = p_std_um THEN
1522: l_prod_qty := l_prod_qty + l_prod_rec.qty;
1523: ELSE
1524: -- NPD Conv. Changed the call to INV_CONVERT.inv_um_convert from gmicuom.uom_conversion
1525: l_temp_qty := INV_CONVERT.inv_um_convert(item_id => p_item_id
1526: ,precision => 5
1527: ,from_quantity => l_prod_rec.qty
1528: ,from_unit => l_prod_rec.detail_uom
1529: ,to_unit => p_std_um