Files
open-insight/LSL2/OIEVENT/CLICK/CUST_INQUIRY.BUTTON_6.json
2024-03-25 15:12:53 -07:00

11 lines
2.0 KiB
JSON

{
"header": {
"version": 1,
"type": "record"
},
"body": {
"record1": {
"<1>": "declare function next_key, send_event, msg, security_check\r\ndeclare subroutine security_err_msg, delete_row\r\n$insert security_rights_equ\r\n\r\nif security_check( 'Cust Inquiry', Write$ ) then\r\n * save off all data\r\n AllControls = utility( 'OBJECTLIST', @window, '' )\r\n convert @fm to @rm in AllControls\r\n AllData = get_property( Allcontrols, 'TEXT' )\r\n SpecInfo = .spec_info->array\r\n QtyInfo = .qty_info->array\r\n OrigCIId = .cust_inquiry_id->text\r\n\tChoice = send_event( @window, 'CLEAR' )\r\n\tif Choice = '' then\r\n\t * if choice has a value then the user has canceled \r\n\t\topen 'CUST_INQUIRY' to CITableVar else\r\n\t\t Void = msg( '', 'Unable to open CUST_INQUIRY...' )\r\n\t\t return 0\r\n\t\tend\r\n\t\tNextCIKey = next_key( 'CUST_INQUIRY', CITableVar, 'NEXT', '' )\r\n\t\t.cust_inquiry_id->text = NextCIKey\r\n\t\tunlock CITableVar, NextCIKey else\r\n\t\t Void = msg( '', 'Unable to unlock CUST_INQUIRY ':NextCIKey )\r\n\t\t return 0\r\n\t\tend\r\n\t\tVoid = send_event( @window:'.CUST_INQUIRY_ID', 'LOSTFOCUS' )\r\n\t\tVoid = set_property( AllControls, 'TEXT', AllData )\r\n\t\t.cust_inquiry_id->text = NextCIKey\r\n\t\t.entry_date->text = oconv( date(), 'D2/' )\r\n\t\t.entry_id->text = oconv( @user4, '[XLATE_CONV,LSL_USERS*FIRST_LAST]' )\r\n \t.spec_info->array = SpecInfo\r\n .qty_info->array = QtyInfo\r\n * clear out signatures and inquiry date and set to open\r\n .eng_signature->text = ''\r\n .eng_signature_name->text = ''\r\n .mkt_signature->text = ''\r\n .mkt_signature_name->text = ''\r\n .status->value = 'O'\r\n .inquiry_date->text = ''\r\n if .rev_num->text <> '' then\r\n .rev_num->text = .rev_num->text + 1\r\n end\r\n\t\t@@window->savewarn = 1\r\n end\r\nend else\r\n security_err_msg( 'Cust Inquiry', Write$ )\r\nend\r\nRETURN 0"
}
}
}