Subversion Repositories SmartDukaan

Rev

Rev 33529 | Rev 33696 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 33529 Rev 33532
Line 58... Line 58...
58
	public long getDays() {
58
	public long getDays() {
59
		return ChronoUnit.DAYS.between(this.getCreatedOn().toLocalDate(), LocalDateTime.now()) + 1;
59
		return ChronoUnit.DAYS.between(this.getCreatedOn().toLocalDate(), LocalDateTime.now()) + 1;
60
	}
60
	}
61
 
61
 
62
	public boolean isDue() {
62
	public boolean isDue() {
63
		return this.getSettledOn()==null && !this.getDueDate().toLocalDate().isAfter(LocalDate.now());
63
		return this.getSettledOn()==null && !this.getDueDate().toLocalDate().isBefore(LocalDate.now());
64
	}
64
	}
65
 
65
 
66
	public boolean isOverdue() {
66
	public boolean isOverdue() {
67
		return this.getSettledOn()==null && this.getDueDate().toLocalDate().isAfter(LocalDate.now()) &&
67
		return this.getSettledOn()==null && this.getDueDate().toLocalDate().isBefore(LocalDate.now()) &&
68
				!this.getDueDate().plusDays(15).toLocalDate().isAfter(LocalDate.now());
68
				!this.getDueDate().plusDays(15).toLocalDate().isBefore(LocalDate.now());
69
	}
69
	}
70
 
70
 
71
	public boolean isDefault() {
71
	public boolean isDefault() {
72
		return this.getSettledOn()==null && this.getDueDate().plusDays(15).toLocalDate().isAfter(LocalDate.now());
72
		return this.getSettledOn()==null && this.getDueDate().plusDays(15).toLocalDate().isBefore(LocalDate.now());
73
	}
73
	}
74
 
74
 
75
	@Transient
75
	@Transient
76
	private List<DailyStatementModel> dailyStatementModel;
76
	private List<DailyStatementModel> dailyStatementModel;
77
 
77