fixes bug#23563
dev: gleimar qua: git-svn-id: http://desenvolvimento.rjconsultores.com.br/repositorio/sco/AdmVenta/Web/trunk/ventaboletos@109968 d1611594-4594-4d17-8e1d-87c2c4800839master
parent
17e3f34861
commit
006c9860b5
|
@ -28,8 +28,32 @@ public class RelatorioEstoque extends Relatorio {
|
||||||
while (rset.next()) {
|
while (rset.next()) {
|
||||||
Map<String, Object> dataResult = new HashMap<String, Object>();
|
Map<String, Object> dataResult = new HashMap<String, Object>();
|
||||||
|
|
||||||
String formInicio = rset.getString("tipoVenta").equals(EnumTipoVenda.TPV_MANUAL.getId().toString()) ?
|
String tipoVenta = rset.getString("tipoVenta");
|
||||||
(rset.getString("ultimoFolioCaja") != null ? rset.getString("ultimoFolioCaja") : rset.getString("forminicial")) : rset.getString("forminicial");
|
String formfinal = rset.getString("formfinal");
|
||||||
|
|
||||||
|
String formInicio = rset.getString("forminicial");
|
||||||
|
if (tipoVenta.equals(EnumTipoVenda.TPV_MANUAL.getId().toString())) {
|
||||||
|
|
||||||
|
String ultimoFolioCaja = rset.getString("ultimoFolioCaja");
|
||||||
|
|
||||||
|
boolean isFormularioMaior = false;
|
||||||
|
try {
|
||||||
|
int ultimoFolioCajaInt = Integer.parseInt(ultimoFolioCaja);
|
||||||
|
int formfinalInt = Integer.parseInt(formfinal);
|
||||||
|
|
||||||
|
if (ultimoFolioCaja != null && ultimoFolioCajaInt > formfinalInt) {
|
||||||
|
isFormularioMaior = true;
|
||||||
|
}
|
||||||
|
|
||||||
|
} catch (Exception e) {
|
||||||
|
}
|
||||||
|
|
||||||
|
if (isFormularioMaior) {
|
||||||
|
formInicio = formfinal;
|
||||||
|
} else {
|
||||||
|
formInicio = ultimoFolioCaja != null ? ultimoFolioCaja : formInicio;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
dataResult.put("aidf", rset.getString("aidf"));
|
dataResult.put("aidf", rset.getString("aidf"));
|
||||||
dataResult.put("empresa", rset.getString("nombempresa"));
|
dataResult.put("empresa", rset.getString("nombempresa"));
|
||||||
|
@ -37,7 +61,7 @@ public class RelatorioEstoque extends Relatorio {
|
||||||
dataResult.put("agencia", rset.getString("nombpuntoventa"));
|
dataResult.put("agencia", rset.getString("nombpuntoventa"));
|
||||||
dataResult.put("serie", rset.getString("serie"));
|
dataResult.put("serie", rset.getString("serie"));
|
||||||
dataResult.put("forminicio", formInicio);
|
dataResult.put("forminicio", formInicio);
|
||||||
dataResult.put("formfinal", rset.getString("formfinal"));
|
dataResult.put("formfinal", formfinal);
|
||||||
dataResult.put("estado", rset.getString("nombestado"));
|
dataResult.put("estado", rset.getString("nombestado"));
|
||||||
dataResult.put("tipo", rset.getString("tipo"));
|
dataResult.put("tipo", rset.getString("tipo"));
|
||||||
this.dados.add(dataResult);
|
this.dados.add(dataResult);
|
||||||
|
|
Loading…
Reference in New Issue