From: eileen Date: Sun, 28 Mar 2021 02:39:33 +0000 (+1300) Subject: Add entity financial account X-Git-Url: https://vcs.fsf.org/?a=commitdiff_plain;h=37c608f6e388f7b0b560bff7042bf8f74054c6fa;p=civicrm-core.git Add entity financial account --- diff --git a/CRM/Financial/BAO/EntityFinancialAccount.php b/CRM/Financial/BAO/EntityFinancialAccount.php new file mode 100644 index 0000000000..1449091204 --- /dev/null +++ b/CRM/Financial/BAO/EntityFinancialAccount.php @@ -0,0 +1,32 @@ + ts('Financial Type'), + 'civicrm_option_value' => ts('Payment Instrument'), + 'civicrm_payment_processor' => ts('Payment Processor'), + ]; + } + +} diff --git a/CRM/Financial/DAO/EntityFinancialAccount.php b/CRM/Financial/DAO/EntityFinancialAccount.php index 03e3669020..90320f8ab9 100644 --- a/CRM/Financial/DAO/EntityFinancialAccount.php +++ b/CRM/Financial/DAO/EntityFinancialAccount.php @@ -6,7 +6,7 @@ * * Generated from xml/schema/CRM/Financial/EntityFinancialAccount.xml * DO NOT EDIT. Generated by CRM_Core_CodeGen - * (GenCodeChecksum:caf02136c148fe50dbc39d8d29605f72) + * (GenCodeChecksum:ac2a0a2e8eae1471b71da25e95b52d55) */ /** @@ -117,7 +117,7 @@ class CRM_Financial_DAO_EntityFinancialAccount extends CRM_Core_DAO { 'where' => 'civicrm_entity_financial_account.id', 'table_name' => 'civicrm_entity_financial_account', 'entity' => 'EntityFinancialAccount', - 'bao' => 'CRM_Financial_DAO_EntityFinancialAccount', + 'bao' => 'CRM_Financial_BAO_EntityFinancialAccount', 'localizable' => 0, 'html' => [ 'type' => 'Number', @@ -138,8 +138,11 @@ class CRM_Financial_DAO_EntityFinancialAccount extends CRM_Core_DAO { 'export' => TRUE, 'table_name' => 'civicrm_entity_financial_account', 'entity' => 'EntityFinancialAccount', - 'bao' => 'CRM_Financial_DAO_EntityFinancialAccount', + 'bao' => 'CRM_Financial_BAO_EntityFinancialAccount', 'localizable' => 0, + 'pseudoconstant' => [ + 'callback' => 'CRM_Financial_BAO_EntityFinancialAccount::entityTables', + ], 'add' => '4.3', ], 'entity_id' => [ @@ -151,7 +154,7 @@ class CRM_Financial_DAO_EntityFinancialAccount extends CRM_Core_DAO { 'where' => 'civicrm_entity_financial_account.entity_id', 'table_name' => 'civicrm_entity_financial_account', 'entity' => 'EntityFinancialAccount', - 'bao' => 'CRM_Financial_DAO_EntityFinancialAccount', + 'bao' => 'CRM_Financial_BAO_EntityFinancialAccount', 'localizable' => 0, 'add' => '4.3', ], @@ -164,7 +167,7 @@ class CRM_Financial_DAO_EntityFinancialAccount extends CRM_Core_DAO { 'where' => 'civicrm_entity_financial_account.account_relationship', 'table_name' => 'civicrm_entity_financial_account', 'entity' => 'EntityFinancialAccount', - 'bao' => 'CRM_Financial_DAO_EntityFinancialAccount', + 'bao' => 'CRM_Financial_BAO_EntityFinancialAccount', 'localizable' => 0, 'html' => [ 'type' => 'Select', @@ -184,7 +187,7 @@ class CRM_Financial_DAO_EntityFinancialAccount extends CRM_Core_DAO { 'where' => 'civicrm_entity_financial_account.financial_account_id', 'table_name' => 'civicrm_entity_financial_account', 'entity' => 'EntityFinancialAccount', - 'bao' => 'CRM_Financial_DAO_EntityFinancialAccount', + 'bao' => 'CRM_Financial_BAO_EntityFinancialAccount', 'localizable' => 0, 'FKClassName' => 'CRM_Financial_DAO_FinancialAccount', 'html' => [ diff --git a/Civi/Api4/EntityFinancialAccount.php b/Civi/Api4/EntityFinancialAccount.php new file mode 100644 index 0000000000..0963f73a93 --- /dev/null +++ b/Civi/Api4/EntityFinancialAccount.php @@ -0,0 +1,34 @@ +_apiversion = $version; $params = [ 'sequential' => 1, diff --git a/xml/schema/Financial/EntityFinancialAccount.xml b/xml/schema/Financial/EntityFinancialAccount.xml index 95e3111928..8c70d4c706 100644 --- a/xml/schema/Financial/EntityFinancialAccount.xml +++ b/xml/schema/Financial/EntityFinancialAccount.xml @@ -32,6 +32,9 @@ true 4.3 Links to an entity_table like civicrm_financial_type + + CRM_Financial_BAO_EntityFinancialAccount::entityTables + entity_id