Commit 4a65d546 authored by KarinG's avatar KarinG
Browse files

Merge branch 'ordering' into 'master'

For receipts issued report, specify explicit order when there's multiple financial types

See merge request !157
parents 52634f3c d6a554e9
......@@ -124,7 +124,7 @@ class CRM_Cdntaxreceipts_Form_Report_ReceiptsIssued extends CRM_Report_Form {
'default' => FALSE,
'type' => CRM_Utils_Type::T_STRING,
// look up words in alterDisplay
'dbAlias' => "GROUP_CONCAT(DISTINCT line_item_civireport.financial_type_id ORDER BY line_item_civireport.contribution_id SEPARATOR ',')",
'dbAlias' => "GROUP_CONCAT(DISTINCT line_item_civireport.financial_type_id ORDER BY line_item_civireport.contribution_id, line_item_civireport.financial_type_id SEPARATOR ',')",
),
),
'filters' => array(),
......@@ -138,7 +138,7 @@ class CRM_Cdntaxreceipts_Form_Report_ReceiptsIssued extends CRM_Report_Form {
'default' => FALSE,
'type' => CRM_Utils_Type::T_STRING,
// look up words in alterDisplay
'dbAlias' => "GROUP_CONCAT(DISTINCT contribution_civireport.payment_instrument_id ORDER BY contribution_civireport.id SEPARATOR ',')",
'dbAlias' => "GROUP_CONCAT(DISTINCT contribution_civireport.payment_instrument_id ORDER BY contribution_civireport.id, contribution_civireport.payment_instrument_id SEPARATOR ',')",
),
),
'filters' => array(
......
......@@ -103,7 +103,7 @@ class ReceiptsIssuedReportTest extends CdntaxreceiptsBase {
$this->assertPageHasNoErrorMessages();
$this->assertSession()->pageTextContains('Financial Type (current value)');
$this->assertSession()->pageTextContains('Event Fee, Donation');
$this->assertSession()->pageTextContains('Donation, Event Fee');
$this->assertSession()->pageTextContains('Payment Method (current value)');
$this->assertSession()->pageTextContains('Check');
// Amount should only be the donation part
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment