Created
January 25, 2017 10:14
-
-
Save pvankouteren/3f673b8c8ca5f95f059e9290995aaf1d to your computer and use it in GitHub Desktop.
This file contains hidden or 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
| $contractObjectCollection = ContractQuery::create() | |
| ->filterByOrderId($this->getID()) | |
| ->condition('contractToAfterNow', 'Contract.ContractTo > ?', date('Y-m-d')) | |
| ->condition('contractToIsNul', 'Contract.ContractTo = ?', '0000-00-00') | |
| ->combine(array('contractToAfterNow', 'contractToIsNul'), 'or', 'contractToCondition') | |
| ->condition('contractFromIsFilledIn', 'Contract.ContractFrom <= ?', date('Y-m-d')) | |
| ->combine(array('contractToCondition', 'contractFromIsFilledIn')) | |
| ->orderByContractFrom('asc') | |
| ->orderByContractId('asc') | |
| ->find(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment