Guest User

Untitled

a guest
Jun 18th, 2018
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.71 KB | None | 0 0
  1. protected function _initSelect()
  2. {
  3. parent::_initSelect();
  4. $this->getSelect()->joinLeft(
  5. ['cp1' => $this->getTable('2checkout_ins')],
  6. 'cp1.id =main_table.two_checkout_message_id OR cp1.id = NULL',
  7. ['main_table.increment_id','main_table.from_date','main_table.subscription_period','main_table.to_date','main_table.renew_date','main_table.status_success','main_table.customer_id','main_table.paypal_id','main_table.two_checkout_message_id','final_amount'=>'cp1.invoice_usd_amount']
  8. )->joinLeft(
  9. ['cp2' => $this->getTable('paypal_result')],
  10. 'main_table.paypal_id = cp2.id OR cp2.id = NULL',
  11. ['final_amount_paypal'=>'cp2.amount']
  12. );
  13. return $this;
  14. }
Add Comment
Please, Sign In to add comment