Skip to content

Commit

Permalink
Update DemandService.java
Browse files Browse the repository at this point in the history
  • Loading branch information
snehal-eGov authored Feb 3, 2023
1 parent db17ce6 commit 031f636
Showing 1 changed file with 1 addition and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -1001,7 +1001,7 @@ public void generateBulkDemandForTenantId(BulkDemand bulkDemand) {

LocalDate fromDate = LocalDate.parse(bulkDemand.getBillingPeriod().split("-")[0].trim(), formatter);
LocalDate toDate = LocalDate.parse(bulkDemand.getBillingPeriod().split("-")[1].trim(), formatter);
if(fromDate.isAfter(LocalDate.now())) {
if(fromDate.isAfter(LocalDate.now().minusMonths(1))) {
throw new CustomException("INVALID_BILLING_CYCLE",
"Cannot generate demands for future months");
}
Expand Down

0 comments on commit 031f636

Please sign in to comment.