Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- SELECT
- o0_.id AS id_0,
- o0_.SUM AS sum_1,
- o0_.draft AS draft_2,
- o0_.income_or_outcome AS income_or_outcome_3,
- o0_.STATUS AS status_4,
- o0_.created_at AS created_at_5,
- o0_.number_ppo AS number_ppo_6,
- o0_.page_number AS page_number_7,
- o0_.document_id AS document_id_8,
- o0_.receiver_passport_data AS receiver_passport_data_9,
- o0_.responsible_passport_data AS responsible_passport_data_10,
- o0_.reason AS reason_11,
- o0_.account_code AS account_code_12,
- o0_.discriminator AS discriminator_13,
- o0_.from_id AS from_id_14,
- o0_.destination_id AS destination_id_15,
- o0_.type_id AS type_id_16,
- o0_.contract_id AS contract_id_17,
- o0_.subcategory_id AS subcategory_id_18,
- o0_.responsible_id AS responsible_id_19,
- o0_.receiver_id AS receiver_id_20,
- o0_.payment_id AS payment_id_21
- FROM
- operation o0_
- INNER JOIN cash_box c1_ ON o0_.from_id = c1_.id
- INNER JOIN cash_box c2_ ON o0_.destination_id = c2_.id
- INNER JOIN site s3_ ON c1_.department_id = s3_.id
- INNER JOIN site s4_ ON c2_.department_id = s4_.id
- WHERE
- (
- (
- (
- s3_.id IN (
- SELECT
- IFNULL(s5_.id, 0) AS sclr_22
- FROM
- site s5_
- WHERE
- s5_.ip_address LIKE ?
- AND (
- s5_.regional_director_id = ?
- OR s5_.regional_manager_id = ?
- )
- ORDER BY
- s5_.id DESC
- )
- )
- OR (
- s4_.id IN (
- SELECT
- IFNULL(s6_.id, 0) AS sclr_23
- FROM
- site s6_
- WHERE
- s6_.ip_address LIKE ?
- AND (
- s6_.regional_director_id = ?
- OR s6_.regional_manager_id = ?
- )
- ORDER BY
- s6_.id DESC
- )
- )
- )
- AND (
- (
- s3_.accountant_id = ?
- OR s3_.cashier_id = ?
- )
- OR (
- s4_.accountant_id = ?
- OR s4_.cashier_id = ?
- )
- )
- )
- AND o0_.discriminator IN ('Movement')
- ORDER BY
- o0_.id ASC
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement