diff --git a/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioVendaPacoteVoucher.java b/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioVendaPacoteVoucher.java index 5ff42460c..387ad7fdc 100644 --- a/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioVendaPacoteVoucher.java +++ b/src/java/com/rjconsultores/ventaboletos/relatorios/impl/RelatorioVendaPacoteVoucher.java @@ -61,11 +61,12 @@ public class RelatorioVendaPacoteVoucher extends Relatorio { ResultSet rset = null; NamedParameterStatement stmt = null; try { - StringBuilder sQuery = new StringBuilder("SELECT VP.DATAPACOTE,VP.DATAVENDA,VP.SUBTOTAL,VP.TOTAL,VP.DESCONTO,VP.NUMOPERACION,P.NOMPACOTE,P.DESCPACOTE,E.NOMBEMPRESA,VP.SITUACAO,U.NOMBUSUARIO "); + StringBuilder sQuery = new StringBuilder("SELECT VP.DATAPACOTE,VP.DATAVENDA,VP.SUBTOTAL,VP.TOTAL,VP.DESCONTO,VP.NUMOPERACION,P.NOMPACOTE,P.DESCPACOTE,E.NOMBEMPRESA,VP.SITUACAO,U.NOMBUSUARIO,M.MARCA_ID "); sQuery.append("FROM VENDA_PACOTE VP ") .append("JOIN PACOTE P ON P.PACOTE_ID = VP.PACOTE_ID ") .append("JOIN EMPRESA E ON E.EMPRESA_ID = P.EMPRESA_ID ") .append("JOIN USUARIO U ON U.USUARIO_ID = VP.USUARIO_ID ") + .append("LEFT JOIN MARCA M ON M.EMPRESA_ID = E.EMPRESA_ID ") .append("WHERE VP.VENDAPACOTE_ID = :vendapacoteId ") .append("AND VP.MOTIVOCANCELVENDAPACOTE_ID IS NULL "); log.debug(sQuery); @@ -87,6 +88,8 @@ public class RelatorioVendaPacoteVoucher extends Relatorio { pacoteVoucher.setNombusuario(rset.getString("nombusuario")); pacoteVoucher.setSituacaoVendaPacote(SituacaoVendaPacote.getSituacaoVendaPacote(rset.getInt("situacao"))); + carregarLogo(conexao, rset.getInt("marca_id")); + carregarPacoteItem(conexao, pacoteVoucher); carregarEnderecoApanhe(conexao, pacoteVoucher); carregarClientePacote(conexao, pacoteVoucher); @@ -297,8 +300,6 @@ public class RelatorioVendaPacoteVoucher extends Relatorio { pacoteTarifaVoucher.setCorridaId(rset.getInt("corrida_id")); } - carregarLogo(conexao, rset.getInt("marca_id")); - lsPacoteTarifasVouchers.add(pacoteTarifaVoucher); } pacoteVoucher.setPacoteTarifasVouchers(lsPacoteTarifasVouchers);