Last active
November 30, 2022 20:16
-
-
Save drobinson/caf6d9f65552f964373de28aa71abb1b to your computer and use it in GitHub Desktop.
This code runs.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
$this->getSelect()->group('main_table.giftvoucher_id')->joinLeft( | |
array('history' => $this->getTable('giftvoucher/history')), | |
'main_table.giftvoucher_id = history.giftvoucher_id', array( | |
'history_amount' => 'amount', | |
'history_currency' => 'currency', | |
'created_at', | |
'extra_content', | |
'order_increment_id' | |
) | |
)->where('history.amount > ?', 0 or 'history.action = ?', Company_Module_Model_Actions::ACTIONS_CREATE); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment