Skip to content

Commit

Permalink
Add database changes to support > 2 decimal places in calculations
Browse files Browse the repository at this point in the history
  • Loading branch information
mattwire committed Oct 16, 2017
1 parent a2cf355 commit 88ac815
Show file tree
Hide file tree
Showing 4 changed files with 13 additions and 10 deletions.
6 changes: 3 additions & 3 deletions CRM/Member/DAO/MembershipType.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
*
* Generated from xml/schema/CRM/Member/MembershipType.xml
* DO NOT EDIT. Generated by CRM_Core_CodeGen
* (GenCodeChecksum:22af2c3f87df3ad7cf2002c145f53cc6)
* (GenCodeChecksum:c86019d4817d79e1dd59d69eaa2a3eb6)
*/
require_once 'CRM/Core/DAO.php';
require_once 'CRM/Utils/Type.php';
Expand Down Expand Up @@ -299,8 +299,8 @@ static function &fields() {
'title' => ts('membership Type Minimum Fee') ,
'description' => 'Minimum fee for this membership (0 for free/complimentary memberships).',
'precision' => array(
20,
2
18,
9
) ,
'table_name' => 'civicrm_membership_type',
'entity' => 'MembershipType',
Expand Down
12 changes: 7 additions & 5 deletions CRM/Price/DAO/PriceFieldValue.php
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
*
* Generated from xml/schema/CRM/Price/PriceFieldValue.xml
* DO NOT EDIT. Generated by CRM_Core_CodeGen
* (GenCodeChecksum:d5b9853fb1321ad9872ce5b11a582d81)
* (GenCodeChecksum:fed218269d1baab495490130b4e2442a)
*/
require_once 'CRM/Core/DAO.php';
require_once 'CRM/Utils/Type.php';
Expand Down Expand Up @@ -95,7 +95,7 @@ class CRM_Price_DAO_PriceFieldValue extends CRM_Core_DAO {
/**
* Price field option amount
*
* @var string
* @var float
*/
public $amount;
/**
Expand Down Expand Up @@ -292,12 +292,14 @@ static function &fields() {
) ,
'amount' => array(
'name' => 'amount',
'type' => CRM_Utils_Type::T_STRING,
'type' => CRM_Utils_Type::T_MONEY,
'title' => ts('Amount') ,
'description' => 'Price field option amount',
'required' => true,
'maxlength' => 512,
'size' => 8,
'precision' => array(
18,
9
) ,
'table_name' => 'civicrm_price_field_value',
'entity' => 'PriceFieldValue',
'bao' => 'CRM_Price_BAO_PriceFieldValue',
Expand Down
1 change: 1 addition & 0 deletions xml/schema/Member/MembershipType.xml
Original file line number Diff line number Diff line change
Expand Up @@ -116,6 +116,7 @@
<name>minimum_fee</name>
<title>membership Type Minimum Fee</title>
<type>decimal</type>
<length>18,9</length>
<comment>Minimum fee for this membership (0 for free/complimentary memberships).</comment>
<default>0</default>
<add>1.5</add>
Expand Down
4 changes: 2 additions & 2 deletions xml/schema/Price/PriceFieldValue.xml
Original file line number Diff line number Diff line change
Expand Up @@ -95,9 +95,9 @@
</field>
<field>
<name>amount</name>
<type>varchar</type>
<type>decimal</type>
<title>Amount</title>
<length>512</length>
<length>18,9</length>
<html>
<type>Text</type>
<size>8</size>
Expand Down

0 comments on commit 88ac815

Please sign in to comment.