Exemple #1
0
 private void MontaDET_ISQN(Det det)
 {
     _xmlString.Append("<ISSQN>");
     _xmlString.Append("    <vBC>" + det.Imposto.Issqn.vBC + "</vBC>");
     _xmlString.Append("    <vAliq>" + det.Imposto.Issqn.vAliq + "</vAliq>");
     _xmlString.Append("    <vISSQN>" + det.Imposto.Issqn.vISSQN + "</vISSQN>");
     _xmlString.Append("    <cMunFG>" + det.Imposto.Issqn.cMunFG + "</cMunFG>");
     _xmlString.Append("    <cListServ>" + det.Imposto.Issqn.cListServ + "</cListServ>");
     _xmlString.Append("    <indISS>" + det.Imposto.Issqn.indISS + "</indISS>");
     _xmlString.Append("    <indIncentivo>" + det.Imposto.Issqn.indIncentivo + "</indIncentivo>");
     _xmlString.Append("</ISSQN>");
 }
Exemple #2
0
        private void MontaDET_COFINS(Det det)
        {
            _xmlString.Append("<COFINS>");

            switch (det.cofins)
            {
            case GetCofins.CST01_02:
                _xmlString.Append("<COFINSAliq>");
                _xmlString.Append("    <CST>" + det.Imposto.Cofins.CST + "</CST>");
                _xmlString.Append("    <vBC>" + det.Imposto.Cofins.vBC + "</vBC>");
                _xmlString.Append("    <pCOFINS>" + det.Imposto.Cofins.pCOFINS + "</pCOFINS>");
                _xmlString.Append("    <vCOFINS>" + det.Imposto.Cofins.vCOFINS + "</vCOFINS>");
                _xmlString.Append("</COFINSAliq>");
                break;

            case GetCofins.CST03:
                _xmlString.Append("<COFINSQtde>");
                _xmlString.Append("    <CST>" + det.Imposto.Cofins.CST + "</CST>");
                _xmlString.Append("    <qBCProd>" + det.Imposto.Cofins.qBCProd + "</qBCProd>");
                _xmlString.Append("    <vAliqProd>" + det.Imposto.Cofins.vAliqProd + "</vAliqProd>");
                _xmlString.Append("    <vCOFINS>" + det.Imposto.Cofins.vCOFINS + "</vCOFINS>");
                _xmlString.Append("</COFINSQtde>");
                break;

            case GetCofins.CST04_09:
                _xmlString.Append("<COFINSNT>");
                _xmlString.Append("    <CST>" + det.Imposto.Cofins.CST + "</CST>");
                _xmlString.Append("</COFINSNT>");
                break;

            case GetCofins.CST99:
                _xmlString.Append("<COFINSOutr>");
                _xmlString.Append("    <CST>" + det.Imposto.Cofins.CST + "</CST>");

                if (!string.IsNullOrEmpty(det.Imposto.Cofins.vBC) &&
                    !string.IsNullOrEmpty(det.Imposto.Cofins.pCOFINS))
                {
                    _xmlString.Append("    <vBC>" + det.Imposto.Cofins.vBC + "</vBC>");
                    _xmlString.Append("    <pCOFINS>" + det.Imposto.Cofins.pCOFINS + "</pCOFINS>");
                }
                else
                {
                    _xmlString.Append("    <qBCProd>" + det.Imposto.Cofins.qBCProd + "</qBCProd>");
                    _xmlString.Append("    <vAliqProd>" + det.Imposto.Cofins.vAliqProd + "</vAliqProd>");
                }

                _xmlString.Append("    <vCOFINS>" + det.Imposto.Cofins.vCOFINS + "</vCOFINS>");
                _xmlString.Append("</COFINSOutr>");
                break;
            }

            _xmlString.Append("</COFINS>");
        }
Exemple #3
0
        private void MontaDET_PIS(Det det)
        {
            _xmlString.Append("<PIS>");

            switch (det.pis)
            {
            case GetPis.PIS01_02:
                _xmlString.Append("<PISAliq>");
                _xmlString.Append("    <CST>" + det.Imposto.Pis.CST + "</CST>");
                _xmlString.Append("    <vBC>" + det.Imposto.Pis.vBC + "</vBC>");
                _xmlString.Append("    <pPIS>" + det.Imposto.Pis.pPIS + "</pPIS>");
                _xmlString.Append("    <vPIS>" + det.Imposto.Pis.vPIS + "</vPIS>");
                _xmlString.Append("</PISAliq>");
                break;

            case GetPis.PIS03:
                _xmlString.Append("<PISQtde>");
                _xmlString.Append("    <CST>" + det.Imposto.Pis.CST + "</CST>");
                _xmlString.Append("    <qBCProd>" + det.Imposto.Pis.qBCProd + "</qBCProd>");
                _xmlString.Append("    <vAliqProd>" + det.Imposto.Pis.vAliqProd + "</vAliqProd>");
                _xmlString.Append("    <vPIS>" + det.Imposto.Pis.vPIS + "</vPIS>");
                _xmlString.Append("</PISQtde>");
                break;

            case GetPis.PIS04_09:
                _xmlString.Append("<PISNT>");
                _xmlString.Append("    <CST>" + det.Imposto.Pis.CST + "</CST>");
                _xmlString.Append("</PISNT>");
                break;

            case GetPis.PIS99:
                _xmlString.Append("<PISOutr>");
                _xmlString.Append("    <CST>" + det.Imposto.Pis.CST + "</CST>");

                if (!string.IsNullOrEmpty(det.Imposto.Pis.vBC) && !string.IsNullOrEmpty(det.Imposto.Pis.pPIS))
                {
                    _xmlString.Append("    <vBC>" + det.Imposto.Pis.vBC + "</vBC>");
                    _xmlString.Append("    <pPIS>" + det.Imposto.Pis.pPIS + "</pPIS>");
                }
                else
                {
                    _xmlString.Append("    <qBCProd>" + det.Imposto.Pis.qBCProd + "</qBCProd>");
                    _xmlString.Append("    <vAliqProd>" + det.Imposto.Pis.vAliqProd + "</vAliqProd>");
                }

                _xmlString.Append("    <vPIS>" + det.Imposto.Pis.vPIS + "</vPIS>");
                _xmlString.Append("</PISOutr>");
                break;
            }

            _xmlString.Append("</PIS>");
        }
Exemple #4
0
        private void MontaDET_IPI(Det det)
        {
            if (!string.IsNullOrEmpty(det.Imposto.Ipi.cIEnq))
            {
                _xmlString.Append("<IPI>");

                _xmlString.Append("<cEnq>" + det.Imposto.Ipi.cIEnq + "</cEnq>");

                switch (det.ipi)
                {
                case GetIpi.IPI00_49_50_99:
                    _xmlString.Append("<IPITrib>");

                    _xmlString.Append("    <CST>" + det.Imposto.Ipi.CST + "</CST>");

                    if (!string.IsNullOrEmpty(det.Imposto.Ipi.vBC))
                    {
                        _xmlString.Append("    <vBC>" + det.Imposto.Ipi.vBC + "</vBC>");
                        _xmlString.Append("    <pIPI>" + det.Imposto.Ipi.pIPI + "</pIPI>");
                    }
                    else
                    {
                        _xmlString.Append("    <qUnid>" + det.Imposto.Ipi.qUnid + "</qUnid>");
                        _xmlString.Append("    <vUnid>" + det.Imposto.Ipi.vUnid + "</vUnid>");
                    }

                    _xmlString.Append("    <vIPI>" + det.Imposto.Ipi.vIPI + "</vIPI>");

                    _xmlString.Append("</IPITrib>");
                    break;

                case GetIpi.IPI01_55:
                    _xmlString.Append("<IPINT>");
                    _xmlString.Append("    <CST>" + det.Imposto.Ipi.CST + "</CST>");
                    _xmlString.Append("</IPINT>");
                    break;
                }

                _xmlString.Append("</IPI>");
            }
        }
Exemple #5
0
 public void AddDet(Det det)
 {
     DetList.Add(det);
 }
Exemple #6
0
        private void MontaDET_ICMS(Det det)
        {
            _xmlString.Append("<ICMS>");

            switch (det.icms)
            {
            case GetIcms.ICMS00:
                _xmlString.Append("<ICMS00>");
                _xmlString.Append("    <orig>" + det.Imposto.Icms.orig + "</orig>");
                _xmlString.Append("    <CST>" + det.Imposto.Icms.CST + "</CST>");
                _xmlString.Append("    <modBC>" + det.Imposto.Icms.modBC + "</modBC>");
                _xmlString.Append("    <vBC>" + det.Imposto.Icms.vBC + "</vBC>");
                _xmlString.Append("    <pICMS>" + det.Imposto.Icms.pICMS + "</pICMS>");
                _xmlString.Append("    <vICMS>" + det.Imposto.Icms.vICMS + "</vICMS>");
                _xmlString.Append("</ICMS00>");
                break;

            case GetIcms.ICMS10:
                _xmlString.Append("<ICMS10>");
                _xmlString.Append("    <orig>" + det.Imposto.Icms.orig + "</orig>");
                _xmlString.Append("    <CST>" + det.Imposto.Icms.CST + "</CST>");
                _xmlString.Append("    <modBC>" + det.Imposto.Icms.modBC + "</modBC>");
                _xmlString.Append("    <vBC>" + det.Imposto.Icms.vBC + "</vBC>");
                _xmlString.Append("    <pICMS>" + det.Imposto.Icms.pICMS + "</pICMS>");
                _xmlString.Append("    <vICMS>" + det.Imposto.Icms.vICMS + "</vICMS>");
                _xmlString.Append("    <modBCST>" + det.Imposto.Icms.modBCST + "</modBCST>");

                if (!string.IsNullOrEmpty(det.Imposto.Icms.pMVAST))
                {
                    _xmlString.Append("    <pMVAST>" + det.Imposto.Icms.pMVAST + "</pMVAST>");
                }

                if (!string.IsNullOrEmpty(det.Imposto.Icms.pRedBCST))
                {
                    _xmlString.Append("    <pRedBCST>" + det.Imposto.Icms.pRedBCST + "</pRedBCST>");
                }

                _xmlString.Append("    <vBCST>" + det.Imposto.Icms.vBCST + "</vBCST>");
                _xmlString.Append("    <pICMSST>" + det.Imposto.Icms.pICMSST + "</pICMSST>");
                _xmlString.Append("    <vICMSST>" + det.Imposto.Icms.vICMSST + "</vICMSST>");

                _xmlString.Append("</ICMS10>");
                break;

            case GetIcms.ICMS20:
                _xmlString.Append("<ICMS20>");
                _xmlString.Append("    <orig>" + det.Imposto.Icms.orig + "</orig>");
                _xmlString.Append("    <CST>" + det.Imposto.Icms.CST + "</CST>");
                _xmlString.Append("    <modBC>" + det.Imposto.Icms.modBC + "</modBC>");
                _xmlString.Append("    <pRedBC>" + det.Imposto.Icms.pRedBC + "</pRedBC>");
                _xmlString.Append("    <vBC>" + det.Imposto.Icms.vBC + "</vBC>");
                _xmlString.Append("    <pICMS>" + det.Imposto.Icms.pICMS + "</pICMS>");
                _xmlString.Append("    <vICMS>" + det.Imposto.Icms.vICMS + "</vICMS>");
                _xmlString.Append("</ICMS20>");
                break;

            case GetIcms.ICMS30:
                _xmlString.Append("<ICMS30>");
                _xmlString.Append("    <orig>" + det.Imposto.Icms.orig + "</orig>");
                _xmlString.Append("    <CST>" + det.Imposto.Icms.CST + "</CST>");
                _xmlString.Append("    <modBCST>" + det.Imposto.Icms.modBCST + "</modBCST>");
                _xmlString.Append("    <pMVAST>" + det.Imposto.Icms.pMVAST + "</pMVAST>");
                _xmlString.Append("    <pRedBCST>" + det.Imposto.Icms.pRedBCST + "</pRedBCST>");
                _xmlString.Append("    <vBCST>" + det.Imposto.Icms.vBCST + "</vBCST>");
                _xmlString.Append("    <pICMSST>" + det.Imposto.Icms.pICMSST + "</pICMSST>");
                _xmlString.Append("    <vICMSST>" + det.Imposto.Icms.vICMSST + "</vICMSST>");
                _xmlString.Append("</ICMS30>");
                break;

            case GetIcms.ICMS40_50:
                _xmlString.Append("<ICMS40>");
                _xmlString.Append("    <orig>" + det.Imposto.Icms.orig + "</orig>");
                _xmlString.Append("    <CST>" + det.Imposto.Icms.CST + "</CST>");
                _xmlString.Append("</ICMS40>");
                break;

            case GetIcms.ICMS51:
                _xmlString.Append("<ICMS51>");
                _xmlString.Append("    <orig>" + det.Imposto.Icms.orig + "</orig>");
                _xmlString.Append("    <CST>" + det.Imposto.Icms.CST + "</CST>");
                _xmlString.Append("</ICMS51>");

                if (!string.IsNullOrEmpty(det.Imposto.Icms.pRedBCST))
                {
                    _xmlString.Append("    <modBC>" + det.Imposto.Icms.modBC + "</modBC>");
                }

                if (!string.IsNullOrEmpty(det.Imposto.Icms.pRedBCST))
                {
                    _xmlString.Append("    <pRedBC>" + det.Imposto.Icms.pRedBC + "</pRedBC>");
                }

                if (!string.IsNullOrEmpty(det.Imposto.Icms.pRedBCST))
                {
                    _xmlString.Append("    <vBC>" + det.Imposto.Icms.vBC + "</vBC>");
                }

                if (!string.IsNullOrEmpty(det.Imposto.Icms.pRedBCST))
                {
                    _xmlString.Append("    <pICMS>" + det.Imposto.Icms.pICMS + "</pICMS>");
                }

                if (!string.IsNullOrEmpty(det.Imposto.Icms.pRedBCST))
                {
                    _xmlString.Append("    <vICMS>" + det.Imposto.Icms.vICMS + "</vICMS>");
                }
                break;

            case GetIcms.ICMS60:
                _xmlString.Append("<ICMS60>");
                _xmlString.Append("    <orig>" + det.Imposto.Icms.orig + "</orig>");
                _xmlString.Append("    <CST>" + det.Imposto.Icms.CST + "</CST>");
                _xmlString.Append("</ICMS60>");
                break;

            case GetIcms.ICMS70:
                _xmlString.Append("<ICMS70>");
                _xmlString.Append("    <orig>" + det.Imposto.Icms.orig + "</orig>");
                _xmlString.Append("    <CST>" + det.Imposto.Icms.CST + "</CST>");
                _xmlString.Append("    <modBC>" + det.Imposto.Icms.modBC + "</modBC>");
                _xmlString.Append("    <pRedBC>" + det.Imposto.Icms.pRedBC + "</pRedBC>");
                _xmlString.Append("    <vBC>" + det.Imposto.Icms.vBC + "</vBC>");
                _xmlString.Append("    <pICMS>" + det.Imposto.Icms.pICMS + "</pICMS>");
                _xmlString.Append("    <vICMS>" + det.Imposto.Icms.vICMS + "</vICMS>");
                _xmlString.Append("    <modBCST>" + det.Imposto.Icms.modBCST + "</modBCST>");

                if (!string.IsNullOrEmpty(det.Imposto.Icms.pMVAST))
                {
                    _xmlString.Append("    <pMVAST>" + det.Imposto.Icms.pMVAST + "</pMVAST>");
                }

                if (!string.IsNullOrEmpty(det.Imposto.Icms.pRedBCST))
                {
                    _xmlString.Append("    <pRedBCST>" + det.Imposto.Icms.pRedBCST + "</pRedBCST>");
                }

                _xmlString.Append("    <vBCST>" + det.Imposto.Icms.vBCST + "</vBCST>");
                _xmlString.Append("    <pICMSST>" + det.Imposto.Icms.pICMSST + "</pICMSST>");
                _xmlString.Append("    <vICMSST>" + det.Imposto.Icms.vICMSST + "</vICMSST>");
                _xmlString.Append("</ICMS70>");
                break;

            case GetIcms.ICMS90:
                _xmlString.Append("<ICMS90>");
                _xmlString.Append("    <orig>" + det.Imposto.Icms.orig + "</orig>");
                _xmlString.Append("    <CST>" + det.Imposto.Icms.CST + "</CST>");
                _xmlString.Append("    <modBC>" + det.Imposto.Icms.modBC + "</modBC>");
                _xmlString.Append("    <vBC>" + det.Imposto.Icms.vBC + "</vBC>");

                if (!string.IsNullOrEmpty(det.Imposto.Icms.pRedBC))
                {
                    _xmlString.Append("    <pRedBC>" + det.Imposto.Icms.pRedBC + "</pRedBC>");
                }

                _xmlString.Append("    <pICMS>" + det.Imposto.Icms.pICMS + "</pICMS>");
                _xmlString.Append("    <vICMS>" + det.Imposto.Icms.vICMS + "</vICMS>");
                _xmlString.Append("    <modBCST>" + det.Imposto.Icms.modBCST + "</modBCST>");

                if (!string.IsNullOrEmpty(det.Imposto.Icms.pMVAST))
                {
                    _xmlString.Append("    <pMVAST>" + det.Imposto.Icms.pMVAST + "</pMVAST>");
                }

                if (!string.IsNullOrEmpty(det.Imposto.Icms.pRedBCST))
                {
                    _xmlString.Append("    <pRedBCST>" + det.Imposto.Icms.pRedBCST + "</pRedBCST>");
                }

                _xmlString.Append("    <vBCST>" + det.Imposto.Icms.vBCST + "</vBCST>");
                _xmlString.Append("    <pICMSST>" + det.Imposto.Icms.pICMSST + "</pICMSST>");
                _xmlString.Append("    <vICMSST>" + det.Imposto.Icms.vICMSST + "</vICMSST>");
                _xmlString.Append("</ICMS90>");
                break;

            case GetIcms.ICMS101:
                _xmlString.Append("<ICMSSN101>");
                _xmlString.Append("    <orig>" + det.Imposto.Icms.orig + "</orig>");
                _xmlString.Append("    <CSOSN>" + det.Imposto.Icms.CSOSN + "</CSOSN>");
                _xmlString.Append("    <pCredSN>" + det.Imposto.Icms.pCredSN + "</pCredSN>");
                _xmlString.Append("    <vCredICMSSN>" + det.Imposto.Icms.vCredICMSSN + "</vCredICMSSN>");
                _xmlString.Append("</ICMSSN101>");
                break;

            case GetIcms.ICMS102_400:
                _xmlString.Append("<ICMSSN102>");
                _xmlString.Append("    <orig>" + det.Imposto.Icms.orig + "</orig>");
                _xmlString.Append("    <CSOSN>" + det.Imposto.Icms.CSOSN + "</CSOSN>");
                _xmlString.Append("</ICMSSN102>");
                break;

            case GetIcms.ICMS201:
                _xmlString.Append("<ICMSSN201>");
                _xmlString.Append("    <orig>" + det.Imposto.Icms.orig + "</orig>");
                _xmlString.Append("    <CSOSN>" + det.Imposto.Icms.CSOSN + "</CSOSN>");
                _xmlString.Append("    <modBCST>" + det.Imposto.Icms.modBCST + "</modBCST>");

                if (!string.IsNullOrEmpty(det.Imposto.Icms.pRedBCST))
                {
                    _xmlString.Append("    <pMVAST>" + det.Imposto.Icms.pMVAST + "</pMVAST>");
                }

                if (!string.IsNullOrEmpty(det.Imposto.Icms.pRedBCST))
                {
                    _xmlString.Append("    <pRedBCST>" + det.Imposto.Icms.pRedBCST + "</pRedBCST>");
                }

                _xmlString.Append("    <vBCST>" + det.Imposto.Icms.vBCST + "</vBCST>");
                _xmlString.Append("    <pICMSST>" + det.Imposto.Icms.pICMSST + "</pICMSST>");
                _xmlString.Append("    <vICMSST>" + det.Imposto.Icms.vICMSST + "</vICMSST>");

                _xmlString.Append("</ICMSSN201>");
                break;

            case GetIcms.ICMS202:
                _xmlString.Append("<ICMSSN202>");
                _xmlString.Append("    <orig>" + det.Imposto.Icms.orig + "</orig>");
                _xmlString.Append("    <CSOSN>" + det.Imposto.Icms.CSOSN + "</CSOSN>");
                _xmlString.Append("    <modBCST>" + det.Imposto.Icms.modBCST + "</modBCST>");

                if (!string.IsNullOrEmpty(det.Imposto.Icms.pMVAST))
                {
                    _xmlString.Append("    <pMVAST>" + det.Imposto.Icms.pMVAST + "</pMVAST>");
                }

                if (!string.IsNullOrEmpty(det.Imposto.Icms.pRedBCST))
                {
                    _xmlString.Append("    <pRedBCST>" + det.Imposto.Icms.pRedBCST + "</pRedBCST>");
                }

                _xmlString.Append("    <vBCST>" + det.Imposto.Icms.vBCST + "</vBCST>");
                _xmlString.Append("    <pICMSST>" + det.Imposto.Icms.pICMSST + "</pICMSST>");
                _xmlString.Append("    <vICMSST>" + det.Imposto.Icms.vICMSST + "</vICMSST>");

                _xmlString.Append("</ICMSSN202>");
                break;

            case GetIcms.ICMS500:
                _xmlString.Append("<ICMSSN500>");
                _xmlString.Append("    <orig>" + det.Imposto.Icms.orig + "</orig>");
                _xmlString.Append("    <CSOSN>" + det.Imposto.Icms.CSOSN + "</CSOSN>");
                _xmlString.Append("    <vBCSTRet>" + det.Imposto.Icms.vBCSTRet + "</vBCSTRet>");
                _xmlString.Append("    <vICMSSTRet>" + det.Imposto.Icms.vICMSSTRet + "</vICMSSTRet>");
                _xmlString.Append("</ICMSSN500>");
                break;

            case GetIcms.ICMS900:
                _xmlString.Append("<ICMSSN900>");
                _xmlString.Append("    <orig>" + det.Imposto.Icms.orig + "</orig>");
                _xmlString.Append("    <CSOSN>" + det.Imposto.Icms.CSOSN + "</CSOSN>");
                _xmlString.Append("    <modBC>" + det.Imposto.Icms.modBC + "</modBC>");
                _xmlString.Append("    <vBC>" + det.Imposto.Icms.vBC + "</vBC>");

                if (!string.IsNullOrEmpty(det.Imposto.Icms.pRedBC))
                {
                    _xmlString.Append("    <pRedBC>" + det.Imposto.Icms.pRedBC + "</pRedBC>");
                }

                _xmlString.Append("    <pICMS>" + det.Imposto.Icms.pICMS + "</pICMS>");
                _xmlString.Append("    <vICMS>" + det.Imposto.Icms.vICMS + "</vICMS>");
                _xmlString.Append("    <modBCST>" + det.Imposto.Icms.modBCST + "</modBCST>");

                if (!string.IsNullOrEmpty(det.Imposto.Icms.pMVAST))
                {
                    _xmlString.Append("    <pMVAST>" + det.Imposto.Icms.pMVAST + "</pMVAST>");
                }

                if (!string.IsNullOrEmpty(det.Imposto.Icms.pRedBCST))
                {
                    _xmlString.Append("    <pRedBCST>" + det.Imposto.Icms.pRedBCST + "</pRedBCST>");
                }

                _xmlString.Append("    <vBCST>" + det.Imposto.Icms.vBCST + "</vBCST>");
                _xmlString.Append("    <pICMSST>" + det.Imposto.Icms.pICMSST + "</pICMSST>");
                _xmlString.Append("    <vICMSST>" + det.Imposto.Icms.vICMSST + "</vICMSST>");
                _xmlString.Append("    <pCredSN>" + det.Imposto.Icms.pCredSN + "</pCredSN>");
                _xmlString.Append("    <vCredICMSSN>" + det.Imposto.Icms.vCredICMSSN + "</vCredICMSSN>");
                _xmlString.Append("</ICMSSN900>");
                break;
            }

            _xmlString.Append("</ICMS>");
        }