Jump to content

API command 'getinvoice' is missing fields that are found in 'getinvoices'


MSoft

Recommended Posts

Hi Guys,

 

I'm working on a addon module to act on invoices through hooks. This part uses the API command "getinvoice" to get al the details.

To find invoices to process before the date the addon was installed I'm using the API command "getinvoices" (note the 's' ;-) and parse the details from there.

 

I noticed that "getinvoices" contains currency fields like 'currencycode' and 'currencyprefix'. Nice, this way it will be flexible.

However, "getinvoice" is completely missing these fields.

I'd expect that "getinvoice" would at least contain all fields that "getinvoices" returns also. Sadly these not.

 

Is this a bug or any deeper thought behind this?

Any way to get this information without iterating though all invoices for that customer (as user_id seems to be the only parameter)?

 

Note that these currency fields are not (yet) listed in the manual.

 

Best regards,

Michael

Link to comment
Share on other sites

  • 4 weeks later...

Just to close this thread, I'll past the answer the WHMCS support gave me:

----

As the fields are not documented, I would not recommend depending upon them being present as they may be changed or removed in future releases. My recommendation would be to use the available userid to query Get Clients Details to get the currency if needed: http://docs.whmcs.com/API:Get_Clients_Details

Link to comment
Share on other sites

Join the conversation

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

Guest
Reply to this topic...

×   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.

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...

Important Information

By using this site, you agree to our Terms of Use & Guidelines and understand your posts will initially be pre-moderated