#Ömer Bayram

1 messages · Page 1 of 1 (latest)

finite jayBOT
rancid kettle
orchid tangle
#

Thanks. But this is only showing the next natural billing date not all dates.

#

Is there a possibility to list all next invoices/dates?

rancid kettle
#

There is not. But assuming a regular billing interval it shouldn't be too difficult to compute that yourself from the billing_cycle_anchor on the Subscription object

orchid tangle
#

I have used moment to add 1 month if its monthly or 1 quarter if it is quarterly but than I had the problem, that I had to add or substract an hour because of DST

#
nextPeriodStartDate.add(1, "month");
const nextDST = nextPeriodStartDate.isDST();

if (firstDST && !nextDST) {
  nextPeriodStartDate.subtract(1, "hour");
}

if (nextDST && !firstDST) {
  nextPeriodStartDate.add(1, "hour");
}```
#

I used this to calculate the next natural billing date when using backdate_start_date and billing_cycle_anchor together

#

Otherwise the amount was differing from the regular period price

#

Is there a better solution for this? Thanks again.

rancid kettle
#

Hmm, nothing that we can offer automatically I'm afraid

orchid tangle
#

Ok. Thanks again.