{
    "header": {
        "version": 1,
        "type": "record"
    },
    "body": {
        "record1": {
            "<1>": "declare function entid, function, msg, repository, dialog_box\r\n$insert msg_equates\r\n$insert popup_equates\r\n$insert logical\r\n\r\nRdsNo = .rds_no->text\r\nRejCols = 'LSL_PRE_EPI_REJ/LSL_POST_EPI_REJ/CUST_PRE_EPI_REJ/CUST_POST_EPI_REJ'\r\nRejAcctPos = '1,5,9,13/2,6,10,14/3,7,11,15/4,8,12,16'\r\nRejFields = 'L_PRE_REJ_CNT/L_POST_REJ_CNT/C_PRE_REJ_CNT/C_POST_REJ_CNT'\r\nconvert '/' to @fm in RejCols\r\nconvert '/' to @fm in RejAcctPos\r\nconvert ',' to @vm in RejAcctPos\r\nconvert '/' to @fm in RejFields\r\nPopId = entid( @appid<1>, 'POPUP', '', 'RDS_REJ_ACCT_OPTS' )\r\nOverRide = ''\r\nDisplay  = ''\r\nif .lsl_pre_epi_rej->text then\r\n    Display<1,-1> = 'Epitronics Pre Epi Rejects':@tm:'LSL_PRE_EPI_REJ'\r\nend\r\nif .lsl_post_epi_rej->text then\r\n    Display<1,-1> = 'Epitronics Post Epi Rejects':@tm:'LSL_POST_EPI_REJ'\r\nend\r\nif .cust_pre_epi_rej->text then\r\n    Display<1,-1> = 'Epitronics Pre Epi Rejects':@tm:'CUST_PRE_EPI_REJ'\r\nend\r\nif .cust_post_epi_rej->text then\r\n    Display<1,-1> = 'Epitronics Post Epi Rejects':@tm:'CUST_POST_EPI_REJ'\r\nend\r\nif Display then\r\n\tOverRide<Pdisplay$> = Display\r\n\tRejCol = repository( \"EXECUTE\", PopId, @window, OverRide ) \r\n\tif RejCol then\r\n\t    locate RejCol in RejCols using @fm setting Fpos then\r\n\t        RejField = RejFields<Fpos>\r\n        \tCurRej = get_property( @window:'.':RejCols<Fpos>, 'TEXT' )+0\r\n\t\t    RejectInfo = .reject_info->array\r\n\t\t    ParamToPass = RejCol\r\n\t\t    convert '_' to ' ' in ParamToPass\r\n\t        HoldRej  = RejectInfo<RejAcctPos<Fpos,2>>\r\n\t        HoldLoss = RejectInfo<RejAcctPos<Fpos,1>>\r\n\t        HoldAc   = RejectInfo<RejAcctPos<Fpos,3>>\r\n\t        HoldNCR  = RejectInfo<RejAcctPos<Fpos,4>>\t      \r\n\t        HoldAll  = HoldRej:HoldLoss:HoldAc:HoldNCR\r\n\t\t    ParamToPass := '*':CurRej\r\n\t\t    ParamToPass := '*':HoldRej\r\n\t\t    ParamToPass := '*':HoldLoss\r\n\t\t    ParamToPass := '*':HoldAc\r\n\t\t    ParamToPass := '*':HoldNCR\r\n    \t    ParamToPass := '*':RdsNo\r\n\t\t    ParamToPass := '*':RejField\r\n            NCRMustSave = get_property( @window, '@NCRMustSave' ) \r\n\t\t    RetVal = dialog_box( 'RDS_REJECTS', @window, ParamToPass:char(245):NCRMustSave )\r\n\t\t    if RetVal <> 'CANCEL' then\r\n\t\t        NCRChg  = field( RetVal, char(245), 2 )\r\n                * NEED NCRCHG HERE CAUSE THE USER MAY TRY TO LEAVE THIS RDS WITHOUT SAVING\r\n                * THE PURPOSE OF THIS FLAG IS TO FORCE A SAVE IF AN NCR WAS AFFECTED\r\n\t            RetVal  = field( RetVal, char(245), 1 )\r\n\t\t\t    RetRej  = RetVal<1>\r\n\t\t\t    RetLoss = RetVal<2>\r\n\t\t\t    RetAC   = RetVal<4>\r\n\t\t\t    RetNCR  = RetVal<6>\r\n\t\t\t    All     = RetRej:RetLoss:RetAC:RetNCR\r\n\t\t\t    if All <> HoldAll then\r\n\t\t\t\t    RejectInfo<RejAcctPos<Fpos,2>> = RetRej\r\n\t\t\t\t    RejectInfo<RejAcctPos<Fpos,1>> = RetLoss\r\n\t\t\t\t    RejectInfo<RejAcctPos<Fpos,3>> = RetAC\r\n\t\t\t\t    RejectInfo<RejAcctPos<Fpos,4>> = RetNCR\r\n\t\t\t\t    .reject_info->array = RejectInfo\r\n\t\t\t\t    @@window->savewarn = true$\r\n\t\t\t\t    if NCRChg = true$ then\r\n\t\t\t\t       Void = set_property( @window, '@NCRMustSave', true$ )\r\n\t\t\t\t    end\r\n\t\t\t    end\r\n\t\t\tend\r\n\t\tend\r\n\tend  \r\nend else\r\n    MsgInfo = ''\r\n    MsgInfo<mtext$> = 'There are no rejects!'\r\n    MsgInfo<micon$> = '!'\r\n    Void = msg( '', MsgInfo )\r\nend\r\nRETURN 0"
        }
    }
}