Exemple #1
0
 public override void Gravar()
 {
     NCM t = new NCM();
     t.Descricao = "NCM de teste";
     t.NCM = new Random().Next(10000, 1000000).ToString().PadRight(8, '0');
     GUID = t.Save();
 }
Exemple #2
0
        public override void Gravar()
        {
            ITributoRegra t = new TributoRegra();
            t.Descricao = "Teste Regra";
            DCT.Tributo tributo = new DCT.Tributo();

            tributo.Descricao = "IPI";
            tributo.Aliquotas = new List<IAliquotaTributo>
            {
                new DCT.AliquotaTributo{Valor = new Random().NextDouble(1,10)},
                new DCT.AliquotaTributo{Valor = new Random().NextDouble(1,10)},
                new DCT.AliquotaTributo{Valor = new Random().NextDouble(1,10)}
            };

            tributo.Save();
            // t.Aliquota = tributo.Aliquotas[0];
            NCM ncm = new NCM();
            ncm.Descricao = "NCM de teste";
            ncm.NCM = new Random().Next(10000, 1000000).ToString().PadRight(8, '0');
            ncm.Save();

            IGrupoItem grupoItem = new GrupoItem();
            grupoItem.Descricao = "Borracha";
            grupoItem.Parent = null;
            grupoItem.Classificacao = "03-Borracha";
            grupoItem.ClassificacaoAnalitica = false;
            grupoItem.Save();
            IItem item = ServicoTest.CriarServico();
            item.Save();
            t.Filtros.Add(new OpenPOS.Data.Regra.Tributo.TributoRegraFiltro() { NCM = ncm });
            t.Filtros.Add(new OpenPOS.Data.Regra.Tributo.TributoRegraFiltro() { GrupoItem = grupoItem });
            t.Filtros.Add(new OpenPOS.Data.Regra.Tributo.TributoRegraFiltro() { Item = item });
            t.Aliquotas.Add(new OpenPOS.Data.Regra.Tributo.TributoRegraAliquota() { Aliquota = tributo.Aliquotas[0] });
            GUID = t.Save();
        }
Exemple #3
0
 public override void Editar()
 {
     NCM t = new NCM(GUID);
     t.Descricao = "NCM de teste editado";
     t.Save();
 }