Subversion Repositories SmartDukaan

Rev

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

Rev 34892 Rev 34895
Line 83... Line 83...
83
    public long getDays() {
83
    public long getDays() {
84
        return ChronoUnit.DAYS.between(this.getCreatedOn().toLocalDate(), this.settledOn == null ? LocalDateTime.now() : this.getSettledOn()) + 1;
84
        return ChronoUnit.DAYS.between(this.getCreatedOn().toLocalDate(), this.settledOn == null ? LocalDateTime.now() : this.getSettledOn()) + 1;
85
    }
85
    }
86
 
86
 
87
    public boolean isDue() {
87
    public boolean isDue() {
88
        return this.getSettledOn() == null && !this.getDueDate().toLocalDate().isBefore(LocalDate.now());
88
        return this.canBeSettled() && !this.getDueDate().toLocalDate().isBefore(LocalDate.now());
89
    }
89
    }
90
 
90
 
91
    public boolean isOverdue() {
91
    public boolean isOverdue() {
92
        return this.getSettledOn() == null && this.getDueDate().toLocalDate().isBefore(LocalDate.now()) &&
92
        return this.canBeSettled() && this.getDueDate().toLocalDate().isBefore(LocalDate.now()) &&
93
                !this.getDueDate().plusDays(15).toLocalDate().isBefore(LocalDate.now());
93
                !this.getDueDate().plusDays(15).toLocalDate().isBefore(LocalDate.now());
94
    }
94
    }
95
 
95
 
96
    public boolean isDefault() {
96
    public boolean isDefault() {
97
        return canBeSettled() && this.isDefault(LocalDate.now());
97
        return canBeSettled() && this.isDefault(LocalDate.now());