Jump to content
  • 0

API Question: Services->add then Invoices->createFromServices - how to bill for the current month, not next month


Question

Posted

I add a service to a client account for today's date and when i run Invoices->createFromServices it will show on the invoice lines <ITEM_NAME> (Jan 05, 2018 - Feb 05, 2018). How can i generate the very first bill when adding a service via the API i.e (Dec 05, 2017 - Jan 05, 2018)?

5 answers to this question

Recommended Posts

  • 0
Posted

I would actually expect that to be the default behavior.  Are you for any reason submitting true for the $services_renew parameter?  That would explain the behavior you're seeing.

  • 0
Posted

Hi Jono, the $services_renew parameter is set to false, although i had tried it as true. Im wondering do i need to explicitly set the date_renews or the date_last_renewed when adding the service? Am i following the typical workflow for this? should the $packages parameter contain anything if i'm not using coupons? is it something to do with the due_date? does it need to be set to before the service creation or something?

  • 0
Posted

Hmm, I just tried Services::add(['pricing_id' => 595, 'client_id' => 1]) then Invoices::createFromServices(1, [549], 'USD', date('c')).  The invoice created had the line with (Dec 05, 2017 - Jan 05, 2018).   Can I get more invoice on the parameters you are passing?

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Answer this question...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...