Files
open-insight/LSL2/OIEVENT/MENU/INVOICE.MENU.EDIT.UNPROTECT_FIELDS.json
2024-03-25 15:12:53 -07:00

11 lines
1.5 KiB
JSON

{
"header": {
"version": 1,
"type": "record"
},
"body": {
"record1": {
"<1>": "declare function send_message, admin_user, msg\r\ndeclare subroutine send_message\r\n$insert lsl_users_equ\r\n$insert logical\r\n$insert msg_equates\r\nequ LockStyle$ to 8192\r\n\r\nContinue = false$\r\nif admin_user( @user4 ) then\r\n Continue = true$\r\nend else\r\n SecGroups = xlate( 'LSL_USERS', @user4, lsl_users_groups$, 'X' )\r\n locate 'SCHEDULING' in SecGroups using @vm setting Fpos then\r\n Continue = true$\r\n end\r\nend\r\nif Continue then\r\n\tInvDetail = @window:'.INVOICE_DETAIL'\r\n\t*Styles = send_message( InvDetail, 'COLSTYLE', 0, '' )\r\n\t*debug\r\n\tVoid = send_message( InvDetail, 'COLSTYLE', 2, 385 ) ;* 385 is non \r\n\tVoid = send_message( InvDetail, 'COLSTYLE', 3, 385 ) ;* protect right just\r\n\t.entry_date->enabled = 1\r\n\t.po->enabled = 1\r\n\t.order_no->enabled = 1\r\n\t.cust_no->enabled = 1\r\n\t*Styles<1> = bitor( Styles<1>, LockStyle$ )\r\n\t*Styles<1> = bitand( Styles<1>, bitnot(LockStyle$))\r\n\t*Styles<2> = bitand( Styles<2>, bitnot(LockStyle$))\r\n\t*Styles<3> = bitand( Styles<3>, bitnot(LockStyle$))\r\n\t*send_message( InvDetail, 'COLSTYLE', 0, Styles \r\nend else\r\n MsgInfo = ''\r\n MsgInfo<mtext$> = 'You do not have proper security to unprotect quote and schedule nos.' \r\n MsgInfo<micon$> = 'H'\r\n Void = msg( '', MsgInfo )\r\nend\r\nRETURN 0"
}
}
}