Skip to content

Commit

Permalink
Merge pull request #18521 from eileenmcnaughton/fin_type
Browse files Browse the repository at this point in the history
Improve metadata on LineItem DAO
  • Loading branch information
seamuslee001 authored Sep 20, 2020
2 parents e49c90d + 8e17d9d commit 677418f
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 3 deletions.
17 changes: 15 additions & 2 deletions CRM/Price/DAO/LineItem.php
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@
*
* Generated from xml/schema/CRM/Price/LineItem.xml
* DO NOT EDIT. Generated by CRM_Core_CodeGen
* (GenCodeChecksum:5a365a7d4b14c9b5963aeb61576395e4)
* (GenCodeChecksum:c9962dd4253fbcf43073bf10fbb0ce86)
*/

/**
Expand Down Expand Up @@ -238,6 +238,12 @@ public static function &fields() {
'bao' => 'CRM_Price_BAO_LineItem',
'localizable' => 0,
'FKClassName' => 'CRM_Price_DAO_PriceField',
'pseudoconstant' => [
'table' => 'civicrm_price_field',
'keyColumn' => 'id',
'labelColumn' => 'label',
'nameColumn' => 'name',
],
'add' => '1.7',
],
'label' => [
Expand Down Expand Up @@ -343,12 +349,18 @@ public static function &fields() {
'bao' => 'CRM_Price_BAO_LineItem',
'localizable' => 0,
'FKClassName' => 'CRM_Price_DAO_PriceFieldValue',
'pseudoconstant' => [
'table' => 'civicrm_price_field_value',
'keyColumn' => 'id',
'labelColumn' => 'label',
'nameColumn' => 'name',
],
'add' => '3.3',
],
'financial_type_id' => [
'name' => 'financial_type_id',
'type' => CRM_Utils_Type::T_INT,
'title' => ts('Financial Type'),
'title' => ts('Financial Type ID'),
'description' => ts('FK to Financial Type.'),
'where' => 'civicrm_line_item.financial_type_id',
'default' => 'NULL',
Expand All @@ -359,6 +371,7 @@ public static function &fields() {
'FKClassName' => 'CRM_Financial_DAO_FinancialType',
'html' => [
'type' => 'Select',
'label' => ts("Financial Type"),
],
'pseudoconstant' => [
'table' => 'civicrm_financial_type',
Expand Down
15 changes: 14 additions & 1 deletion xml/schema/Price/LineItem.xml
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,12 @@
<title>Line Item Price Field</title>
<type>int unsigned</type>
<comment>FK to civicrm_price_field</comment>
<pseudoconstant>
<table>civicrm_price_field</table>
<keyColumn>id</keyColumn>
<nameColumn>name</nameColumn>
<labelColumn>label</labelColumn>
</pseudoconstant>
<!-- changed to not required in 4.3 in order to change ON DELETE CASCADE FK constraint to SET NULL -->
<add>1.7</add>
</field>
Expand Down Expand Up @@ -145,6 +151,12 @@
<type>int unsigned</type>
<default>NULL</default>
<comment>FK to civicrm_price_field_value</comment>
<pseudoconstant>
<table>civicrm_price_field_value</table>
<keyColumn>id</keyColumn>
<nameColumn>name</nameColumn>
<labelColumn>label</labelColumn>
</pseudoconstant>
<add>3.3</add>
</field>
<foreignKey>
Expand All @@ -155,7 +167,7 @@
</foreignKey>
<field>
<name>financial_type_id</name>
<title>Financial Type</title>
<title>Financial Type ID</title>
<type>int unsigned</type>
<default>NULL</default>
<pseudoconstant>
Expand All @@ -167,6 +179,7 @@
<add>4.3</add>
<html>
<type>Select</type>
<label>Financial Type</label>
</html>
</field>
<foreignKey>
Expand Down

0 comments on commit 677418f

Please sign in to comment.