Solucionado bug que no generaba el ultimo dia del mes :3

This commit is contained in:
Daniel Cortes
2019-01-09 15:19:27 -03:00
parent 6d44fb7ddd
commit 6c2cf1ce5d
5 changed files with 77 additions and 74 deletions

View File

@@ -162,7 +162,7 @@ public class SQLiteCajaDAO extends CajaDAO {
@Override
public void createCajasForMonth(LocalDate month) {
LocalDate date = month.withDayOfMonth(1);
LocalDate endDate = date.withDayOfMonth(date.lengthOfMonth());
LocalDate endDate = date.withDayOfMonth(date.lengthOfMonth()).plusDays(1);
while(date.isBefore(endDate)) {
if(this.findByFecha(date) != null){

View File

@@ -57,6 +57,7 @@ public class SQLiteInformeMensualContentDAO extends InformeMensualContentDAO {
ps.setString(1, date.withDayOfMonth(1).toString());
ps.setString(2, date.withDayOfMonth(date.lengthOfMonth()).toString());
ResultSet rs = ps.executeQuery();
while (rs.next()) {
InformeMensualContent informeMensualContent = new InformeMensualContent();