{ "header": { "version": 1, "type": "record" }, "body": { "record1": { "<1>": "declare function fieldcount, msg, dialog_box\r\ndeclare subroutine create_note\r\n$insert logical\r\n$insert msg_equates\r\n$insert quote_sigs_equ\r\n$insert lsl_users_equ\r\n$insert car_equ\r\nequ CrLf$ to char(13):char(10)\r\n\r\nRespUser = .resp_user_id->text\r\nRespSig = .resp_signature->text\r\nCarInplaceSig = .car_inplace_signature->text\r\nVipMfgSig = .vip_mfg_signature->text\r\nif CarInplaceSig <> '' then\r\n MsgInfo = ''\r\n MsgInfo = 'This CAR has already been signed by the responsible person, as being in place.'\r\n MsgInfo = '!'\r\n Void = msg( '', MsgInfo )\r\nend else\r\n\tif @user4 = RespUser then\r\n if RespSig and VipMfgSig then\t\r\n\t\t\tValid = dialog_box( 'QUOTE_SIG_PWD_ENTRY', @window, @user4:@vm:xlate( 'LSL_USERS', @user4, lsl_users_password$, 'X' ) )\r\n\t\t\tif Valid then\r\n\t\t\t .car_inplace_signature->text = @user4\r\n\t\t\t .car_inplace_signature_name->text = oconv( @user4, '[XLATE_CONV,LSL_USERS*FIRST_LAST]' )\r\n\t\t\t .status->value = 'C'\r\n\t\t\t .car_inplace_date->text = oconv( date(), 'D2/' )\r\n \t\t * now send message to entry person\r\n\t\t EntryId = xlate( 'CAR', .car_ref_id->text, car_entry_id$, 'X' )\r\n\t\t if EntryId then\r\n\t create_note( EntryId, 'System', 'CAR#':.car_ref_id->text:' signed for \"In place\" status', 'Signed by ':oconv( .resp_signature->text, '[XLATE_CONV,LSL_USERS*FIRST_LAST]' ):' on ':oconv( date(), 'D2/' ):' at ':oconv( time(), 'MTH' ):'.', 'CAR', .car_ref_id->text )\t \t\r\n\t\t end\r\n\t\t\t @@window->savewarn = 1\r\n\t\t\tend\r\n\t\tend else\r\n\t\t\tMsgInfo = ''\r\n\t\t\tMsgInfo = 'This CAR must be signed by you and the VP of Manufacturing, before being in place.'\r\n\t\t\tMsgInfo = 'H'\r\n\t\t\tVoid = msg( '', MsgInfo )\r\n\t\tend\r\n\tend else\r\n\t\tMsgInfo = ''\r\n\t\tMsgInfo = 'You are not the responsible person...'\r\n\t\tMsgInfo = 'H'\r\n\t\tVoid = msg( '', MsgInfo )\r\n\tend\r\nend\r\nreturn 0\r\n" } } }