Commit 94b5a1fb01bf2b791ce25957f71a72a5df24dacb
1 parent
b5b5f0cb
Exists in
master
Redmine #4066
Showing
3 changed files
with
27 additions
and
4 deletions
Show diff stats
cit-almoxarifado-web/src/main/resources/reports/entradaAlmoxarifado.jrxml
1 | 1 | <?xml version="1.0" encoding="UTF-8"?> |
2 | +<!-- Created with Jaspersoft Studio version 6.2.1.final using JasperReports Library version 6.2.1 --> | |
3 | +<!-- 2016-05-09T14:37:46 --> | |
2 | 4 | <jasperReport xmlns="http://jasperreports.sourceforge.net/jasperreports" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:schemaLocation="http://jasperreports.sourceforge.net/jasperreports http://jasperreports.sourceforge.net/xsd/jasperreport.xsd" name="entradaAlmoxarifado" language="groovy" pageWidth="802" pageHeight="555" orientation="Landscape" whenNoDataType="NoDataSection" columnWidth="802" leftMargin="0" rightMargin="0" topMargin="0" bottomMargin="0" uuid="466976dd-5993-46ca-9d09-1a18f2ff2878"> |
3 | 5 | <property name="ireport.zoom" value="1.0"/> |
4 | 6 | <property name="ireport.x" value="0"/> |
... | ... | @@ -74,11 +76,11 @@ FROM entradaalmoxarifado ea |
74 | 76 | eai.quantidade as quantidade, |
75 | 77 | eai.valorunitario as valorUnitario, |
76 | 78 | eai.valortotal as valorTotal |
77 | -FROM entradaalmoxarifado ea | |
79 | +FROM alm_entrada ea | |
78 | 80 | INNER JOIN dominio d ON d.id = ea.dominiotipoentrada_id |
79 | 81 | INNER JOIN parceiro parceiro ON parceiro.id = ea.fornecedor_id |
80 | 82 | INNER JOIN pessoa p ON p.id = parceiro.pessoa_id |
81 | - INNER JOIN entradaalmoxarifadoitem eai ON eai.entrada_id = ea.id | |
83 | + INNER JOIN alm_en_entradaitem eai ON eai.entrada_id = ea.id | |
82 | 84 | INNER JOIN material m ON m.id = eai.material_id AND $X{IN,m.id,idsMateriais} |
83 | 85 | WHERE ea.almoxarifado_id = $P{idAlmoxarifado} |
84 | 86 | AND ea.datarecebimento BETWEEN (TO_TIMESTAMP($P{dataInicio},'YYYY-MM-DD HH24:MI:SS')::timestamp without time zone) AND (TO_TIMESTAMP($P{dataFim},'YYYY-MM-DD HH24:MI:SS')::timestamp without time zone) | ... | ... |
cit-almoxarifado-web/src/main/webapp/assets/js/angular/custom/controller/EntradaAlmoxarifadoController.js
... | ... | @@ -202,6 +202,27 @@ citApp.controller('EntradaAlmoxarifadoController', ['$scope', '$filter', 'FileUp |
202 | 202 | return result; |
203 | 203 | }); |
204 | 204 | }; |
205 | + | |
206 | + $scope.dominioTipoRecebimentoListTemp = []; | |
207 | + $scope.alterarListaDominioTipoRecebimento = function(dominioTipoEntrada){ | |
208 | + if(dominioTipoEntrada){ | |
209 | + var codigo = dominioTipoEntrada.codigo; | |
210 | + | |
211 | + if(codigo === 1){ | |
212 | + $scope.dominioTipoRecebimentoListTemp = $scope.dominiosTipoRecebimentoOrcamentaria; | |
213 | + }else if(codigo === 2){ | |
214 | + $scope.dominioTipoRecebimentoListTemp = $scope.dominiosTipoRecebimentoExtraOrcamentaria; | |
215 | + }else{ | |
216 | + $scope.dominioTipoRecebimentoListTemp = []; | |
217 | + } | |
218 | + }else{ | |
219 | + $scope.dominioTipoRecebimentoListTemp = []; | |
220 | + } | |
221 | + | |
222 | + if($scope.relatorioEntradaAlmoxarifado && $scope.relatorioEntradaAlmoxarifado.dominioTipoRecebimento){ | |
223 | + delete $scope.relatorioEntradaAlmoxarifado.dominioTipoRecebimento; | |
224 | + } | |
225 | + } | |
205 | 226 | |
206 | 227 | $scope.carregarItensMaterial = function(item){ |
207 | 228 | ... | ... |
cit-almoxarifado-web/src/main/webapp/html/entradaAlmoxarifado/relatorioEntradaAlmoxarifado.html
... | ... | @@ -67,7 +67,7 @@ |
67 | 67 | <div class='row'> |
68 | 68 | <div class="col-sm-3 col-sm-offset-3"> |
69 | 69 | <label-select ng-id="relatorioEntradaAlmoxarifado.dominioTipoEntrada" ng-label="LABEL.TIPO_ENTRADA" |
70 | - ng-model="relatorioEntradaAlmoxarifado.dominioTipoEntrada" | |
70 | + ng-model="relatorioEntradaAlmoxarifado.dominioTipoEntrada" ng-custom-change="alterarListaDominioTipoRecebimento(model)" | |
71 | 71 | ng-obrigatorio="false" ng-disabled="false" form="formRelatorioEntradaAlmoxarifado" ng-list="dominioTipoEntradaList" |
72 | 72 | ng-custom-options="dominio.originalElement as dominio.descricao for dominio" track-by="track by dominio.id" /> |
73 | 73 | </div> |
... | ... | @@ -75,7 +75,7 @@ |
75 | 75 | <div class="col-md-3"> |
76 | 76 | <label-select ng-id="relatorioEntradaAlmoxarifado.dominioTipoRecebimento" ng-label="LABEL.TIPO_RECEBIMENTO" |
77 | 77 | ng-model="relatorioEntradaAlmoxarifado.dominioTipoRecebimento" |
78 | - ng-obrigatorio="false" ng-disabled="false" form="formRelatorioEntradaAlmoxarifado" ng-list="dominiosTipoRecebimento" | |
78 | + ng-obrigatorio="false" ng-disabled="false" form="formRelatorioEntradaAlmoxarifado" ng-list="dominioTipoRecebimentoListTemp" | |
79 | 79 | ng-custom-options="dominio.originalElement as dominio.descricao for dominio" track-by="track by dominio.id" /> |
80 | 80 | </div> |
81 | 81 | </div> | ... | ... |