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

BTHAB-184: Link Invoice to Quotations/Case using custom fields #972

Merged
merged 5 commits into from
Sep 14, 2023

Conversation

olayiwola-compucorp
Copy link

@olayiwola-compucorp olayiwola-compucorp commented Sep 13, 2023

Overview

This PR updates the linking of contributions with quotations by making use of custom fields instead of a pivot table.

Before

No bulk actions on the Invoice view
Screenshot 2023-09-13 at 17 43 24

After

Bulk actions on the Invoice view
Screenshot 2023-09-13 at 17 52 31

Shows invoice is displayed when linked to quotation using Opportunity detail custom group
Single Quotation
ser

Bulk Quotation
0012134i

Technical Details

In the past, contributions were associated with quotations using a pivot table called civicase_sales_order_contribution. However, in this pull request, we have implemented a new approach by utilizing custom fields called Case_Opportunity and Quotation on the contribution. This allows for more flexibility in linking contributions to either a case or a quotation as needed.

The new custom fields belong to a new custom group CustomGroup_Opportunity_Details that extends the Contribution entity and will be added on the extension install or cache clear if it doesn't already exist.

Also, we have recreated the Quotation invoice screen so it is generated from the Contribution entity instead of CaseSalesOrderContribution entity

Comment

  • The CaseSalesOrderContribution entity will be removed in a subsequent PR.
  • Some of the invoices' bulk action is not working, this is reproducible on other CiviCRM 5.51.3 sites

@erawat erawat merged commit ea37d8c into BTHAB-3-workstream Sep 14, 2023
2 checks passed
@erawat erawat deleted the BTHAB-184-contribution-link branch September 14, 2023 08:30
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