Body: <p>If you add a donation field (financial type 'donation' which is deductible) to a membership price set that includes membership types that are nondeductible, and then use that price set for a membership contribution form, the deductible value on the contribution is saved as membership fee + donation amount instead of just the membership fee portion of the contribution. This means the nondeductible value can not be trusted. </p>
  
  <p>We use the CDN Tax Receipts extension so to get around the issue we wiped out the nondeductible value from all relevant contributions and let the extension + a custom extension calculate the correct values.</p>
  
  <p>This was replicated on <a href="https://dmaster.demo.civicrm.org/" rel="nofollow noreferrer">https://dmaster.demo.civicrm.org/</a> running 5.26.alpha1</p>
  
  <p>How to replicate:</p>
  
  <pre><code>- add a test organization and test individual
  - create a nondeductible financial type and a deductible financial type
  - create 2 new membership types for your test organization with a fee and set one to the deductible type, and one to the nondeductible type
  - create a price set with 2 fields: 
     - radio option with the 2 membership types
     - radio option with a couple of donation values to choose from, financial type 'donation' 
  - create a new contribution form, default financial type your custom deductible financial type, and enable your price set on the memberships tab
  - now use your new form to create a membership for your test individual and make sure to select the nondeductible membership type &amp; a donation value.
  - go to the individual's profile and pull-up the contribution on the contributions tab
  </code></pre>
  
  <p>To me, it would make sense if the nondeductible value included the donation amount if the contribution status were anything other than 'complete' (pending check for example, because we wouldn't want to issue a tax receipt for monies not receive), but once that status is set to complete then the nondeductible value should respect the financial types of the individual line items.</p>
  
  <p>If this is by design, how would we get around it?</p>
  
  <p>Thanks!</p>
  
  <p><a href="https://i.sstatic.net/3X9oo.png" rel="nofollow noreferrer"><img src="https://i.sstatic.net/3X9oo.png" alt="sample contribution with incorrect nondeductible value"></a></p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2021-02-23T21:32:40.200Z
Comments.Text: A new issue was created here: https://lab.civicrm.org/dev/core/-/issues/2414
Comments.UserDisplayName: freeform.steph
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2020-05-15T21:23:07.800Z
Comments.Text: @pradeep-nayak is this something you would have any insight into? Or know whether it's a bug or by design? Thanks!
Comments.UserDisplayName: freeform.steph
Tags: <civimember><contributions>
Title: Non deductible value incorrect if you choose a nondeductible membership type and make a donation at the same time
ThreadText: # Non deductible value incorrect if you choose a nondeductible membership type and make a donation at the same time
  
  (Asked by: username_0 on 2020-04-06)
  
  If you add a donation field (financial type 'donation' which is deductible) to a membership price set that includes membership types that are nondeductible, and then use that price set for a membership contribution form, the deductible value on the contribution is saved as membership fee + donation amount instead of just the membership fee portion of the contribution. This means the nondeductible value can not be trusted.
  
  We use the CDN Tax Receipts extension so to get around the issue we wiped out the nondeductible value from all relevant contributions and let the extension + a custom extension calculate the correct values.
  
  This was replicated on <https://dmaster.demo.civicrm.org/> running 5.26.alpha1
  
  How to replicate:
  
  ```
  - add a test organization and test individual
  - create a nondeductible financial type and a deductible financial type
  - create 2 new membership types for your test organization with a fee and set one to the deductible type, and one to the nondeductible type
  - create a price set with 2 fields: 
     - radio option with the 2 membership types
     - radio option with a couple of donation values to choose from, financial type 'donation' 
  - create a new contribution form, default financial type your custom deductible financial type, and enable your price set on the memberships tab
  - now use your new form to create a membership for your test individual and make sure to select the nondeductible membership type & a donation value.
  - go to the individual's profile and pull-up the contribution on the contributions tab
  
  ```
  
  To me, it would make sense if the nondeductible value included the donation amount if the contribution status were anything other than 'complete' (pending check for example, because we wouldn't want to issue a tax receipt for monies not receive), but once that status is set to complete then the nondeductible value should respect the financial types of the individual line items.
  
  If this is by design, how would we get around it?
  
  Thanks!
  
  [![sample contribution with incorrect nondeductible value](https://i.sstatic.net/3X9oo.png)](https://i.sstatic.net/3X9oo.png)
  
  **Tags:** civimember, contributions
  
  > **Comments:**
  > **username_0**: @pradeep-nayak is this something you would have any insight into? Or know whether it's a bug or by design? Thanks!  
  > **username_0**: A new issue was created here: https://lab.civicrm.org/dev/core/-/issues/2414  
  
  ---
  
  ## 0 answers
  
  