Exemple #1
0
        public static XmlDocument CallService(XmlDocument Request)
        {
            COPXmlFactory.RTTIE039.NPTRETURN acct;

            try
            {
                string InnerXML = Request.InnerXml;
                acct = RevenueGovXMLFactory.GetObject <COPXmlFactory.RTTIE039.NPTRETURN>(InnerXML);

                acct = __Call(acct);
            }
            catch (Exception ex)
            {
                acct = RevenueGovXMLFactory.GetNPTReturn();

                acct.ERROR_INFO         = new ERROR_INFO();
                acct.ERROR_INFO.ERROR   = 11.ToString();
                acct.ERROR_INFO.MESSAGE = ex.Message;
            }

            return(RevenueGovXMLFactory.GetXmlDocument(acct));
        }
Exemple #2
0
        public static string CallService(string Request)
        {
            COPXmlFactory.RTTIE039.NPTRETURN xo;

            try
            {
                xo = RevenueGovXMLFactory.GetObject <COPXmlFactory.RTTIE039.NPTRETURN>(Request);

                xo = __Call(xo);
            }
            catch (Exception ex)
            {
                xo =
                    RevenueGovXMLFactory.GetNPTReturn();

                xo.ERROR_INFO         = new ERROR_INFO();
                xo.ERROR_INFO.ERROR   = 11.ToString();
                xo.ERROR_INFO.MESSAGE = ex.Message;
            }

            return(RevenueGovXMLFactory.GetXmlString(xo));
        }
Exemple #3
0
        //private static NPTRETURN __Call(NPTRETURN e)
        //{
        //    switch (e.NPT_INFO.RETURN_STATUS)
        //    {
        //        case "INQ":
        //            e = __RTTIE039_F_I(e);
        //            break;
        //        case null: // submit
        //            e = __RTTIE039_F_U(e);
        //           break;

        //        default:
        //            {
        //                e.NPT_INFO.RETURN_STATUS = "INQ";
        //                e = __RTTIE039_F_I(e);
        //                break;
        //            }
        //    }


        //    return e;
        //}

        //private static COPXmlFactory.RTTIE039.NPTRETURN __RTTIE039_F_I(COPXmlFactory.RTTIE039.NPTRETURN e)
        //{
        //    RTTIE239_SrvRef.RTTIE239 serv_req = new RTTIE239_SrvRef.RTTIE239();

        //    serv_req._ENPT = new RTTIE239_SrvRef._ENPT();

        //    serv_req._ENPT.ACCOUNTID = e.NPT_INFO.ACCOUNT_ID;
        //    serv_req._ENPT.PERIODX = CopMvcUtil.ConvDateDecimal(e.NPT_INFO.PERIOD).ToString();
        //    serv_req._ENPT.RETURNSTATUS = e.NPT_INFO.RETURN_STATUS;

        //    RTTIE239_SrvRef.RTTIE239Response response = _client.RTTIE239(serv_req);

        //    e = __Fill(response);

        //    return e;
        //}

        private static COPXmlFactory.RTTIE039.NPTRETURN __Fill(RTTIE239_SrvRef.RTTIE239Response e)
        {
            COPXmlFactory.RTTIE039.NPTRETURN fobj = RevenueGovXMLFactory.GetNPTReturn();

            //LOAD ERRORS INTO OBJECT
            fobj.ERROR_INFO = new ERROR_INFO();

            fobj.ERROR_INFO.PROGRAM = e._SMA._PROGRAM;
            fobj.ERROR_INFO.LINE    = e._SMA.ERRORLINE.ToString();
            fobj.ERROR_INFO.MESSAGE = e._SMA.MESSAGE;
            fobj.ERROR_INFO.ERROR   = e._SMA.SYSTEMERROR.ToString();

            //LOAD NPT_INFO
            fobj.NPT_INFO                   = new NPT_INFO();
            fobj.NPT_INFO.ACCOUNT_ID        = e._ENPT.ACCOUNTID;
            fobj.NPT_INFO.PERIOD            = CopMvcUtil.ConvDate(e._ENPT.PERIODX);
            fobj.NPT_INFO.VERSION           = e._ENPT.VERSIONX;
            fobj.NPT_INFO.RETURN_STATUS     = e._ENPT.RETURNSTATUS;
            fobj.NPT_INFO.LAST_UPD_DATE     = CopMvcUtil.ConvDate(e._ENPT.LASTUPDATEDATEX);
            fobj.NPT_INFO.RECORDING_DATE    = CopMvcUtil.ConvDate(e._ENPT.RECORDINGDATEX);
            fobj.NPT_INFO.EXTENSION_DATE    = CopMvcUtil.ConvDate(e._ENPT.EXTENSIONDATEX);
            fobj.NPT_INFO.SEQUENCE          = e._ENPT.SEQUENCENUMBER;
            fobj.NPT_INFO.ADJUSTMENT_REF_NO = e._ENPT.ADJUSTMENTREFERENCENUM;
            fobj.NPT_INFO.USER_ID           = e._ENPT.USERID;
            fobj.NPT_INFO.RESIDENT_RATE     = CopMvcUtil.ConvDigitToDouble9(e._ENPT.RATERES);
            fobj.NPT_INFO.NON_RES_RATE      = CopMvcUtil.ConvDigitToDouble9(e._ENPT.RATENONRES);
            fobj.NPT_INFO.PREPARER_NAME     = e._ENPT.PREPARERNAME;

            if ((CopMvcUtil.GetLong(e._ENPT.PREPARERPHONE) == 0))
            {
                fobj.NPT_INFO.PREPARER_PHONE = string.Empty;
            }
            else
            {
                fobj.NPT_INFO.PREPARER_PHONE = CopMvcUtil.GetString(e._ENPT.PREPARERPHONE);
            }
            // fobj.NPT_INFO.PREPARER_PHONE = CopMvcUtil.GetString(e._ENPT.PREPARERPHONE);

            fobj.NPT_INFO.PREPARER_PHONE_EXT     = e._ENPT.PREPARERPHONEEXT;
            fobj.NPT_INFO.PREPARER_IP_ADDRESS    = e._ENPT.PREPARERIPADDRESS;
            fobj.NPT_INFO.PREPARER_EMAIL_ADDRESS = e._ENPT.PREPAREREMAILADDRESS;
            fobj.NPT_INFO.PREPARER_WHO           = e._ENPT.PREPARERTYPE;

            //NPT_PG1
            fobj.NPT_PG1 = new NPT_PG1();
            fobj.NPT_PG1.RESIDENT_INCOME     = CopMvcUtil.ConvDigitToCurrency(e._EAMTS.RESTAXABLEINCOMEX);
            fobj.NPT_PG1.RESIDENT_INCOME_TAX = CopMvcUtil.ConvDigitToCurrency(e._EAMTS.RESTAXDUEX);
            fobj.NPT_PG1.NON_RES_INCOME      = CopMvcUtil.ConvDigitToCurrency(e._EAMTS.NONRESTAXINCOMEX);
            fobj.NPT_PG1.NON_RES_INCOME_TAX  = CopMvcUtil.ConvDigitToCurrency(e._EAMTS.NONRESTAXDUEX);
            fobj.NPT_PG1.TOTAL_TAX           = CopMvcUtil.ConvDigitToCurrency(e._EAMTS.TOTALTAXDUE1X);
            fobj.NPT_PG1.BPT_TAX_CREDIT      = CopMvcUtil.ConvDigitToCurrency(e._EAMTS.BPTCREDITX);
            fobj.NPT_PG1.OTHER_TAX_CREDIT    = CopMvcUtil.ConvDigitToCurrency(e._EAMTS.OTHERX);
            fobj.NPT_PG1.TOTAL_PAY_CREDITS   = CopMvcUtil.ConvDigitToCurrency(e._EAMTS.TOTALCREDITSX);
            fobj.NPT_PG1.TAX_DUE             = CopMvcUtil.ConvDigitToCurrency(e._EAMTS.TOTALTAXDUEX);
            fobj.NPT_PG1.INTEREST_PENALTY    = CopMvcUtil.ConvDigitToCurrency(e._EAMTS.INTERESTPENALTYX);
            fobj.NPT_PG1.TOTAL_DUE           = CopMvcUtil.ConvDigitToCurrency(e._EAMTS.TOTALTAXDUEX);
            fobj.NPT_PG1.OVERPAY             = CopMvcUtil.ConvDigitToCurrency(e._EAMTS.TAXOVERPAIDX);
            fobj.NPT_PG1.LINE11      = CopMvcUtil.ConvDigitToCurrency(e._EAMTS.NETPROFITESTX);
            fobj.NPT_PG1.REFUND      = CopMvcUtil.ConvDigitToCurrency(e._EAMTS.REFUNDAMTX);
            fobj.NPT_PG1.BPT_OVERPAY = CopMvcUtil.ConvDigitToCurrency(e._EAMTS.BPTOVERPAYMENTX);
            fobj.NPT_PG1.NPT_OVERPAY = CopMvcUtil.ConvDigitToCurrency(e._EAMTS.NPTOVERPAYMENTX);

            return(fobj);
        }
Exemple #4
0
        private static COPXmlFactory.RTTIE039.NPTRETURN __Fill(RTTIE040_SrvRef.TT040E00Response_SMA _SMA, RTTIE040_SrvRef.TT040E00Response_ENPT _ENPT,
                                                               RTTIE040_SrvRef.TT040E00Response_EAMTS _EAMTS, RTTIE040_SrvRef.TT040E00Response_SERR _SERR)
        {
            COPXmlFactory.RTTIE039.NPTRETURN fobj = RevenueGovXMLFactory.GetNPTReturn();

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

            fobj.NPT_INFO.ACCOUNT_ID        = _ENPT.ACCOUNTID;
            fobj.NPT_INFO.PERIOD            = CopMvcUtil.ConvDate(_ENPT.PERIODX);
            fobj.NPT_INFO.VERSION           = _ENPT.VERSIONX;
            fobj.NPT_INFO.RETURN_STATUS     = _ENPT.RETURNSTATUS;
            fobj.NPT_INFO.LAST_UPD_DATE     = CopMvcUtil.ConvDate(_ENPT.LASTUPDATEDATEX);
            fobj.NPT_INFO.RECORDING_DATE    = CopMvcUtil.ConvDate(_ENPT.RECORDINGDATEX);
            fobj.NPT_INFO.EXTENSION_DATE    = CopMvcUtil.ConvDate(_ENPT.EXTENSIONDATEX);
            fobj.NPT_INFO.SEQUENCE          = _ENPT.SEQUENCENUMBER;
            fobj.NPT_INFO.ADJUSTMENT_REF_NO = _ENPT.ADJUSTMENTREFERENCENUM;
            fobj.NPT_INFO.USER_ID           = _ENPT.USERID;
            fobj.NPT_INFO.RESIDENT_RATE     = CopMvcUtil.ConvDigitToDouble9(_ENPT.RATERES);

            fobj.NPT_INFO.BASE_RESIDENT_RATE = CopMvcUtil.ConvDigitToDouble9(_ENPT.BASERATERES);

            fobj.NPT_INFO.NON_RES_RATE = CopMvcUtil.ConvDigitToDouble9(_ENPT.RATENONRES);

            fobj.NPT_INFO.BASE_NON_RES_RATE = CopMvcUtil.ConvDigitToDouble9(_ENPT.BASERATENONRES);

            fobj.NPT_INFO.CORP_PARTNER_IND = _ENPT.CORPPARTNERIND;


            fobj.NPT_INFO.PREPARER_NAME = _ENPT.PREPARERNAME;

            if ((CopMvcUtil.GetLong(_ENPT.PREPARERPHONE) == 0))
            {
                fobj.NPT_INFO.PREPARER_PHONE = string.Empty;
            }
            else
            {
                fobj.NPT_INFO.PREPARER_PHONE = CopMvcUtil.GetString(_ENPT.PREPARERPHONE);
            }


            fobj.NPT_INFO.PREPARER_PHONE_EXT     = _ENPT.PREPARERPHONEEXT;
            fobj.NPT_INFO.PREPARER_IP_ADDRESS    = _ENPT.PREPARERIPADDRESS;
            fobj.NPT_INFO.PREPARER_EMAIL_ADDRESS = _ENPT.PREPAREREMAILADDRESS;
            fobj.NPT_INFO.PREPARER_WHO           = _ENPT.PREPARERTYPE;

            //NPT_PG1
            fobj.NPT_PG1 = new NPT_PG1();

            fobj.NPT_PG1.RESIDENT_INCOME     = CopMvcUtil.ConvDigitToCurrency(_EAMTS.RESTAXABLEINCOMEX);
            fobj.NPT_PG1.RESIDENT_INCOME_TAX = CopMvcUtil.ConvDigitToCurrency(_EAMTS.RESTAXDUEX);
            //
            fobj.NPT_PG1.RESIDENT_BASE_INCOME_TAXABLE = CopMvcUtil.ConvDigitToCurrency(_EAMTS.RESBASERATETAXABLEX);
            fobj.NPT_PG1.RESIDENT_BASE_INCOME_TAX     = CopMvcUtil.ConvDigitToCurrency(_EAMTS.RESBASERATETAXX);
            fobj.NPT_PG1.RESIDENT_TOTAL_TAX           = CopMvcUtil.ConvDigitToCurrency(_EAMTS.TOTALRESTAXX);
            //
            fobj.NPT_PG1.NON_RES_INCOME     = CopMvcUtil.ConvDigitToCurrency(_EAMTS.NONRESTAXINCOMEX);
            fobj.NPT_PG1.NON_RES_INCOME_TAX = CopMvcUtil.ConvDigitToCurrency(_EAMTS.NONRESTAXDUEX);
            //
            fobj.NPT_PG1.NON_RES_BASE_INCOME_TAXABLE = CopMvcUtil.ConvDigitToCurrency(_EAMTS.NONRESBASERATETAXABLEX);
            fobj.NPT_PG1.NON_RES_BASE_INCOME_TAX     = CopMvcUtil.ConvDigitToCurrency(_EAMTS.NONRESBASERATETAXX);
            fobj.NPT_PG1.NON_RES_TOTAL_TAX           = CopMvcUtil.ConvDigitToCurrency(_EAMTS.TOTALNONRESTAXX);
            //
            fobj.NPT_PG1.TOTAL_TAX         = CopMvcUtil.ConvDigitToCurrency(_EAMTS.TOTALTAXDUE1X);
            fobj.NPT_PG1.BPT_TAX_CREDIT    = CopMvcUtil.ConvDigitToCurrency(_EAMTS.BPTCREDITX);
            fobj.NPT_PG1.OTHER_TAX_CREDIT  = CopMvcUtil.ConvDigitToCurrency(_EAMTS.OTHERX);
            fobj.NPT_PG1.TOTAL_PAY_CREDITS = CopMvcUtil.ConvDigitToCurrency(_EAMTS.TOTALCREDITSX);
            fobj.NPT_PG1.TAX_DUE           = CopMvcUtil.ConvDigitToCurrency(_EAMTS.TOTALTAXDUEX);
            fobj.NPT_PG1.INTEREST_PENALTY  = CopMvcUtil.ConvDigitToCurrency(_EAMTS.INTERESTPENALTYX);
            fobj.NPT_PG1.TOTAL_DUE         = CopMvcUtil.ConvDigitToCurrency(_EAMTS.TOTALTAXDUEX);
            fobj.NPT_PG1.OVERPAY           = CopMvcUtil.ConvDigitToCurrency(_EAMTS.TAXOVERPAIDX);
            fobj.NPT_PG1.LINE11            = CopMvcUtil.ConvDigitToCurrency(_EAMTS.NETPROFITESTX);
            //
            fobj.NPT_PG1.OVERPAY_AVAILABLE = CopMvcUtil.ConvDigitToCurrency(_EAMTS.OVERPAYMENTAVAILX);//newly added
            //
            fobj.NPT_PG1.REFUND      = CopMvcUtil.ConvDigitToCurrency(_EAMTS.REFUNDAMTX);
            fobj.NPT_PG1.BPT_OVERPAY = CopMvcUtil.ConvDigitToCurrency(_EAMTS.BPTOVERPAYMENTX);
            fobj.NPT_PG1.NPT_OVERPAY = CopMvcUtil.ConvDigitToCurrency(_EAMTS.NPTOVERPAYMENTX);
            //added 2015 corporation Tax
            fobj.NPT_PG1.CORP_PARTNER_PERCENT = _EAMTS.CORPPARTNERPERCENTX;

            return(fobj);
        }