Skip to content
Snippets Groups Projects
Unverified Commit 027ef846 authored by Eileen McNaughton's avatar Eileen McNaughton Committed by GitHub
Browse files

Merge pull request #19932 from eileenmcnaughton/ft

#2486 Add entity financial trxn
parents 17a063b8 becebb63
Branches
Tags
No related merge requests found
<?php
/*
+--------------------------------------------------------------------+
| Copyright CiviCRM LLC. All rights reserved. |
| |
| This work is published under the GNU AGPLv3 license with some |
| permitted exceptions and without any warranty. For full license |
| and copyright information, see https://civicrm.org/licensing |
+--------------------------------------------------------------------+
*/
/**
*
* @package CRM
* @copyright CiviCRM LLC https://civicrm.org/licensing
*/
class CRM_Financial_BAO_EntityFinancialTrxn extends CRM_Financial_DAO_EntityFinancialTrxn {
/**
* Whitelist of possible values for the entity_table field
*
* @return array
*/
public static function entityTables(): array {
return [
'civicrm_contribution' => ts('Contribution'),
'civicrm_financial_item' => ts('Financial Item'),
];
}
}
......@@ -6,7 +6,7 @@
*
* Generated from xml/schema/CRM/Financial/EntityFinancialTrxn.xml
* DO NOT EDIT. Generated by CRM_Core_CodeGen
* (GenCodeChecksum:b5fb467815fb6b501dbd2f2cd789b1b9)
* (GenCodeChecksum:c45a5259ff34bda9b9bad9ced505ff16)
*/
/**
......@@ -113,7 +113,7 @@ class CRM_Financial_DAO_EntityFinancialTrxn extends CRM_Core_DAO {
'where' => 'civicrm_entity_financial_trxn.id',
'table_name' => 'civicrm_entity_financial_trxn',
'entity' => 'EntityFinancialTrxn',
'bao' => 'CRM_Financial_DAO_EntityFinancialTrxn',
'bao' => 'CRM_Financial_BAO_EntityFinancialTrxn',
'localizable' => 0,
'html' => [
'type' => 'Number',
......@@ -134,8 +134,11 @@ class CRM_Financial_DAO_EntityFinancialTrxn extends CRM_Core_DAO {
'export' => TRUE,
'table_name' => 'civicrm_entity_financial_trxn',
'entity' => 'EntityFinancialTrxn',
'bao' => 'CRM_Financial_DAO_EntityFinancialTrxn',
'bao' => 'CRM_Financial_BAO_EntityFinancialTrxn',
'localizable' => 0,
'pseudoconstant' => [
'callback' => 'CRM_Financial_BAO_EntityFinancialTrxn::entityTables',
],
'add' => '3.2',
],
'entity_id' => [
......@@ -146,7 +149,7 @@ class CRM_Financial_DAO_EntityFinancialTrxn extends CRM_Core_DAO {
'where' => 'civicrm_entity_financial_trxn.entity_id',
'table_name' => 'civicrm_entity_financial_trxn',
'entity' => 'EntityFinancialTrxn',
'bao' => 'CRM_Financial_DAO_EntityFinancialTrxn',
'bao' => 'CRM_Financial_BAO_EntityFinancialTrxn',
'localizable' => 0,
'add' => '3.2',
],
......@@ -157,7 +160,7 @@ class CRM_Financial_DAO_EntityFinancialTrxn extends CRM_Core_DAO {
'where' => 'civicrm_entity_financial_trxn.financial_trxn_id',
'table_name' => 'civicrm_entity_financial_trxn',
'entity' => 'EntityFinancialTrxn',
'bao' => 'CRM_Financial_DAO_EntityFinancialTrxn',
'bao' => 'CRM_Financial_BAO_EntityFinancialTrxn',
'localizable' => 0,
'FKClassName' => 'CRM_Financial_DAO_FinancialTrxn',
'html' => [
......@@ -182,7 +185,7 @@ class CRM_Financial_DAO_EntityFinancialTrxn extends CRM_Core_DAO {
'export' => TRUE,
'table_name' => 'civicrm_entity_financial_trxn',
'entity' => 'EntityFinancialTrxn',
'bao' => 'CRM_Financial_DAO_EntityFinancialTrxn',
'bao' => 'CRM_Financial_BAO_EntityFinancialTrxn',
'localizable' => 0,
'add' => '3.2',
],
......
<?php
/*
+--------------------------------------------------------------------+
| Copyright CiviCRM LLC. All rights reserved. |
| |
| This work is published under the GNU AGPLv3 license with some |
| permitted exceptions and without any warranty. For full license |
| and copyright information, see https://civicrm.org/licensing |
+--------------------------------------------------------------------+
*/
/**
*
* @package CRM
* @copyright CiviCRM LLC https://civicrm.org/licensing
*/
namespace Civi\Api4;
/**
* EntityFinancialTrxns. Joins financial transactions to contributions
* and financial items.
*
* @see https://docs.civicrm.org/dev/en/latest/financial/financialentities/
*
* @bridge entity_id financial_trxn_id
*
* @package Civi\Api4
*/
class EntityFinancialTrxn extends Generic\DAOEntity {
use Generic\Traits\EntityBridge;
}
......@@ -28,6 +28,9 @@
<length>64</length>
<required>true</required>
<import>true</import>
<pseudoconstant>
<callback>CRM_Financial_BAO_EntityFinancialTrxn::entityTables</callback>
</pseudoconstant>
<add>3.2</add>
<comment>May contain civicrm_financial_item, civicrm_contribution, civicrm_financial_trxn, civicrm_grant, etc</comment>
</field>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment