Subversion Repositories Integrator Subversion

Rev

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

Rev 516 Rev 517
Line 160... Line 160...
160
        public Integer estoqueProduto(ProdutoDTO produtoDTO, LojaDTO lojaDTO) {
160
        public Integer estoqueProduto(ProdutoDTO produtoDTO, LojaDTO lojaDTO) {
161
                for (ProdutoLojaDTO produtoLojaDTO : getProdutosAntesDistribuir()) {
161
                for (ProdutoLojaDTO produtoLojaDTO : getProdutosAntesDistribuir()) {
162
                        if (produtoLojaDTO.getSequencialDoProduto().equals(produtoDTO.getSequencial()) &&
162
                        if (produtoLojaDTO.getSequencialDoProduto().equals(produtoDTO.getSequencial()) &&
163
                                produtoLojaDTO.getLojaDTO().equals(lojaDTO)) {
163
                                produtoLojaDTO.getLojaDTO().equals(lojaDTO)) {
164
                                return produtoLojaDTO.getQuantidadeEstoqueAnterior();
164
                                return produtoLojaDTO.getQuantidadeEstoqueAnterior();
-
 
165
                        }
-
 
166
                }
-
 
167
                return null;
-
 
168
        }
-
 
169
       
-
 
170
        public String quantidadeTransferirAntesDistribuirProduto(ProdutoDTO produtoDTO, LojaDTO lojaDTO) {
-
 
171
                for (ProdutoLojaDTO produtoLojaDTO : getProdutosAntesDistribuir()) {
-
 
172
                        if (produtoLojaDTO.getSequencialDoProduto().equals(produtoDTO.getSequencial()) &&
-
 
173
                                produtoLojaDTO.getLojaDTO().equals(lojaDTO)) {
-
 
174
                                Integer quantidade = (produtoLojaDTO.quantidadeParaTransferir() * -1) - produtoLojaDTO.getQuantidadeEstoqueAnterior();
-
 
175
                                if (quantidade > 0) {return "[" + quantidade + "]";}
-
 
176
                                return "";
165
                        }
177
                        }
166
                }
178
                }
167
                return null;
179
                return null;
168
        }
180
        }
169
       
181