Skip to content
Snippets Groups Projects
Commit b0bce9bd authored by Kevin Cristiano's avatar Kevin Cristiano :earth_americas:
Browse files

add changes to Bookkeeping Report to add addresses

parent e2f6c108
Branches master
No related tags found
No related merge requests found
...@@ -353,7 +353,8 @@ class CRM_Additionalreports_Form_Report_BookkeepingExtra extends CRM_Report_Form ...@@ -353,7 +353,8 @@ class CRM_Additionalreports_Form_Report_BookkeepingExtra extends CRM_Report_Form
'amount' => array('title' => ts('Amount')), 'amount' => array('title' => ts('Amount')),
), ),
), ),
); )
+ $this->addAddressFields(FALSE);
$this->_groupFilter = TRUE; $this->_groupFilter = TRUE;
$this->_tagFilter = TRUE; $this->_tagFilter = TRUE;
...@@ -441,6 +442,8 @@ class CRM_Additionalreports_Form_Report_BookkeepingExtra extends CRM_Report_Form ...@@ -441,6 +442,8 @@ class CRM_Additionalreports_Form_Report_BookkeepingExtra extends CRM_Report_Form
ON fitem.id = {$this->_aliases['civicrm_entity_financial_trxn']}_item.entity_id ON fitem.id = {$this->_aliases['civicrm_entity_financial_trxn']}_item.entity_id
LEFT JOIN civicrm_financial_account {$this->_aliases['civicrm_financial_account']}_credit_2 LEFT JOIN civicrm_financial_account {$this->_aliases['civicrm_financial_account']}_credit_2
ON fitem.financial_account_id = {$this->_aliases['civicrm_financial_account']}_credit_2.id ON fitem.financial_account_id = {$this->_aliases['civicrm_financial_account']}_credit_2.id
LEFT JOIN civicrm_address {$this->_aliases['civicrm_address']}
ON {$this->_aliases['civicrm_address']}.contact_id = {$this->_aliases['civicrm_contact']}.id AND {$this->_aliases['civicrm_address']}.is_primary = 1
LEFT JOIN civicrm_line_item {$this->_aliases['civicrm_line_item']} LEFT JOIN civicrm_line_item {$this->_aliases['civicrm_line_item']}
ON fitem.entity_id = {$this->_aliases['civicrm_line_item']}.id AND fitem.entity_table = 'civicrm_line_item' "; ON fitem.entity_id = {$this->_aliases['civicrm_line_item']}.id AND fitem.entity_table = 'civicrm_line_item' ";
if ($this->isTableSelected('civicrm_batch')) { if ($this->isTableSelected('civicrm_batch')) {
...@@ -637,6 +640,19 @@ class CRM_Additionalreports_Form_Report_BookkeepingExtra extends CRM_Report_Form ...@@ -637,6 +640,19 @@ class CRM_Additionalreports_Form_Report_BookkeepingExtra extends CRM_Report_Form
$entryFound = TRUE; $entryFound = TRUE;
} }
if (array_key_exists('civicrm_address_state_province_id', $row)) {
if ($value = $row['civicrm_address_state_province_id']) {
$rows[$rowNum]['civicrm_address_state_province_id'] = CRM_Core_PseudoConstant::stateProvince($value, FALSE);
}
$entryFound = TRUE;
}
if (array_key_exists('civicrm_address_country_id', $row)) {
if ($value = $row['civicrm_address_country_id']) {
$rows[$rowNum]['civicrm_address_country_id'] = CRM_Core_PseudoConstant::country($value, FALSE);
}
$entryFound = TRUE;
}
// display birthday in the configured custom format // display birthday in the configured custom format
if (array_key_exists('civicrm_contact_birth_date', $row)) { if (array_key_exists('civicrm_contact_birth_date', $row)) {
$birthDate = $row['civicrm_contact_birth_date']; $birthDate = $row['civicrm_contact_birth_date'];
......
<?xml version="1.0"?> <?xml version="1.0"?>
<extension key="cc.tadpole.additionalreports" type="module"> <extension key="cc.tadpole.additionalreports" type="module">
<file>additionalreports</file> <file>additionalreports</file>
<name>FIXME</name> <name>Additional Reports for CiviCRM</name>
<description>FIXME</description> <description>Additional reports for CiviCRM</description>
<license>AGPL-3.0</license> <license>AGPL-3.0</license>
<maintainer> <maintainer>
<author>Kevin Cristiano</author> <author>Kevin Cristiano</author>
<email>kcristiano@tadpole.cc</email> <email>kcristiano@tadpole.cc</email>
</maintainer> </maintainer>
<urls> <urls>
<url desc="Main Extension Page">http://FIXME</url> <url desc="Main Extension Page">https://develop.tadpole.cc/extensions/cc.tadpole.additionalreports.git</url>
<url desc="Documentation">http://FIXME</url> <url desc="Documentation">https://develop.tadpole.cc/extensions/cc.tadpole.additionalreports.git</url>
<url desc="Support">http://FIXME</url> <url desc="Support">https://develop.tadpole.cc/extensions/cc.tadpole.additionalreports.git</url>
<url desc="Licensing">http://www.gnu.org/licenses/agpl-3.0.html</url> <url desc="Licensing">http://www.gnu.org/licenses/agpl-3.0.html</url>
</urls> </urls>
<releaseDate>2016-11-02</releaseDate> <releaseDate>2016-11-02</releaseDate>
<version>1.0</version> <version>1.0</version>
<develStage>alpha</develStage> <develStage>beta</develStage>
<compatibility> <compatibility>
<ver>4.2</ver> <ver>4.7</ver>
</compatibility> </compatibility>
<comments>This is a new, undeveloped module</comments> <comments>This is a new module</comments>
<civix> <civix>
<namespace>CRM/Additionalreports</namespace> <namespace>CRM/Additionalreports</namespace>
</civix> </civix>
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment