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

When line items is enabled sometimes the generation fails #145

Open
jaapjansma opened this issue Apr 12, 2022 · 0 comments · May be fixed by #146
Open

When line items is enabled sometimes the generation fails #145

jaapjansma opened this issue Apr 12, 2022 · 0 comments · May be fixed by #146
Labels
enhancement status:needs review Code needs review and testing.
Milestone

Comments

@jaapjansma
Copy link
Contributor

Steps to reproduce

  1. Enable Line Items under Administer --> Administration Console --> Donation Receipts Profiles --> General Settings
  2. Setup a profile for the financial type donation
  3. Create a price set for event, with one field of financial type event fee and with a checkbox field with multiple options all of type donation
  4. Register a contact for this event and select at least two checkboxes (so that there are two or more line items for donations)
  5. Now try to generate a donation receipt

Expected behaviour

A donation receipt is created

Actual behaviour

An error is thrown, DB Error: already exists

Work around

Alter your database with the query below:

ALTER TABLE `donrec_snapshot` 
  DROP PRIMARY KEY, 
  ADD PRIMARY KEY (`id`), 
  ADD UNIQUE `snapshot_contrib_line_item` (`snapshot_id`, `contribution_id`, `line_item_id`);

Comment

This is a follow up of #136

jaapjansma added a commit to jaapjansma/de.systopia.donrec that referenced this issue Apr 12, 2022
@jensschuppe jensschuppe added this to the 2.2 milestone Nov 16, 2022
@jensschuppe jensschuppe added enhancement status:needs review Code needs review and testing. labels Nov 16, 2022
@bjendres bjendres modified the milestones: 2.2, 2.3 Nov 2, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement status:needs review Code needs review and testing.
Projects
None yet
3 participants