-
-
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
Fix Payment.create to update financial_item.status_id #20941
Conversation
(Standard links)
|
374f99e
to
4eaf0ca
Compare
Test fail i think might relate but maybe not
|
ok - that was an unreleased regression of sorts https://github.com/civicrm/civicrm-core/pull/20941/files#diff-e34d27c5164eab180195d9ec065f073f4d4cc7c73f179576ec8bd087cb9df429R1117 |
39cce92
to
e2fcf40
Compare
I just split off #20965 |
@monishdeb this has been a big fight but it's passing now! I'm going to need your help to get it merged - I did split off #20965 to simplify a little |
This makes it such that when using the default price set for contributions it not only fills the default price field id. I originally had this in the code but I pulled it out because the line item test failed. However, I'm seeing cases where not having a price_field_value_id fails to add tax and I think the issue with the line item test is that it is, incorrecly, trying to add 2 line items on the price field in the default price set - which is not actually the expectation on the default price set I do, separately, wonder if we need the unique id for price_field_id + contribution_id + price_field_value_id - but out of scope on this
When I try to switch to the order->create flow for membership forms it turns out we are leaving the financial_item.status_id as 'unpaid' when adding a payment. No one has noticed because this field is kinda unused - but it needs to work to pass tests
Changes makes sense. r-run passed and the added unit-tests capture the use-case accurately. Merging now. |
Overview
Fix Payment.create to update financial_item.status_id
Before
Create and order using order.create api, add a payment using payment.create - associated financial_items will have a status of 3 - unpaid
After
Status of the financial_item update to Paid when payment is added to it
Technical Details
When I try to switch to the order->create flow for membership forms it turns
out we are leaving the financial_item.status_id as 'unpaid' when adding a payment.
No one has noticed because this field is kinda unused - but it needs to work
to pass tests
Comments