replaced with NDW_VERIFY_USER. Added barcode scan function to NDW_VERIFY_USER. fixed two instances of ohms square unit characters being garbled by git minor modification to NDW_VERIFY_USER_EVENTS lost focus events minor change to gotfocus event logic
11 lines
3.6 KiB
JSON
11 lines
3.6 KiB
JSON
{
|
|
"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\nequ CrLf$ to char(13):char(10)\r\n\r\nCurStat = .status->value\r\nif CurStat = 'C' then\r\n MsgInfo = ''\r\n MsgInfo<mtext$> = 'This Quote is closed...'\r\n MsgInfo<micon$> = '!'\r\n Void = msg( '', MsgInfo )\r\n return 0\r\nend\r\nif .status->value = 'O' then\r\n MsgInfo = ''\r\n MsgInfo<mtext$> = 'This Quote is fully signed...'\r\n MsgInfo<micon$> = '!'\r\n Void = msg( '', MsgInfo )\r\nend else\r\n\tCurSigs = .signatures->array<1>\r\n\tlocate @user4 in CurSigs using @vm setting Fpos then\r\n\t MsgInfo = ''\r\n\t MsgInfo<mtext$> = 'You have already signed off on this quote...' \r\n\t MsgInfo<micon$> = 'H'\r\n\t Void = msg( '', MsgInfo )\r\n\tend else\r\n\t SignatureInfo = xlate( 'CONFIG', 'QUOTE_SIGS', '', 'X' )\r\n\t Users = SignatureInfo<1>\r\n\t Passwords = SignatureInfo<2>\r\n\t NumSigsRequired = SignatureInfo<3>+0\r\n\t QuoteFaxer = SignatureInfo<5>\r\n\t locate @user4 in Users using @vm setting Fpos then\r\n\t if ( .prod_spec_id->text <> '' ) then\r\n\t\t Password = Passwords<1,Fpos>\r\n\t\t Valid = Dialog_Box('NDW_VERIFY_USER', @Window, @User4)\r\n Valid = Valid<1>\r\n\t\t if Valid then\r\n\t\t Sigs = .signatures->array<1>\r\n\t\t SigsOut = .signatures->array<2>\r\n\t\t\t Scnt = fieldcount( Sigs, @vm )\r\n\t\t\t Filled = false$\r\n\t\t\t for i = 1 to Scnt\r\n\t\t\t if Sigs<1,i> = '' then\r\n\t\t\t Sigs<1,i> = @user4\r\n\t\t\t SigsOut<1,i> = oconv( @user4, '[XLATE_CONV,LSL_USERS*FIRST_LAST]' )\r\n\t\t\t Filled = true$\r\n\t\t\t end\r\n\t\t\t until Filled\r\n\t\t\t next i\r\n\t\t\t ExpDate = .exp_date->invalue\r\n\t\t if ExpDate = '' or ExpDate < date() then\r\n\t\t * don't change it is expired\r\n\t\t if i >= NumSigsRequired then\r\n if QuoteFaxer then\r\n\t\t Message = 'This quote is fully signed and ready to be faxed but it is currently expired. You will need to push the expiration date out.'\r\n\t\t create_note( QuoteFaxer, 'System', 'Quote ready to fax', Message, 'QUOTE', .quote_no->text )\r\n end\r\n end\r\n\t\t end else\r\n\t\t if i >= NumSigsRequired then\r\n\t\t .status->value = 'O'\r\n\t\t .inquiry_status->value = 'C'\r\n\t\t if QuoteFaxer then\r\n\t\t Message = 'This quote is fully signed and ready to be faxed'\r\n\t\t create_note( QuoteFaxer, 'System', 'Quote ready to fax', Message, 'QUOTE', .quote_no->text )\r\n\t\t end\r\n\t\t end \r\n\t\t end\r\n\t\t SigArray = Sigs:@fm:SigsOut\r\n\t\t .signatures->array = SigArray\r\n @@window->savewarn = 1\r\n\t\t\t end \r\n\t\t end else\r\n\t\t MsgInfo = ''\r\n\t\t Ttext = 'You must enter a PSN ( Product Specification# ) before signing'\r\n\t\t MsgInfo<mtext$> = Ttext\r\n\t\t MsgInfo<micon$> = 'H'\r\n\t\t Void = msg( '', MsgInfo )\r\n\t\t end\r\n\t end else\r\n\t\t MsgInfo = ''\r\n\t\t MsgInfo<mtext$> = 'You are not authorized to sign off on Quotes...'\r\n\t\t MsgInfo<micon$> = 'H'\r\n\t\t Void = msg( '', MsgInfo )\r\n\t end\r\n\tend\r\nend\r\nreturn 0"
|
|
}
|
|
}
|
|
} |