Skip to content

Commit

Permalink
[bug-OpenMage#326] Customers missing from reports
Browse files Browse the repository at this point in the history
Use joinLeft instead of joinInner to fix customers missing from reports.

Refs OpenMage#41
Refs OpenMage#241
  • Loading branch information
colinmollenhour authored and edannenberg committed Aug 17, 2020
1 parent 1c9202f commit c82bd8a
Showing 1 changed file with 3 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -193,12 +193,12 @@ public function addCustomerData($filter = null)
$adapter = $this->getSelect()->getAdapter();
$customerName = $adapter->getConcatSql(array('cust_fname.value', 'cust_mname.value', 'cust_lname.value',), ' ');
$this->getSelect()
->joinInner(
->joinLeft(
array('cust_email' => $attrEmailTableName),
'cust_email.entity_id = main_table.customer_id',
array('email' => 'cust_email.email')
)
->joinInner(
->joinLeft(
array('cust_fname' => $attrFirstnameTableName),
implode(' AND ', array(
'cust_fname.entity_id = main_table.customer_id',
Expand All @@ -214,7 +214,7 @@ public function addCustomerData($filter = null)
)),
array('middlename' => 'cust_mname.value')
)
->joinInner(
->joinLeft(
array('cust_lname' => $attrLastnameTableName),
implode(' AND ', array(
'cust_lname.entity_id = main_table.customer_id',
Expand Down

0 comments on commit c82bd8a

Please sign in to comment.