-
-
Notifications
You must be signed in to change notification settings - Fork 824
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
Add test for mixed Order data #20241
Conversation
(Standard links)
|
@eileenmcnaughton I've added a Gist with complete details of the mismatch: https://gist.github.com/christianwach/ac8e8460c7f488a9a31f30a2c74eefc6 There isn't a Taxable Financial Type in the CiviCRM Sample Data by default but I've added one (ID: 5) as per instructions from @kcristiano |
@eileenmcnaughton A bit more info... so... turns out my Order API call wasn't as clean as I thought it was. Elsewhere, just after the I can now confirm that with a Non-taxable Financial Type applied to the Contribution and mixed Line Item Financial Types all seems to be well. I'll keep digging with other combinations, but it seems updating a Contribution with a |
@monishdeb could you work to ensure that a contribution update does not result in inappropriate recalculation of sales taxes, which I imagine involves calculating it differently on subsequent saves. |
Recalculation seems to happen any time a Contribution is updated regardless of whether the Financial Type is taxable or not e.g. a trivial update to the "Source": $result = civicrm_api3('Contribution', 'create', [
'financial_type_id' => 5, // Happens to be a Taxable Financial Type but need not be.
'contact_id' => 206,
'id' => 103,
'source' => "Something",
]); All taxes will be recalculated and the errors in the Gist can be observed. I've updated it to reflect the situation better: https://gist.github.com/christianwach/ac8e8460c7f488a9a31f30a2c74eefc6 |
@christianwach thanks for narrowing it down - that helps |
OK - I can replicate this now - @seamuslee001 we might as well merge this as an extra test & I can build on it to fix Christian's actual problem |
@eileenmcnaughton That would be wonderful 🏅 |
@christianwach I'm working on it over here - #20357 at this stage my fix assumes a lack of weird data being passed in which I am not sure is true :-) |
Overview
This test is to try to capture & replicate an issue @christianwach is having with order api on taxes with more than one row - @christianwach I feel like this should be failing from your experience but it didn't locally
Before
Less tests
After
More tests
Technical Details
This didn't replicate the issue but it's useful as a test I think & I can build on it
Comments