• Как фильтровать заказы по значению свойства заказов?

    $filter['STATUS_ID'] = 'F';
    $filter['=PROPERTY_VAL.CODE'] = 'IS_REVIEWED';
    $filter['=PROPERTY_VAL_2.CODE'] = 'TO_POST_CHECK';
    $filter['=PROPERTY_VAL.VALUE'] = 'N';
    $filter['=PROPERTY_VAL_2.VALUE'] = 'Y';
    $orders = Order::getList([
        'select' => ['ID',  'ACCOUNT_NUMBER'],
        'filter' => $filter,
        'runtime' => [
            new \Bitrix\Main\Entity\ReferenceField(
                'PROPERTY_VAL',
                '\Bitrix\sale\Internals\OrderPropsValueTable',
                ["=this.ID" => "ref.ORDER_ID"],
                ["join_type"=>"left"]
            ),
            new \Bitrix\Main\Entity\ReferenceField(
                'PROPERTY_VAL_2',
                '\Bitrix\sale\Internals\OrderPropsValueTable',
                ["=this.ID" => "ref.ORDER_ID"],
                ["join_type"=>"left"]
            ),
    
        ]
    ]);
    while($order = $orders->fetch()){
        print_r($order);
    }