Skip to content

TTVA-240 | Change Ceepos cost center code to be based on the tax percentage #197

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Mar 18, 2025

Conversation

japauliina
Copy link

In Respa the tax precentage for same product may vary. Ceepos has a different product code for each tax percentage, so we need to get the correct product code based on the tax percentage when sending the order to Ceepos.

Change Unit's cost_center_code field from CharField to JSONField. This was agreed to be the most straightforward way to implement this feature now. The field then contains a mapping of tax percentages to the correct cost center codes.

The migration transforms the current cost center code to default value for all currently used tax percentages.

Refs TTVA-240

In Respa the tax precentage for same product may vary. Ceepos has a
different product code for each tax percentage, so we need to get the
correct product code based on the tax percentage when sending the order
to Ceepos.

Change Unit's `cost_center_code` field from CharField to JSONField.
This was agreed to be the most straightforward way to implement this
feature now. The field then contains a mapping of tax percentages to
the correct cost center codes.

Refs TTVA-240
@japauliina japauliina requested a review from jopesy March 18, 2025 08:35
@japauliina japauliina changed the title Change Ceepos cost center code to be based on the tax percentage TTVA-240 | Change Ceepos cost center code to be based on the tax percentage Mar 18, 2025
Copy link
Collaborator

@jopesy jopesy left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me!

@japauliina japauliina merged commit 7464354 into tre-varaamo-qa Mar 18, 2025
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants