COMPILE ROUTINE TEST_MOVE_ORDER_DETAIL(Dummy) ROWDEF(CHARSTR) DECLARE SUBROUTINE obj_Notes, Set_Status, Send_Info, obj_Order, errMsg DECLARE FUNCTION Get_Status,obj_Order $INSERT ORDER_EQU $INSERT WO_LOG_EQU $INSERT PROD_SPEC_EQU $INSERT WO_STEP_EQU $INSERT SCHEDULE_EQU $INSERT RLIST_EQUATES $INSERT APPCOLORS EQU ST$WO TO 1 EQU ST$ORD_NO TO 2 EQU ST$QUOTE_NO TO 3 EQU ST$PRICE TO 4 EQU ST$LOT_NOS TO 5 EQU ST$LOT_QTYS TO 6 EQU ST$PART_NOS TO 7 EQU ST$SUB_PART_NOS TO 8 EQU ST$WAF_INV_IDS TO 9 EQU ST$SCHED_IDS TO 10 EQU ST$ADD_CHG_DESCS TO 11 EQU ST$ADD_CHG_AMTS TO 12 EQU ST$CASS_CNT TO 13 EQU ST$CASS_QTY TO 14 ErrorTitle = 'Error in Stored Procedure Test_Move_Order_Detail' ErrorMsg = '' OPEN 'ORDER' TO OrderTable ELSE ErrorMsg = 'Unable to open "ORDER" table.' ErrMsg(ErrorTitle:@SVM:ErrorMsg) RETURN END OPEN 'WO_LOG' TO WOLogTable ELSE ErrorMsg = 'Unable to open "WO_LOG" table.' ErrMsg(ErrorTitle:@SVM:ErrorMsg) RETURN END OPEN 'WO_STEP' TO WOStepTable ELSE ErrorMsg = 'Unable to open "WO_STEP" table.' ErrMsg(ErrorTitle:@SVM:ErrorMsg) RETURN END OPEN 'SCHEDULE' TO SchedTable ELSE ErrorMsg = 'Unable to open "SCHEDULE" table.' ErrMsg(ErrorTitle:@SVM:ErrorMsg) RETURN END OrderNo = 16551 DEBUG READ OrderRec FROM OrderTable,OrderNo THEN Set_Status(0) WOUpdates = obj_Order('Ord_WOLog',OrderNo:@RM:OrderRec) IF Get_Status(errCode) THEN DEBUG FOR I = 1 TO COUNT(WOUpdates,@RM) + (WOUpdates NE '') WOUpdate = FIELD(WOUpdates,@RM,I,1) WONo = WOUpdate READ WOLogRec FROM WOLogTable,WONo THEN QuoteNo = WOUpdate QuoteDetKeys = XLATE('QUOTE',QuoteNo,35,'X') IF INDEX(QuoteDetKeys,@VM,1) ELSE WOLogRec = OrderNo WOLogRec = WOUpdate WOLogRec = WOUpdate WOLogRec = WOUpdate WOLogRec = WOUpdate WOLogRec = WOUpdate WOLogRec = WOUpdate WOLogRec = WOUpdate WOLogRec = WOUpdate WOLogRec = WOUpdate WOLogRec = WOUpdate WRITE WOLogRec ON WOLogTable,WONo THEN Send_Info('WONo ':WONo) END ELSE ErrMsg('Unable to write WO_Log Record ':WONo:' in Write event of ORDER Window') END END ;* End of check for END ELSE GOTO Skip END ;* End of WOLOgRec READ NEXT I END ;* End of ORDER record read * * * * * * * SKIP: * * * * * * * GOTO Bail * * * * * * * Bail: * * * * * * * END