Body: <p>When I create a contribution using our financial type &quot;in-kind&quot;, which seemingly worked at some point, I can create the contribution, but then cannot view or edit it or send a receipt. I get an error &quot;One of parameters (value: NULL) is not of the type Integer&quot;. I'm not sure where this financial type even came from. It has some required fields that don't sound like something I would have added, so I'm thinking it came in some extension, but I'm not sure. No extension seems to be referenced in the error log.</p>
  <p>The log is not particularly edifying to me, but I'm hoping someone else will see something that gives a hint where to look.</p>
  <pre><code>Jun 29 10:58:27  [error]
  $Fatal Error Details = array:3 [
    &quot;message&quot; =&gt; &quot;One of parameters  (value: NULL) is not of the type Integer&quot;
    &quot;code&quot; =&gt; null
    &quot;exception&quot; =&gt; CRM_Core_Exception {#12905
      -errorData: array:1 [
        &quot;error_code&quot; =&gt; 0
      ]
      #cause: null
      -_trace: null
      #message: &quot;One of parameters  (value: NULL) is not of the type Integer&quot;
      #code: 0
      #file: &quot;/var/www/civi.yoursite.org/wordpress/wp-content/plugins/civicrm/civicrm/CRM/Utils/Type.php&quot;
      #line: 474
      trace: {
        /var/www/civi.yoursite.org/wordpress/wp-content/plugins/civicrm/civicrm/CRM/Utils/Type.php:474 {
          CRM_Utils_Type::validate($data, $type, $abort = true, $name = '…18')
          ›   $data = htmlentities($data ?? 'NULL');
          ›   throw new CRM_Core_Exception(&quot;$name (value: $data) is not of the type $type&quot;);
          › }
        }
        /var/www/civi.yoursite.org/wordpress/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php:1739 { …}
        /var/www/civi.yoursite.org/wordpress/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php:1619 { …}
        /var/www/civi.yoursite.org/wordpress/wp-content/plugins/civicrm/civicrm/CRM/Core/BAO/FinancialTrxn.php:36 { …}
        /var/www/civi.yoursite.org/wordpress/wp-content/plugins/civicrm/civicrm/CRM/Contribute/BAO/Contribution.php:3586 { …}
        /var/www/civi.yoursite.org/wordpress/wp-content/plugins/civicrm/civicrm/CRM/Contribute/Form/AbstractEditPayment.php:725 { …}
        /var/www/civi.yoursite.org/wordpress/wp-content/plugins/civicrm/civicrm/CRM/Contribute/Form/Contribution.php:255 { …}
        /var/www/civi.yoursite.org/wordpress/wp-content/plugins/civicrm/civicrm/CRM/Core/Form.php:707 { …}
        /var/www/civi.yoursite.org/wordpress/wp-content/plugins/civicrm/civicrm/CRM/Core/QuickForm/Action/Display.php:76 { …}
        /var/www/civi.yoursite.org/wordpress/wp-content/plugins/civicrm/civicrm/packages/HTML/QuickForm/Controller.php:203 { …}
        /var/www/civi.yoursite.org/wordpress/wp-content/plugins/civicrm/civicrm/packages/HTML/QuickForm/Page.php:103 { …}
        /var/www/civi.yoursite.org/wordpress/wp-content/plugins/civicrm/civicrm/CRM/Core/Controller.php:355 { …}
        /var/www/civi.yoursite.org/wordpress/wp-content/plugins/civicrm/civicrm/CRM/Contribute/Page/Tab.php:409 { …}
        /var/www/civi.yoursite.org/wordpress/wp-content/plugins/civicrm/civicrm/CRM/Contribute/Page/Tab.php:463 { …}
        /var/www/civi.yoursite.org/wordpress/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:319 { …}
        /var/www/civi.yoursite.org/wordpress/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:69 { …}
        /var/www/civi.yoursite.org/wordpress/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:36 { …}
        /var/www/civi.yoursite.org/wordpress/wp-content/plugins/civicrm/civicrm.php:1199 { …}
        /var/www/civi.yoursite.org/wordpress/wp-includes/class-wp-hook.php:308 { …}
        /var/www/civi.yoursite.org/wordpress/wp-includes/class-wp-hook.php:332 { …}
        /var/www/civi.yoursite.org/wordpress/wp-includes/plugin.php:517 { …}
        /var/www/civi.yoursite.org/wordpress/wp-admin/admin.php:259 { …}
      }
    }
  ]
  
  
  Jun 29 10:58:27  [debug] $backTrace = #0 /var/www/civi.yoursite.org/wordpress/wp-content/plugins/civicrm/civicrm/CRM/Core/Error.php(443): CRM_Core_Error::backtrace(&quot;backTrace&quot;, TRUE)
  #1 /var/www/civi.yoursite.org/wordpress/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(39): CRM_Core_Error::handleUnhandledException(Object(CRM_Core_Exception))
  #2 /var/www/civi.yoursite.org/wordpress/wp-content/plugins/civicrm/civicrm.php(1199): CRM_Core_Invoke::invoke((Array:4))
  #3 /var/www/civi.yoursite.org/wordpress/wp-includes/class-wp-hook.php(308): CiviCRM_For_WordPress-&gt;invoke(&quot;&quot;)
  #4 /var/www/civi.yoursite.org/wordpress/wp-includes/class-wp-hook.php(332): WP_Hook-&gt;apply_filters(&quot;&quot;, (Array:1))
  #5 /var/www/civi.yoursite.org/wordpress/wp-includes/plugin.php(517): WP_Hook-&gt;do_action((Array:1))
  #6 /var/www/civi.yoursite.org/wordpress/wp-admin/admin.php(259): do_action(&quot;toplevel_page_CiviCRM&quot;)
  #7 {main}
  </code></pre>
  
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-06-29T15:53:08.237Z
Comments.Text: Double check that your in-kind financial type has an Accounts Receivable attached (I don't think it should be possible for it not to, but that's what the error points to).
Comments.UserDisplayName: Lars SG
Comments.ContentLicense: CC BY-SA 4.0
Comments.CreationDate: 2023-06-29T16:53:13.007Z
Comments.Text: It comes from cdntaxreceipts. It's possible you deleted the account as noted. Also if you have changed its name it can break things. There's an [open PR](https://lab.civicrm.org/extensions/cdntaxreceipts/-/merge_requests/184) there to fix that but if this is the case try changing it back to "In-kind".
Comments.UserDisplayName: Demerit
Tags: <civicontribute>
Title: error "One of parameters (value: NULL) is not of the type Integer" when viewing a contribution of type In-Kind
ThreadText: # error "One of parameters (value: NULL) is not of the type Integer" when viewing a contribution of type In-Kind
  
  (Asked by: username_0 on 2023-06-29)
  
  When I create a contribution using our financial type "in-kind", which seemingly worked at some point, I can create the contribution, but then cannot view or edit it or send a receipt. I get an error "One of parameters (value: NULL) is not of the type Integer". I'm not sure where this financial type even came from. It has some required fields that don't sound like something I would have added, so I'm thinking it came in some extension, but I'm not sure. No extension seems to be referenced in the error log.
  
  The log is not particularly edifying to me, but I'm hoping someone else will see something that gives a hint where to look.
  
  ```
  Jun 29 10:58:27  [error]
  $Fatal Error Details = array:3 [
    "message" => "One of parameters  (value: NULL) is not of the type Integer"
    "code" => null
    "exception" => CRM_Core_Exception {#12905
      -errorData: array:1 [
        "error_code" => 0
      ]
      #cause: null
      -_trace: null
      #message: "One of parameters  (value: NULL) is not of the type Integer"
      #code: 0
      #file: "/var/www/civi.yoursite.org/wordpress/wp-content/plugins/civicrm/civicrm/CRM/Utils/Type.php"
      #line: 474
      trace: {
        /var/www/civi.yoursite.org/wordpress/wp-content/plugins/civicrm/civicrm/CRM/Utils/Type.php:474 {
          CRM_Utils_Type::validate($data, $type, $abort = true, $name = '…18')
          ›   $data = htmlentities($data ?? 'NULL');
          ›   throw new CRM_Core_Exception("$name (value: $data) is not of the type $type");
          › }
        }
        /var/www/civi.yoursite.org/wordpress/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php:1739 { …}
        /var/www/civi.yoursite.org/wordpress/wp-content/plugins/civicrm/civicrm/CRM/Core/DAO.php:1619 { …}
        /var/www/civi.yoursite.org/wordpress/wp-content/plugins/civicrm/civicrm/CRM/Core/BAO/FinancialTrxn.php:36 { …}
        /var/www/civi.yoursite.org/wordpress/wp-content/plugins/civicrm/civicrm/CRM/Contribute/BAO/Contribution.php:3586 { …}
        /var/www/civi.yoursite.org/wordpress/wp-content/plugins/civicrm/civicrm/CRM/Contribute/Form/AbstractEditPayment.php:725 { …}
        /var/www/civi.yoursite.org/wordpress/wp-content/plugins/civicrm/civicrm/CRM/Contribute/Form/Contribution.php:255 { …}
        /var/www/civi.yoursite.org/wordpress/wp-content/plugins/civicrm/civicrm/CRM/Core/Form.php:707 { …}
        /var/www/civi.yoursite.org/wordpress/wp-content/plugins/civicrm/civicrm/CRM/Core/QuickForm/Action/Display.php:76 { …}
        /var/www/civi.yoursite.org/wordpress/wp-content/plugins/civicrm/civicrm/packages/HTML/QuickForm/Controller.php:203 { …}
        /var/www/civi.yoursite.org/wordpress/wp-content/plugins/civicrm/civicrm/packages/HTML/QuickForm/Page.php:103 { …}
        /var/www/civi.yoursite.org/wordpress/wp-content/plugins/civicrm/civicrm/CRM/Core/Controller.php:355 { …}
        /var/www/civi.yoursite.org/wordpress/wp-content/plugins/civicrm/civicrm/CRM/Contribute/Page/Tab.php:409 { …}
        /var/www/civi.yoursite.org/wordpress/wp-content/plugins/civicrm/civicrm/CRM/Contribute/Page/Tab.php:463 { …}
        /var/www/civi.yoursite.org/wordpress/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:319 { …}
        /var/www/civi.yoursite.org/wordpress/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:69 { …}
        /var/www/civi.yoursite.org/wordpress/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php:36 { …}
        /var/www/civi.yoursite.org/wordpress/wp-content/plugins/civicrm/civicrm.php:1199 { …}
        /var/www/civi.yoursite.org/wordpress/wp-includes/class-wp-hook.php:308 { …}
        /var/www/civi.yoursite.org/wordpress/wp-includes/class-wp-hook.php:332 { …}
        /var/www/civi.yoursite.org/wordpress/wp-includes/plugin.php:517 { …}
        /var/www/civi.yoursite.org/wordpress/wp-admin/admin.php:259 { …}
      }
    }
  ]
  
  Jun 29 10:58:27  [debug] $backTrace = #0 /var/www/civi.yoursite.org/wordpress/wp-content/plugins/civicrm/civicrm/CRM/Core/Error.php(443): CRM_Core_Error::backtrace("backTrace", TRUE)
  #1 /var/www/civi.yoursite.org/wordpress/wp-content/plugins/civicrm/civicrm/CRM/Core/Invoke.php(39): CRM_Core_Error::handleUnhandledException(Object(CRM_Core_Exception))
  #2 /var/www/civi.yoursite.org/wordpress/wp-content/plugins/civicrm/civicrm.php(1199): CRM_Core_Invoke::invoke((Array:4))
  #3 /var/www/civi.yoursite.org/wordpress/wp-includes/class-wp-hook.php(308): CiviCRM_For_WordPress->invoke("")
  #4 /var/www/civi.yoursite.org/wordpress/wp-includes/class-wp-hook.php(332): WP_Hook->apply_filters("", (Array:1))
  #5 /var/www/civi.yoursite.org/wordpress/wp-includes/plugin.php(517): WP_Hook->do_action((Array:1))
  #6 /var/www/civi.yoursite.org/wordpress/wp-admin/admin.php(259): do_action("toplevel_page_CiviCRM")
  #7 {main}
  
  ```
  
  **Tags:** civicontribute
  
  > **Comments:**
  > **username_1**: Double check that your in-kind financial type has an Accounts Receivable attached (I don't think it should be possible for it not to, but that's what the error points to).  
  > **username_2**: It comes from cdntaxreceipts. It's possible you deleted the account as noted. Also if you have changed its name it can break things. There's an [open PR](https://lab.civicrm.org/extensions/cdntaxreceipts/-/merge_requests/184) there to fix that but if this is the case try changing it back to "In-kind".  
  
  ---
  
  ## 0 answers
  
  