Subversion Repositories Integrator Subversion

Rev

Rev 147 | Rev 195 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 147 Rev 161
Line 23... Line 23...
23
import br.com.ec.domain.service.loja.LojaService;
23
import br.com.ec.domain.service.loja.LojaService;
24
import br.com.ec.domain.service.produto.ProdutoService;
24
import br.com.ec.domain.service.produto.ProdutoService;
25
import br.com.ec.domain.service.produtodaloja.ProdutoLojaService;
25
import br.com.ec.domain.service.produtodaloja.ProdutoLojaService;
26
import br.com.ec.domain.service.seguranca.ContextoSeguranca;
26
import br.com.ec.domain.service.seguranca.ContextoSeguranca;
27
import br.edu.cesmac.core.generic.GenericService;
27
import br.edu.cesmac.core.generic.GenericService;
-
 
28
import br.edu.cesmac.core.util.VerificadorUtil;
28
import br.edu.cesmac.web.exception.VerificadorLancamentoException;
29
import br.edu.cesmac.web.exception.VerificadorLancamentoException;
29
import br.edu.cesmac.web.exception.VerificadorLancamentoException.CommandBean;
30
import br.edu.cesmac.web.exception.VerificadorLancamentoException.CommandBean;
30
import br.edu.cesmac.web.generic.AbstractBean;
31
import br.edu.cesmac.web.generic.AbstractBean;
31
import br.edu.cesmac.web.message.LancadorMensagem;
32
import br.edu.cesmac.web.message.LancadorMensagem;
32
33
Line 107... Line 108...
107
        public List<ProdutoHistoricoDetalhesDTO> getResumoProdutosHistoricoDetalhes() {
108
        public List<ProdutoHistoricoDetalhesDTO> getResumoProdutosHistoricoDetalhes() {
108
                return resumoProdutosHistoricoDetalhes;
109
                return resumoProdutosHistoricoDetalhes;
109
        }
110
        }
110
        public void setResumoProdutosHistoricoDetalhes(List<ProdutoHistoricoDetalhesDTO> resumoProdutosHistoricoDetalhes) {
111
        public void setResumoProdutosHistoricoDetalhes(List<ProdutoHistoricoDetalhesDTO> resumoProdutosHistoricoDetalhes) {
111
                this.resumoProdutosHistoricoDetalhes = resumoProdutosHistoricoDetalhes;
112
                this.resumoProdutosHistoricoDetalhes = resumoProdutosHistoricoDetalhes;
-
 
113
        }
-
 
114
       
-
 
115
        public Integer subtotalResumoDetalhado() {
-
 
116
                Integer subtotal = 0;
-
 
117
                for (ProdutoHistoricoDetalhesDTO detalhado : getProdutosHistoricoDetalhes()) {
-
 
118
                        if (VerificadorUtil.naoEstaNulo(detalhado.getTipoLancamento()) &&
-
 
119
                                        VerificadorUtil.naoEstaNulo(detalhado.getQuantidadeLancamentos())) {
-
 
120
                                if (detalhado.ehTipoLancamentoHistoricoAvarias()) {
-
 
121
                                        subtotal = subtotal - detalhado.getQuantidadeLancamentos();
-
 
122
                                }
-
 
123
                                if (detalhado.ehTipoLancamentoHistoricoCompras()) {
-
 
124
                                        subtotal = subtotal + detalhado.getQuantidadeLancamentos();
-
 
125
                                }
-
 
126
                                if (detalhado.ehTipoLancamentoHistoricoContagensEntrada()) {
-
 
127
                                        subtotal = subtotal + detalhado.getQuantidadeLancamentos();
-
 
128
                                }
-
 
129
                                if (detalhado.ehTipoLancamentoHistoricoContagensSaida()) {
-
 
130
                                        subtotal = subtotal - detalhado.getQuantidadeLancamentos();
-
 
131
                                }
-
 
132
                                if (detalhado.ehTipoLancamentoHistoricoTrocas()) {
-
 
133
                                        subtotal = subtotal - detalhado.getQuantidadeLancamentos();
-
 
134
                                }
-
 
135
                                if (detalhado.ehTipoLancamentoHistoricoVendas()) {
-
 
136
                                        subtotal = subtotal - detalhado.getQuantidadeLancamentos();
-
 
137
                                }
-
 
138
                        } else {
-
 
139
                                subtotal++;
-
 
140
                        }
-
 
141
                }
-
 
142
                return subtotal;
112
        }
143
        }
113
       
144
       
114
        public String getDescricaoDetalhamento() {
145
        public String getDescricaoDetalhamento() {
115
                return descricaoDetalhamento;
146
                return descricaoDetalhamento;
116
        }
147
        }