Correccion de cosas .w. No estoy seguro que e hecho
This commit is contained in:
@@ -203,4 +203,24 @@ public class MysqlDocumentosDAO extends DocumentosDAO {
|
||||
return updates > 0;
|
||||
}
|
||||
|
||||
@Override
|
||||
public int getTotalDocumentos(Caja caja) {
|
||||
int total = 0;
|
||||
try {
|
||||
Connection conn = connectionHolder.getConnection();
|
||||
PreparedStatement ps = conn.prepareStatement("select cheques + tarjetas from documentos where caja_id = ?");
|
||||
ps.setInt(1, caja.getId());
|
||||
|
||||
ResultSet rs = ps.executeQuery();
|
||||
rs.next();
|
||||
total = rs.getInt(1);
|
||||
|
||||
rs.close();
|
||||
ps.close();
|
||||
conn.close();
|
||||
} catch (SQLException e) {
|
||||
e.printStackTrace();
|
||||
}
|
||||
return total;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user