mirror of
https://github.com/google/nomulus
synced 2026-09-12 11:06:29 +00:00
Fix billing pipeline first month scheduling (#1891)
* Fix billing pipeline first month scheduling * compare to expansion next month * use yoda date comparison * update cursor time to be mid of day
This commit is contained in:
@@ -120,7 +120,7 @@ public class GenerateInvoicesAction implements Runnable {
|
||||
.orElse(Cursor.createGlobal(RECURRING_BILLING, START_OF_TIME))
|
||||
.getCursorTime());
|
||||
|
||||
if (yearMonth.getMonthOfYear() >= currentCursorTime.getMonthOfYear()) {
|
||||
if (!YearMonth.fromDateFields(currentCursorTime.toDate()).isAfter(yearMonth)) {
|
||||
throw new IllegalStateException(
|
||||
"Latest billing events expansion cycle hasn't finished yet, terminating invoicing"
|
||||
+ " pipeline");
|
||||
|
||||
Reference in New Issue
Block a user