open-insight/LSL2/OIEVENT/WRITE/PROD_SPEC_JCH..json
2024-03-25 15:12:53 -07:00

11 lines
2.3 KiB
JSON

{
"header": {
"version": 1,
"type": "record"
},
"body": {
"record1": {
"<1>": "declare function rowexists, prod_spec_comm, msg, Comm_Prod_Spec, Get_Property\r\ndeclare subroutine create_note, forward_event, obj_Prod_Spec, Comm_Prod_Spec\r\n\r\n$INSERT QUOTE_SIGS_EQU\r\n$INSERT QUOTE_SPEC_EQU\r\n$INSERT MSG_EQUATES\r\n$INSERT LOGICAL\r\n$INSERT NOTIFICATION_EQU\r\n\r\nTvalue = .rtype->value\r\nif Tvalue = '' then\r\n\tMsgInfo = ''\r\n\tMsgInfo<mtext$> = 'You must choose a reactor type...'\r\n\tMsgInfo<micon$> = 'H'\r\n\tVoid = msg( '', MsgInfo )\r\n\treturn 0\r\nend\r\n\r\nPSN = .prod_spec_id->text\r\nif rowexists( 'PROD_SPEC', PSN ) then\r\n RowExists = true$\r\nend else\r\n RowExists = false$\r\nend\r\nSubstrateInfo = .spec_substrate->text\r\n\r\nPSNStatus = Get_Property(@Window : '.STATUS', 'VALUE')\r\n\r\n\r\nIf ( (@@window->savewarn EQ true$) AND ((PSNStatus EQ 'A') OR (PSNStatus EQ 'H')) ) then\r\n\tResult = Comm_Prod_Spec('UpdateRevHist')\r\n\tIf Result EQ False$ then\r\n\t\tReturn 0\r\n\tend\r\nend\r\n\r\nSendTo = XLATE('NOTIFICATION','PSN_DELTA',NOTIFICATION_USER_ID$,'X')\r\n\t \r\nif rowexists( 'PROD_SPEC', PSN ) then\r\n\tif ( @@window->savewarn = true$ ) then\r\n\t\tcreate_note( SendTo, 'System', 'PSN Modification', 'This PSN was modified by ':oconv( @user4, '[XLATE_CONV,LSL_USERS*FIRST_LAST]' ):' on ':oconv( date(), 'D2/' ):' at ':oconv( time(), 'MTH' ):'.', 'PROD_SPEC', .prod_spec_id->text )\r\n\tend\r\nend else\r\n\t.entry_id->text = @user4\r\n\tcreate_note( SendTo, 'System', 'New PSN', 'This PSN was entered by ':oconv( @user4, '[XLATE_CONV,LSL_USERS*FIRST_LAST]' ):' on ':oconv( date(), 'D2/' ):' at ':oconv( time(), 'MTH' ):'.', 'PROD_SPEC', .prod_spec_id->text )\t \r\nend\r\n\r\n* Deprecated 7/2/18 - djs - KLUSA PSN Revision History Project\r\n*if ( @@window->savewarn = true$ ) then\r\n*\tModArray = .mod_info->array\r\n*\tModArray = insert( ModArray, 1, 1, 0, @user4 )\r\n*\tModArray = insert( ModArray, 2, 1, 0, oconv( @user4, '[XLATE_CONV,LSL_USERS*FIRST_LAST]' ) )\r\n*\tModArray = insert( ModArray, 3, 1, 0, oconv( date(), 'D2/' ) )\r\n*\t.mod_info->array = ModArray\r\n*end\r\n\r\nforward_event()\r\n\r\nobj_Prod_Spec('PushTech',PSN)\t;* Pushes data to new table locations JCH 10/8/2012\r\n\r\nreturn 0\r\n"
}
}
}