#deadshot_api

1 messages ¡ Page 1 of 1 (latest)

green raptorBOT
hallow scaffoldBOT
#

Below are links to other discussions we've had with you in the past week in case you want to review that information. If your question is related to one of these previous discussions, please provide a comprehensive summary of the current state and what you need help with now. We help many users simultaneously, so a summary allows us to resolve your issue as soon as possible.

green raptorBOT
#

👋 Welcome to your new thread!

⏲️ We'll be here soon! Typically we respond in a few minutes, but sometimes we might take a bit longer if the server is busy or if you have a particularly tricky question.

⏱️ We close idle threads, which makes them read-only. Once a thread is closed it won't be reopened, but you can always start a new thread if you have another question.

🔗 This thread will always be available, even after it's closed. You can find it again using Discord's search, or you can save this link: https://discord.com/channels/841573134531821608/1245447491609165996

📝 Have more to share? Add more details, code, screenshots, videos, etc. below.

hallow scaffoldBOT
compact kite
#

Hello

#

Which phase's end date are you updating here?

stoic moss
#

phase[1]

compact kite
#

Looks like that phase's end_date is exactly 1 month after the previous phase's end_date.

#

In that case there won't be any proration

stoic moss
#

Let me check again

#

Yeah, its a weekly subscription so the 2 extra days should be prorated?

compact kite
#

What do you mean by 2 extra days?

#

Oh I think I see your confusion

stoic moss
#

I just checked, regardless of updating end_date, why the invoice is created for a full week when it should charge for only 2 days?

compact kite
#

Yeah that's not how it works.

#

It will always charge for a full week since it is a weekly Price

#

Then if you had proration enabled at the next phase (after the 2 days in July) it would take into account that "full week" payment

#

But it won't have a cycle of 2 days -- that just isn't how schedules work

#

Let's back up -- what are you really trying to do here?

#

What is your end-goal?

stoic moss
#

I don't understand, it worked before when there were only two phases, the last phase did that 2 days proration

#

Now I've added a "Free Nights" phase in the end where the whole phase is 100% off

compact kite
#

I'm not sure what "worked before" means. What are you trying to achieve?

stoic moss
# compact kite What is your end-goal?

I have an apartment booking site and I am creating subscription schedule for reservations with 3 phases:

  1. First Week (100% off)
  2. Normal
  3. Free Nights (100% off)

The second phase can have for example 30 days. If the price for a week is $700, it should be charged $3000 (4 Weeks * $700) + (2 days * 100)

compact kite
#

Gotcha then yeah you wouldn't use proration here, you would actually need a separate phase with a separate Price that is daily for $100

#

So you would have a phase that is 28 days and a phase that is 2 days

stoic moss
#

But it works when the subscription ends on 30th day (No phase after)?

compact kite
#

It cancels at that point?

stoic moss
#

yes

compact kite
#

Yes then it would work

stoic moss
#

I think thats what was happening before I added a new phase

compact kite
#

Yeah that makes sense

#

Hmm actually can you advance time on your test clock a little further?

#

It looks like you have a 2 day phase from July 8-10

#

Does that prorate?

#

Right now your Invoice on July 6th is during phase 0

#

Which is why there is no proration

stoic moss
compact kite
#

Oh sorry you are right

#

I mixed up the end_date and start_date

#

Yeah so the Invoice on July 6th is during Phase 1

#

The way proration_behavior works is whether proration is generated at the time of phase transition

#

So if you had a phase that is only 2 days with proration_behavior: create_prorations then that would be another way to handle this

#

Instead of switching to a daily Price

stoic moss
#

yeah. That would be easier

compact kite
#

I'd try that out

#

And see if it works for you

stoic moss
#

So, I have to create a phase with full weeks and another phase with some days on it for it work

compact kite
#

Yes