{
    "header": {
        "version": 1,
        "type": "record"
    },
    "body": {
        "record1": {
            "<1>": "declare function fieldcount, msg, dialog_box, memberof\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 ncr_equ\r\nequ CrLf$ to char(13):char(10)\r\n\r\nif memberof( @user4, 'SUPERVISOR' ) or memberof( @user4, 'ENGINEERING' ) then\r\n   * OK\r\nend else\r\n   MsgInfo = ''\r\n   MsgInfo<micon$> = '!'\r\n   MsgInfo<mtext$> = 'You must be a supervisor or an engineer to sign for accepting under deviation.'\r\n   Void = msg( '', MsgInfo )\r\n   return 0\r\nend\r\nAuthDevSig = .auth_dev_sig->text\r\nAuthDevSigName = .auth_dev_sig_name->text\r\n*CurStatus = .status->value\r\n*if CurStatus = 'O' then\r\n    if AuthDevSigName <> '' then\r\n        MsgInfo = ''\r\n        MsgInfo<mtext$> = 'This NCR has already been signed for accept under deviation.'\r\n        MsgInfo<micon$> = '!'\r\n        Void = msg( '', MsgInfo )\r\n    end else\r\n        if .auth_rej_sig->text <> '' then\r\n\t\t    Valid = 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        .auth_dev_sig->text = @user4\r\n\t\t        .auth_dev_sig_name->text = xlate( 'LSL_USERS', @user4, 'FIRST_LAST', 'X' )\r\n\t\t        @@window->savewarn = 1\r\n\t\t    end\r\n\t    end else\r\n\t        MsgInfo = ''\r\n\t        MsgInfo<mtext$> = 'This NCR must be signed for rejected material before accepting under deviation.'\r\n\t        MsgInfo<micon$> = '!'\r\n\t        Void = msg( '', MsgInfo )\r\n\t    end\r\n    end\r\n*end else\r\n*    if CurStatus = 'C' then\r\n*       CurStatus = 'Closed'\r\n*    end else\r\n*       CurStatus = 'Verified'    \r\n*    end\r\n*    MsgExtension = ''\r\n*    if AuthDevSig <> '' then\r\n*       MsgExtension = ' and has already been signed for accept under deviation.'\r\n*    end\r\n*    MsgInfo = ''\r\n*    MsgInfo<mtext$> = 'This NCR is ':CurStatus:MsgExtension\r\n*    MsgInfo<micon$> = '!'\r\n*    Void = msg( '', MsgInfo )\r\n*end\r\nreturn 0"
        }
    }
}