89: | "effective" status should be treated as inserts |
90: | |
91: | * Updated within an "effective" status should ignore |
92: | the status and pass the other changed values to the |
93: | mrp_relief_interface table |
94: | |
95: +------------------------------------------------------------*/
96:
97: /* NOTE - changes within a "non-effective" status have already been
168: END IF;
169:
170: IF (ITEM_ID IS NOT NULL) THEN /*BUG 7240404 (FP of 7126271)*/
171: /* MPS relief for assembly */
172: INSERT INTO mrp_relief_interface
173: (inventory_item_id, -- NN
174: organization_id, -- NN
175: last_update_date, -- NN sysdate
176: last_updated_by, -- NN :new.last_updated_by
227: 2,
228: 'WIP',
229: null,
230: null,
231: mrp_relief_interface_s.nextval,
232: new_project_id,
233: old_project_id,
234: new_task_id,
235: old_task_id
239: components, except for Deletion case. Here keeping
240: new_date as SYSDATE as before */
241: IF DELETING THEN
242: /* MPS relief for phantom components */
243: INSERT INTO mrp_relief_interface
244: (inventory_item_id, -- NN
245: organization_id, -- NN
246: last_update_date, -- NN sysdate
247: last_updated_by, -- NN :new.last_updated_by
298: 2,
299: 'WIP',
300: null,
301: null,
302: mrp_relief_interface_s.nextval,
303: new_project_id,
304: old_project_id,
305: new_task_id,
306: old_task_id
308: WHERE wip_entity_id = wip_enty_id
309: AND organization_id = org_id
310: AND wip_supply_type = 6;
311: ELSE /** INSERTING or UPDATING **/
312: INSERT INTO mrp_relief_interface
313: (inventory_item_id, -- NN
314: organization_id, -- NN
315: last_update_date, -- NN sysdate
316: last_updated_by, -- NN :new.last_updated_by
367: 2,
368: 'WIP',
369: null,
370: null,
371: mrp_relief_interface_s.nextval,
372: new_project_id,
373: old_project_id,
374: new_task_id,
375: old_task_id
480: | "Open" status should be treated as inserts |
481: | |
482: | * Updated within an "Open" status should ignore |
483: | the status and pass the other changed values to the |
484: | mrp_relief_interface table |
485: | |
486: +------------------------------------------------------------*/
487:
488: /* NOTE - changes within a "Closed" status have already been
556: --commented in bug#2289820 END IF;
557:
558: END IF;
559:
560: /* Now insert a record into MRP_RELIEF_INTERFACE to take care of
561: MPS relief for assembly Note that if bill designator changes
562: we do not insert a row for the assembly. */
563:
564:
561: MPS relief for assembly Note that if bill designator changes
562: we do not insert a row for the assembly. */
563:
564:
565: INSERT INTO mrp_relief_interface
566: (inventory_item_id, -- NN
567: organization_id, -- NN
568: last_update_date, -- NN sysdate
569: last_updated_by, -- NN :new.last_updated_by
620: 2,
621: 'WIP',
622: null,
623: null,
624: mrp_relief_interface_s.nextval,
625: new_project_id,
626: old_project_id,
627: new_task_id,
628: old_task_id
632:
633: /* insert any rows for phantom items */
634:
635: INSERT
636: INTO mrp_relief_interface
637: (inventory_item_id,
638: organization_id,
639: last_update_date,
640: last_updated_by,
693: 2,
694: 'WIP',
695: null,
696: null,
697: mrp_relief_interface_s.nextval,
698: new_project_id,
699: old_project_id,
700: new_task_id,
701: old_task_id
730:
731: /* inserts for the new bill designator */
732:
733: INSERT
734: INTO mrp_relief_interface
735: (inventory_item_id,
736: organization_id,
737: last_update_date,
738: last_updated_by,
790: 2,
791: 'WIP',
792: null,
793: null,
794: mrp_relief_interface_s.nextval,
795: new_project_id,
796: old_project_id,
797: new_task_id,
798: old_task_id
816:
817: /* now insert for the old bill designator */
818:
819: INSERT
820: INTO mrp_relief_interface
821: (inventory_item_id,
822: organization_id,
823: last_update_date,
824: last_updated_by,
877: 2,
878: 'WIP',
879: null,
880: null,
881: mrp_relief_interface_s.nextval,
882: new_project_id,
883: old_project_id,
884: new_task_id,
885: old_task_id