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()) {
|
||||
Map<String, Object> dataResult = new HashMap<String, Object>();
|
||||
|
||||
String formInicio = rset.getString("tipoVenta").equals(EnumTipoVenda.TPV_MANUAL.getId().toString()) ?
|
||||
(rset.getString("ultimoFolioCaja") != null ? rset.getString("ultimoFolioCaja") : rset.getString("forminicial")) : rset.getString("forminicial");
|
||||
String tipoVenta = rset.getString("tipoVenta");
|
||||
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("empresa", rset.getString("nombempresa"));
|
||||
|
@ -37,7 +61,7 @@ public class RelatorioEstoque extends Relatorio {
|
|||
dataResult.put("agencia", rset.getString("nombpuntoventa"));
|
||||
dataResult.put("serie", rset.getString("serie"));
|
||||
dataResult.put("forminicio", formInicio);
|
||||
dataResult.put("formfinal", rset.getString("formfinal"));
|
||||
dataResult.put("formfinal", formfinal);
|
||||
dataResult.put("estado", rset.getString("nombestado"));
|
||||
dataResult.put("tipo", rset.getString("tipo"));
|
||||
this.dados.add(dataResult);
|
||||
|
|
Loading…
Reference in New Issue