Body: <p>I'd like to add custom code in my contribution receipts that does the following: </p>
  
  <p>{if $contributionIsTaxDeductible == True}
  No goods or services were exchange for this donation 
  Tax id 12-3456789
  {/if}</p>
  
  <p>Is there a way to do this?</p>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-11-28T04:34:14.540Z
Comments.Text: Are you familiar with the API explorer? (Support -> Developer)
Comments.UserDisplayName: Luke Stewart
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-11-28T04:35:06.390Z
Comments.Text: Yes I am familiar with it
Comments.UserDisplayName: Yossi
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-11-28T04:39:35.417Z
Comments.Text: how are you defining contributionIsTaxDeductible? Or is that the problem?
Comments.UserDisplayName: Luke Stewart
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-11-28T04:40:50.163Z
Comments.Text: The financial type has a is_deductible setting
Comments.UserDisplayName: Yossi
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2019-11-28T05:09:55.870Z
Comments.Text: What about using a chained api call like this?
  
  {php}
    $this->assign("param_api_financialtype_getsingle", ['id' => "\$value.financial_type_id", 'return' => "is_deductible"]);
  {/php}
  {crmAPI var='result' entity='Contribution' action='get' return="financial_type_id" id=3783 api.FinancialType.getsingle=$param_api_financialtype_getsingle}
Comments.UserDisplayName: Luke Stewart
Tags: <receipts><smarty>
Title: Smarty Variable for tax deductible
ThreadText: # Smarty Variable for tax deductible
  
  (Asked by: username_0 on 2019-11-27)
  
  I'd like to add custom code in my contribution receipts that does the following:
  
  {if $contributionIsTaxDeductible == True}
  No goods or services were exchange for this donation
  Tax id 12-3456789
  {/if}
  
  Is there a way to do this?
  
  **Tags:** receipts, smarty
  
  > **Comments:**
  > **username_1**: Are you familiar with the API explorer? (Support -> Developer)  
  > **username_0**: Yes I am familiar with it  
  > **username_1**: how are you defining contributionIsTaxDeductible? Or is that the problem?  
  > **username_0**: The financial type has a is_deductible setting  
  > **username_1**: What about using a chained api call like this?  {php}   $this->assign("param_api_financialtype_getsingle", ['id' => "\$value.financial_type_id", 'return' => "is_deductible"]); {/php} {crmAPI var='result' entity='Contribution' action='get' return="financial_type_id" id=3783 api.FinancialType.getsingle=$param_api_financialtype_getsingle}  
  
  ---
  
  ## 0 answers
  
  