Multi-company issue with GETing CostCenters in contractorInvoices endpoint

Posts about the simPRO API. Help/support/how-to etc.
Forum rules
  • Check the documentation first. Before posting questions, please check the documentation to ensure it doesn't already cover what you need.
  • No spam. All automated messages, advertisements, and links to competitor websites will be deleted immediately.
  • Post in relevant sub-forums only. Messages posted in the wrong topic area will be removed and placed in the correct sub-forum by moderators.
  • Respect other users. No flaming or abusing fellow forum members. Users who continue to post inflammatory, abusive comments will be deleted from the forum after two warnings are issued by moderators.
  • Harassment. No threats or harassment of other users will be tolerated. Any instance of threatening or harassing behavior is grounds for deletion from the forums.
  • Adult content. No profanity or pornography is allowed. Posts containing adult material will be deleted.
  • Bandwidth. All images and signatures must be 500 x 500 pixels or smaller. Posts containing over-sized images and signatures will be removed.
  • Illegal content. No re-posting of copyrighted materials or other illegal content is allowed. Any posts containing illegal content or copyrighted materials will be deleted.
Post Reply
Grace
Posts: 12
Joined: Wed Mar 09, 2022 9:56 am

Multi-company issue with GETing CostCenters in contractorInvoices endpoint

Post by Grace » Wed Jul 03, 2024 9:46 am

Hi,

We moved to a multi-company setup and noticed that GET from the API endopoint `api/v1.0/companies/{company_id}/contractorInvoices/{invoice_id}` stopped returning "CostCenters" as it used to in a single company setup.
Below is snippet of what we currently receive:
```
"CostCenters": [
{
"ContractorJob": 2236,
"CostCenter": {
"ID": null,
"Name": "Default Account",
"ExpenseAccountNo": "331"
}, ...
```
Every "CostCenter" is now null and every "Name" is "Default Account", whereas before we had a proper ID and name.

Similarly, when looking up invoices via UI, the displayed Cost Center is now "Default Account", which makes me think it might be a bug.
Can you confirm?
Attachments
ContractorInvoicesScreenshot 2024-07-03 104319.png
ContractorInvoicesScreenshot 2024-07-03 104319.png (28.09 KiB) Viewed 3325 times
ContractorInvoicesScreenshot 2024-07-03 104319.png
ContractorInvoicesScreenshot 2024-07-03 104319.png (28.09 KiB) Viewed 3325 times
SimproAPITeam
Posts: 831
Joined: Wed May 01, 2024 2:31 am

Re: Multi-company issue with GETing CostCenters in contractorInvoices endpoint

Post by SimproAPITeam » Mon Jul 08, 2024 12:36 am

Hi Grace,
When you invoice a contractor job. For example in Simpro there is a drop down list for cost centre. This is defaulted to "Default Account".

When selecting this it will show default account. You can select a different cost centre in this list and it should show the selected cost centre on the invoice, both in Simpro and the API.

Can you test and see if this changes your result?

I don't think this has anything to do with your company moving to multi company.

Regards
Simpro API Team | Simpro Software Group
Grace
Posts: 12
Joined: Wed Mar 09, 2022 9:56 am

Re: Multi-company issue with GETing CostCenters in contractorInvoices endpoint

Post by Grace » Mon Jul 08, 2024 10:04 am

Hi,
Thanks for getting back to me.
I checked with our colleagues who process the invoices and they said that they don't actually manually change the default cost center on Simpro UI for contractor invoices. I agree that that this is not a bug in Simpro, it was actually a bug in our requests after we moved to multicompany :oops: . Sorry for making you investigate this and thank you for you time. You can close this ticket.

Kind regards
Grace
SimproAPITeam
Posts: 831
Joined: Wed May 01, 2024 2:31 am

Re: Multi-company issue with GETing CostCenters in contractorInvoices endpoint

Post by SimproAPITeam » Mon Jul 08, 2024 11:39 pm

Hi Grace,
That's okay. I'm glad you got it sorted and can update your queries.

Regards
Simpro API Team | Simpro Software Group
Post Reply