11 lines
1.8 KiB
JSON
11 lines
1.8 KiB
JSON
{
|
|
"header": {
|
|
"version": 1,
|
|
"type": "record"
|
|
},
|
|
"body": {
|
|
"record1": {
|
|
"<1>": "declare subroutine record_lock\r\ndeclare function msg\r\n$insert logical\r\n$insert quote_equ\r\n$insert msg_equates\r\n\r\nListId = 'QUOTE_ID*':@station\r\nQuoteKey = xlate( 'SYSLISTS', ListId, 1, 'X' )\r\nif QuoteKey then\r\n * check to see if open for this customer\r\n QuoteRec = xlate( 'QUOTE', QuoteKey, '', 'X' )\r\n CustNo = .cust_no->text\r\n WrongCust = false$\r\n ErrMsg = ''\r\n if QuoteRec<quote_cust_no$> <> CustNo then\r\n ErrMsg:= 'Quote ':QuoteKey:' is a quote for ':oconv( QuoteRec<quote_cust_no$>, '[XLATE_CONV,COMPANY*CO_NAME]' )\r\n ErrMsg:= ' not ':oconv( CustNo, '[XLATE_CONV,COMPANY*CO_NAME]' )\r\n WrongCust = true$\r\n end\r\n WrongStat = false$\r\n if QuoteRec<quote_status$> <> 'O' then\r\n if ErrMsg then\r\n ErrMsg:= ' and is not OPEN'\r\n end else\r\n ErrMsg:= 'Quote ':QuoteKey:' is not OPEN'\r\n end\r\n WrongStat = true$\r\n end\r\n if ( WrongCust = false$ ) and ( WrongStat = false$ ) then\r\n .quote_num->text = QuoteKey\r\n\t open 'SYSLISTS' to SysListsTable else\r\n\t Void = msg( '', 'Unable to open SYSLISTS...' )\r\n\t return 0\r\n\t end\r\n\t record_lock( SysListsTable, 'SysLists', ListId )\r\n\t delete SysListsTable, ListId else\r\n\t Void = msg( '', 'Unable to delete ':ListId:' from SYSLISTS...' )\r\n\t return 0\r\n\t end\r\n\t unlock SysListsTable, ListId else\r\n\t Void = msg( '', 'Unable to unlock SYSLISTS ':ListId )\r\n\t return 0\r\n\t end\r\n\tend else\r\n\t MsgInfo = ''\r\n\t MsgInfo<mtext$> = ErrMsg\r\n\t MsgInfo<micon$> = '!'\r\n\t Void = msg( '', MsgInfo )\r\n\tend\r\nend\r\nRETURN 0"
|
|
}
|
|
}
|
|
} |