Resetting Adjustment On Cost Center When Modifying SellPrice Of One Off

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
Mike_Roberts
Posts: 8
Joined: Thu Feb 16, 2023 10:55 pm

Resetting Adjustment On Cost Center When Modifying SellPrice Of One Off

Post by Mike_Roberts » Tue Sep 19, 2023 12:30 am

Hey team simPRO, I'm hoping you can help! Thanks in advance.

Issue

We need to reset the calculated total of a job cost centers containing one offs. Specifically we need to remove the 'Adjusted' value. This doesn't appear to be working as expected.


According to the API this is possible:

Image

Code: Select all

const resetCostCenterResponse = await patchRequest({
      Total: {
        // Set the value to null to reset/remove adjusted price.
        ExTax: null,
      }
    }, costCenterUrl);
Expected result: Adjusted amount is no longer present.

Actual result: Adjusted amount remains.

Our tooling currently does the following:

- PATCH Unlocks the cost center

Code: Select all

{ ItemsLocked: false }
(Response: 204)
- PATCH Updates OneOff SellPrices to correct values (Response: 204)
- PATCH Reset total of the CostCenter (as above) (Response: 204)

I've tried different variations:

- ExTax: null
- IncTax: null
- Both set to null (errors - you can only set one to null)

The result is always the same - the adjusted value is retained and the total is incorrect as a result.

How can we removed this adjusted value and get the correct total?

Observation

- When I click unlock on the Job cost center in the UI of simPRO the adjustment is removed and the total is correct.

Background

We're cleaning up an issue where on a sample of jobs sell price of one offs was incorrectly calculated. These jobs happen to have been programatically converted from quotes. We previously had no trouble fixing the values on the quotes and are now fixing the jobs.

Our expectation was that if we modified the sell price of a cost center one off, as we had done on the source quote, that the total of the quote and the job would match. What has happened is that an 'adjustment' has been added to the cost center which sees the total of the job and the total of the quote now incorrect.
Sindre
Posts: 493
Joined: Wed Apr 20, 2022 4:51 am
Location: Brisbane

Re: Resetting Adjustment On Cost Center When Modifying SellPrice Of One Off

Post by Sindre » Tue Sep 19, 2023 5:24 am

Hi Mike,
Thank you for reporting this.

Can you send me a private message with your build details and some examples jobs with the expected values and the result you are getting today and we can do some more investigation to see what is happening.

Regards
Sindre
API Developer | Simpro Software Group
Mike_Roberts
Posts: 8
Joined: Thu Feb 16, 2023 10:55 pm

Re: Resetting Adjustment On Cost Center When Modifying SellPrice Of One Off

Post by Mike_Roberts » Tue Sep 19, 2023 5:51 am

Hey Sindre, I've sent you a DM. Cheers for the follow up!
Mike_Roberts
Posts: 8
Joined: Thu Feb 16, 2023 10:55 pm

Re: Resetting Adjustment On Cost Center When Modifying SellPrice Of One Off

Post by Mike_Roberts » Tue Sep 26, 2023 12:11 am

Hey Sindre,

Any news or updates? Cheers.
Post Reply