Resetting Adjustment On Cost Center When Modifying SellPrice Of One Off
Posted: 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:

Expected result: Adjusted amount is no longer present.
Actual result: Adjusted amount remains.
Our tooling currently does the following:
- PATCH Unlocks the cost center (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.
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:

Code: Select all
const resetCostCenterResponse = await patchRequest({
Total: {
// Set the value to null to reset/remove adjusted price.
ExTax: null,
}
}, costCenterUrl);
Actual result: Adjusted amount remains.
Our tooling currently does the following:
- PATCH Unlocks the cost center
Code: Select all
{ ItemsLocked: false }- 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.