Ejemplo n.º 1
0
        private static COPXmlFactory.RTTIE022.DelinquentForm _Fill(RTTIE022_SrvRef.TT022E00Response_SMA _SMA, RTTIE022_SrvRef.TT022E00Response_EMI _EMI, RTTIE022_SrvRef.TT022E00Response_ETA _ETA)
        {
            COPXmlFactory.RTTIE022.DelinquentForm fobj = RevenueGovXMLFactory.GetDelinquentForm();

            //LOAD ERRORS INTO OBJECT
            fobj.ERROR_INFO = new ERROR_INFO();
            if (_SMA._SYSTEMMESSAGEAREA != null)
            {
                fobj.ERROR_INFO.PROGRAM = _SMA._SYSTEMMESSAGEAREA._PROGRAM;
                fobj.ERROR_INFO.LINE    = _SMA._SYSTEMMESSAGEAREA.LINE.ToString();
                fobj.ERROR_INFO.MESSAGE = _SMA._SYSTEMMESSAGEAREA.MESSAGE;
                fobj.ERROR_INFO.ERROR   = _SMA._SYSTEMMESSAGEAREA.ERROR.ToString();
            }

            //LOAD DEL_INFO
            fobj.DEL_INFO = new DEL_INFO();
            if (_EMI != null)
            {
                fobj.DEL_INFO.ENTITY_TYPE       = _EMI._ENTITYMASTERINFO.ENTITYTYPE.ToString();
                fobj.DEL_INFO.ENTITY_ID         = _EMI._ENTITYMASTERINFO.ENTITYID.ToString();
                fobj.DEL_INFO.FUNCTION          = _EMI._ENTITYMASTERINFO.FUNCTION;
                fobj.DEL_INFO.NOTICE_NUM        = _EMI._ENTITYMASTERINFO.NOTICENUM;
                fobj.DEL_INFO.NEXT_ACCOUNT_TYPE = _EMI._ENTITYMASTERINFO.NEXTACCOUNT.ToString();
                fobj.DEL_INFO.NEXT_ACCOUNT_ID   = _EMI._ENTITYMASTERINFO.NEXTACCOUNTID.ToString();
                fobj.DEL_INFO.NEXT_PERIOD       = _EMI._ENTITYMASTERINFO.NEXTPERIOD.ToString();
            }

            //LOAD DEL_INFO
            if (_ETA._ENTITYTAXACCOUNTSs != null)
            {
                for (int i = 0; i < _ETA._ENTITYTAXACCOUNTSs.Length; i++)
                {
                    if (CopMvcUtil.GetString(_ETA._ENTITYTAXACCOUNTSs[i].ACCOUNTID) != "")
                    {
                        fobj.DEL_ACCTs.Add(RevenueGovXMLFactory.GetDelinquent_DEL_ACCT());

                        fobj.DEL_ACCTs[i].FUNCTION_CODE = _ETA._ENTITYTAXACCOUNTSs[i].FUNCTIONCODE;
                        fobj.DEL_ACCTs[i].ACCOUNT_TYPE  = CopMvcUtil.GetString(_ETA._ENTITYTAXACCOUNTSs[i].ACCOUNT);
                        fobj.DEL_ACCTs[i].ACCOUNT_ID    = _ETA._ENTITYTAXACCOUNTSs[i].ACCOUNTID;
                        fobj.DEL_ACCTs[i].PERIOD        = CopMvcUtil.ConvDate(_ETA._ENTITYTAXACCOUNTSs[i].PERIODX);
                        fobj.DEL_ACCTs[i].PRINCIPAL_DUE = CopMvcUtil.ConvDigitToCurrency(_ETA._ENTITYTAXACCOUNTSs[i].PRINCIPALX);
                        fobj.DEL_ACCTs[i].INTEREST_DUE  = CopMvcUtil.ConvDigitToCurrency(_ETA._ENTITYTAXACCOUNTSs[i].INTERESTX);
                        fobj.DEL_ACCTs[i].PENALTY_DUE   = CopMvcUtil.ConvDigitToCurrency(_ETA._ENTITYTAXACCOUNTSs[i].PENALTYX);
                        fobj.DEL_ACCTs[i].OTHER_DUE     = CopMvcUtil.ConvDigitToCurrency(_ETA._ENTITYTAXACCOUNTSs[i].OTHERX);
                        fobj.DEL_ACCTs[i].BRT_ENTITY    = _ETA._ENTITYTAXACCOUNTSs[i].BRTENTITY;
                        fobj.DEL_ACCTs[i].BRT_ADDRESS   = _ETA._ENTITYTAXACCOUNTSs[i].BRTADDRESS;
                        fobj.DEL_ACCTs[i].FILL          = _ETA._ENTITYTAXACCOUNTSs[i].FILL;
                    }
                }
            }



            return(fobj);
        }