Skip to content
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

Sync and Translate for insurance fields on Invoice #6289

Open
5 tasks
Tracked by #6000
jmbrunskill opened this issue Jan 27, 2025 · 2 comments
Open
5 tasks
Tracked by #6000

Sync and Translate for insurance fields on Invoice #6289

jmbrunskill opened this issue Jan 27, 2025 · 2 comments
Assignees
Labels
feature: dispensing Team Piwakawaka James, Carl, John, Zachariah
Milestone

Comments

@jmbrunskill
Copy link
Contributor

Sync and Translate for insurance fields on Invoice

Tasks

  • Add field from mSupply nameInsuranceJoinId as name_insurance_join_id
  • Add field from mSupply insuranceDiscountAmount as insurance_discount_amount
  • Add field from mSupply insuranceDiscountRate as insurance_discount_percentage

Acceptance Criteria 🧾

  • Can sync these fields above with mSupply
  • Test cases added/updated to include these fields

Epic Link 🔗

#6000

Moneyworks Jobcode 🧰

OMS:CIDV

@CarlosNZ
Copy link
Contributor

CarlosNZ commented Feb 5, 2025

  • Add field from mSupply insuranceDiscountRate as insurance_discount_percentage

@jmbrunskill - just wondering, why do we need to add this field to invoice table, when it's already in the name_insurance_join which we're going to reference by id already?

Add field from mSupply insuranceDiscountAmount as insurance_discount_amount

Presumably this is the discount percentage x the invoice total? Why do we need to store this in DB when we can just derive it from those two values?

@jmbrunskill
Copy link
Contributor Author

  • Add field from mSupply insuranceDiscountRate as insurance_discount_percentage

@jmbrunskill - just wondering, why do we need to add this field to invoice table, when it's already in the name_insurance_join which we're going to reference by id already?

Add field from mSupply insuranceDiscountAmount as insurance_discount_amount

Presumably this is the discount percentage x the invoice total? Why do we need to store this in DB when we can just derive it from those two values?

It's possible to change the discount rate on an existing policy, so I think the goal of capturing it on the invoice is probably to make sure we capture the values at the time of the invoice, but not 100% why it was done this way. That being said I think changing existing policies will be a rare thing.

@andreievg would you be comfortable to just do lookups in this case? I'm still leaning towards copying mSupply here.

We need to at least sync those fields to mSupply though as we want to make sure any existing reports etc keep working with OMS sites. That would just mean doing that lookup/join in the sync stage though.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature: dispensing Team Piwakawaka James, Carl, John, Zachariah
Projects
None yet
Development

No branches or pull requests

2 participants