Subversion Repositories Integrator Subversion

Rev

Rev 546 | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 546 Rev 548
Line 39... Line 39...
39
39
40
import br.com.ec.core.exception.NegocioException;
40
import br.com.ec.core.exception.NegocioException;
41
import br.com.ec.core.generic.identidade.Identidade;
41
import br.com.ec.core.generic.identidade.Identidade;
42
import br.com.ec.core.interfaces.Alterar;
42
import br.com.ec.core.interfaces.Alterar;
43
import br.com.ec.core.interfaces.Cadastrar;
43
import br.com.ec.core.interfaces.Cadastrar;
-
 
44
import br.com.ec.core.util.DataUtils;
44
import br.com.ec.core.util.StringUtil;
45
import br.com.ec.core.util.StringUtil;
45
import br.com.ec.core.util.VerificadorUtil;
46
import br.com.ec.core.util.VerificadorUtil;
46
import br.com.ec.domain.dto.NotaFiscalProdutoDTO;
47
import br.com.ec.domain.dto.NotaFiscalProdutoDTO;
47
import br.com.ec.domain.model.nfe.TipoModeloNotaFiscal;
48
import br.com.ec.domain.model.nfe.TipoModeloNotaFiscal;
48
import br.com.ec.domain.model.nfe.TipoNotaFiscal;
49
import br.com.ec.domain.model.nfe.TipoNotaFiscal;
Line 882... Line 883...
882
                this.tipoNotaFiscal = TipoNotaFiscal.NFE_IMPORTACAO.getValor();
883
                this.tipoNotaFiscal = TipoNotaFiscal.NFE_IMPORTACAO.getValor();
883
                this.tipoNotaFiscalNaturezaOperacao = TipoNotaFiscalNaturezaOperacao.IMPORTACAO_3102_10.getValor();
884
                this.tipoNotaFiscalNaturezaOperacao = TipoNotaFiscalNaturezaOperacao.IMPORTACAO_3102_10.getValor();
884
                this.serie = TipoNotaFiscal.NFE_IMPORTACAO.getSerie();
885
                this.serie = TipoNotaFiscal.NFE_IMPORTACAO.getSerie();
885
                this.tipoNotaFiscalIntermediario = TipoNotaFiscalIntermediario.OPERACAO_SEM_INTERMEDIADOR_0.getValor();
886
                this.tipoNotaFiscalIntermediario = TipoNotaFiscalIntermediario.OPERACAO_SEM_INTERMEDIADOR_0.getValor();
886
        }
887
        }
-
 
888
-
 
889
        @Transient
-
 
890
        public String montarDadosDaNotaFiscal() {
-
 
891
                StringBuilder conteudo = new StringBuilder();
-
 
892
                conteudo.append("NOTA FISCAL: " + this.getNumeroNotaFiscal() + "\n");
-
 
893
                conteudo.append("CHAVE: " + this.getChave() + "\n");
-
 
894
                conteudo.append("TIPO: " + this.getDescricaoDoTipoNotaFiscal() + "\n");
-
 
895
//              conteudo.append("" + "\n");
-
 
896
                conteudo.append("" + "\n");
-
 
897
                return conteudo.toString();
-
 
898
        }
-
 
899
       
-
 
900
        /*
-
 
901
        public String montarDadosDaVenda(List<Lancamento> lancamentos, List<VendaFormaPagamento> pagamentos) {
-
 
902
                StringBuilder conteudo = new StringBuilder();
-
 
903
                //conteudo.append("OPERAÇÃO REALIZADA POR: " + this.getUsuario().getNome() + "\n");
-
 
904
                conteudo.append("VENDA ID: " + this.getSequencial() + "\n");
-
 
905
                conteudo.append("DATA: " + DataUtils.converterDataComHorarioParaString(this.getDataVenda()) + "\n");
-
 
906
                conteudo.append("LOJA: " + this.getLoja().getDescricao() + "\n");
-
 
907
                conteudo.append("VENDEDOR: " + this.getVendedor().getNomeDaPessoa() + "\n");
-
 
908
                conteudo.append("TOTAL: " + valorTotalVenda(lancamentos) + "\n");
-
 
909
                conteudo.append("OBS.: " + this.getObservacao() + "\n");
-
 
910
                if (VerificadorUtil.naoEstaNuloOuVazio(this.getJustificativaParaExcluir())) {
-
 
911
                        conteudo.append("JUSTIFICATIVA: " + this.getJustificativaParaExcluir() + "\n");
-
 
912
                } else {
-
 
913
                        conteudo.append("SEM JUSTIFICATIVA\n");
-
 
914
                }
-
 
915
                conteudo.append("__________________________________________________\n\n");
-
 
916
                for (Lancamento lancamento : lancamentos) {
-
 
917
                        conteudo.append(lancamento.getProduto().getCodigoProdutoPadrao() + " | ");
-
 
918
                        conteudo.append(lancamento.getProduto().getDescricaoComModeloCompleta() + ", ");
-
 
919
                        conteudo.append("R$" + lancamento.getValorVenda());
-
 
920
                        if (lancamento.comDescontos()) {
-
 
921
                                conteudo.append(" (COM DESCONTO DE R$" + lancamento.valorDescontos() + ")");
-
 
922
                        }
-
 
923
                        conteudo.append("\n");
-
 
924
                }
-
 
925
                conteudo.append("__________________________________________________\n\n");
-
 
926
                for (VendaFormaPagamento pagamento : pagamentos) {
-
 
927
                        if (VerificadorUtil.naoEstaNulo(pagamento.getBandeiraCartao())) {
-
 
928
                                conteudo.append(pagamento.getFormaPagamento().getDescricao() + " - " + pagamento.getBandeiraCartao().getDescricao() + ": R$" +  pagamento.getValorPagamento() + "\n");
-
 
929
                        } else {
-
 
930
                                conteudo.append(pagamento.getFormaPagamento().getDescricao() + ": R$" + pagamento.getValorPagamento() + "\n");
-
 
931
                        }
-
 
932
                        conteudo.append("\n");
-
 
933
                }
-
 
934
                return conteudo.toString();
-
 
935
        }
-
 
936
        */
887
       
937
       
888
}
938
}