| 6 |
4.28 ms
|
SELECT s0_.id AS id_0, s0_.number AS number_1, s0_.external_number AS external_number_2, s0_.status AS status_3, s0_.source AS source_4, s0_.external_id AS external_id_5, s0_.external_status AS external_status_6, s0_.currency AS currency_7, s0_.billing AS billing_8, s0_.shipping AS shipping_9, s0_.customer_note AS customer_note_10, s0_.internal_note AS internal_note_11, s0_.payment_method AS payment_method_12, s0_.payment_ref AS payment_ref_13, s0_.paid_at AS paid_at_14, s0_.shipping_method AS shipping_method_15, s0_.shipping_cost AS shipping_cost_16, s0_.tracking_number AS tracking_number_17, s0_.tracking_url AS tracking_url_18, s0_.carrier AS carrier_19, s0_.shipped_at AS shipped_at_20, s0_.delivered_at AS delivered_at_21, s0_.subtotal AS subtotal_22, s0_.discount_total AS discount_total_23, s0_.shipping_total AS shipping_total_24, s0_.vat_total AS vat_total_25, s0_.total AS total_26, s0_.stock_deducted AS stock_deducted_27, s0_.raw AS raw_28, s0_.placed_at AS placed_at_29, s0_.billing_status AS billing_status_30, s0_.invoiced_at AS invoiced_at_31, s0_.created_at AS created_at_32, s0_.updated_at AS updated_at_33, c1_.id AS id_34, c1_.code AS code_35, c1_.type AS type_36, c1_.first_name AS first_name_37, c1_.last_name AS last_name_38, c1_.company_name AS company_name_39, c1_.email AS email_40, c1_.phone AS phone_41, c1_.vat_number AS vat_number_42, c1_.tax_code AS tax_code_43, c1_.pec AS pec_44, c1_.sdi_code AS sdi_code_45, c1_.notes AS notes_46, c1_.status AS status_47, c1_.external_refs AS external_refs_48, c1_.created_at AS created_at_49, c1_.updated_at AS updated_at_50, p2_.id AS id_51, p2_.code AS code_52, p2_.name AS name_53, p2_.description AS description_54, p2_.currency AS currency_55, p2_.prices_include_vat AS prices_include_vat_56, p2_.is_default AS is_default_57, p2_.position AS position_58, p2_.status AS status_59, p2_.created_at AS created_at_60, p2_.updated_at AS updated_at_61, c3_.id AS id_62, c3_.type AS type_63, c3_.name AS name_64, c3_.status AS status_65, c3_.config AS config_66, c3_.credentials_cipher AS credentials_cipher_67, c3_.sync_stock AS sync_stock_68, c3_.sync_prices AS sync_prices_69, c3_.stock_reserve AS stock_reserve_70, c3_.stock_cap AS stock_cap_71, c3_.last_price_push_at AS last_price_push_at_72, c3_.last_sync_at AS last_sync_at_73, c3_.last_error AS last_error_74, c3_.last_import_at AS last_import_at_75, c3_.last_stock_push_at AS last_stock_push_at_76, c3_.created_at AS created_at_77, c3_.updated_at AS updated_at_78, w4_.id AS id_79, w4_.code AS code_80, w4_.name AS name_81, w4_.address AS address_82, w4_.is_default AS is_default_83, w4_.created_at AS created_at_84, w4_.updated_at AS updated_at_85, p5_.id AS id_86, p5_.code AS code_87, p5_.name AS name_88, p5_.description AS description_89, p5_.currency AS currency_90, p5_.prices_include_vat AS prices_include_vat_91, p5_.is_default AS is_default_92, p5_.position AS position_93, p5_.status AS status_94, p5_.created_at AS created_at_95, p5_.updated_at AS updated_at_96, p6_.id AS id_97, p6_.code AS code_98, p6_.name AS name_99, p6_.description AS description_100, p6_.currency AS currency_101, p6_.prices_include_vat AS prices_include_vat_102, p6_.is_default AS is_default_103, p6_.position AS position_104, p6_.status AS status_105, p6_.created_at AS created_at_106, p6_.updated_at AS updated_at_107, v7_.id AS id_108, v7_.code AS code_109, v7_.name AS name_110, v7_.rate AS rate_111, v7_.nature AS nature_112, v7_.reference AS reference_113, v7_.is_default AS is_default_114, v7_.status AS status_115, v7_.position AS position_116, v7_.created_at AS created_at_117, v7_.updated_at AS updated_at_118, w8_.id AS id_119, w8_.code AS code_120, w8_.name AS name_121, w8_.address AS address_122, w8_.is_default AS is_default_123, w8_.created_at AS created_at_124, w8_.updated_at AS updated_at_125, o9_.id AS id_126, o9_.sku AS sku_127, o9_.name AS name_128, o9_.variant_label AS variant_label_129, o9_.quantity AS quantity_130, o9_.unit_price AS unit_price_131, o9_.vat_rate AS vat_rate_132, o9_.discount AS discount_133, o9_.line_total AS line_total_134, o9_.vat_amount AS vat_amount_135, o9_.unmatched AS unmatched_136, o9_.position AS position_137, o10_.id AS id_138, o10_.code AS code_139, o10_.description AS description_140, o10_.amount AS amount_141, o10_.position AS position_142, o11_.id AS id_143, o11_.type AS type_144, o11_.from_status AS from_status_145, o11_.to_status AS to_status_146, o11_.message AS message_147, o11_.actor AS actor_148, o11_.created_at AS created_at_149, s0_.company_id AS company_id_150, s0_.customer_id AS customer_id_151, s0_.connector_id AS connector_id_152, s0_.price_list_id AS price_list_id_153, s0_.shipping_vat_id AS shipping_vat_id_154, s0_.warehouse_id AS warehouse_id_155, c1_.company_id AS company_id_156, c1_.price_list_id AS price_list_id_157, p2_.company_id AS company_id_158, c3_.company_id AS company_id_159, c3_.warehouse_id AS warehouse_id_160, c3_.price_list_id AS price_list_id_161, w4_.company_id AS company_id_162, p5_.company_id AS company_id_163, p6_.company_id AS company_id_164, v7_.company_id AS company_id_165, w8_.company_id AS company_id_166, o9_.order_id AS order_id_167, o9_.product_id AS product_id_168, o9_.vat_id AS vat_id_169, o10_.order_id AS order_id_170, o10_.coupon_id AS coupon_id_171, o11_.order_id AS order_id_172 FROM sales_order s0_ LEFT JOIN customer c1_ ON s0_.customer_id = c1_.id LEFT JOIN price_list p2_ ON c1_.price_list_id = p2_.id LEFT JOIN connector c3_ ON s0_.connector_id = c3_.id LEFT JOIN warehouse w4_ ON c3_.warehouse_id = w4_.id LEFT JOIN price_list p5_ ON c3_.price_list_id = p5_.id LEFT JOIN price_list p6_ ON s0_.price_list_id = p6_.id LEFT JOIN vat_rate v7_ ON s0_.shipping_vat_id = v7_.id LEFT JOIN warehouse w8_ ON s0_.warehouse_id = w8_.id LEFT JOIN order_line o9_ ON s0_.id = o9_.order_id LEFT JOIN order_coupon o10_ ON s0_.id = o10_.order_id LEFT JOIN order_event o11_ ON s0_.id = o11_.order_id WHERE s0_.company_id = ? AND s0_.status IN (?, ?) AND s0_.id IN (?) ORDER BY s0_.placed_at DESC, o9_.position ASC, o10_.position ASC, o11_.created_at DESC
Parameters: [
Symfony\Component\Uid\UuidV7 {#675
__toString(): "01a15e55-66ec-7e07-9e0f-c96e5abf35dc"
}
"paid"
"processing"
"01a15e55-fa98-7a44-83aa-0f9dbdf44b81"
]
SELECT
s0_.id AS id_0,
s0_.number AS number_1,
s0_.external_number AS external_number_2,
s0_.status AS status_3,
s0_.source AS source_4,
s0_.external_id AS external_id_5,
s0_.external_status AS external_status_6,
s0_.currency AS currency_7,
s0_.billing AS billing_8,
s0_.shipping AS shipping_9,
s0_.customer_note AS customer_note_10,
s0_.internal_note AS internal_note_11,
s0_.payment_method AS payment_method_12,
s0_.payment_ref AS payment_ref_13,
s0_.paid_at AS paid_at_14,
s0_.shipping_method AS shipping_method_15,
s0_.shipping_cost AS shipping_cost_16,
s0_.tracking_number AS tracking_number_17,
s0_.tracking_url AS tracking_url_18,
s0_.carrier AS carrier_19,
s0_.shipped_at AS shipped_at_20,
s0_.delivered_at AS delivered_at_21,
s0_.subtotal AS subtotal_22,
s0_.discount_total AS discount_total_23,
s0_.shipping_total AS shipping_total_24,
s0_.vat_total AS vat_total_25,
s0_.total AS total_26,
s0_.stock_deducted AS stock_deducted_27,
s0_.raw AS raw_28,
s0_.placed_at AS placed_at_29,
s0_.billing_status AS billing_status_30,
s0_.invoiced_at AS invoiced_at_31,
s0_.created_at AS created_at_32,
s0_.updated_at AS updated_at_33,
c1_.id AS id_34,
c1_.code AS code_35,
c1_.type AS type_36,
c1_.first_name AS first_name_37,
c1_.last_name AS last_name_38,
c1_.company_name AS company_name_39,
c1_.email AS email_40,
c1_.phone AS phone_41,
c1_.vat_number AS vat_number_42,
c1_.tax_code AS tax_code_43,
c1_.pec AS pec_44,
c1_.sdi_code AS sdi_code_45,
c1_.notes AS notes_46,
c1_.status AS status_47,
c1_.external_refs AS external_refs_48,
c1_.created_at AS created_at_49,
c1_.updated_at AS updated_at_50,
p2_.id AS id_51,
p2_.code AS code_52,
p2_.name AS name_53,
p2_.description AS description_54,
p2_.currency AS currency_55,
p2_.prices_include_vat AS prices_include_vat_56,
p2_.is_default AS is_default_57,
p2_.position AS position_58,
p2_.status AS status_59,
p2_.created_at AS created_at_60,
p2_.updated_at AS updated_at_61,
c3_.id AS id_62,
c3_.type AS type_63,
c3_.name AS name_64,
c3_.status AS status_65,
c3_.config AS config_66,
c3_.credentials_cipher AS credentials_cipher_67,
c3_.sync_stock AS sync_stock_68,
c3_.sync_prices AS sync_prices_69,
c3_.stock_reserve AS stock_reserve_70,
c3_.stock_cap AS stock_cap_71,
c3_.last_price_push_at AS last_price_push_at_72,
c3_.last_sync_at AS last_sync_at_73,
c3_.last_error AS last_error_74,
c3_.last_import_at AS last_import_at_75,
c3_.last_stock_push_at AS last_stock_push_at_76,
c3_.created_at AS created_at_77,
c3_.updated_at AS updated_at_78,
w4_.id AS id_79,
w4_.code AS code_80,
w4_.name AS name_81,
w4_.address AS address_82,
w4_.is_default AS is_default_83,
w4_.created_at AS created_at_84,
w4_.updated_at AS updated_at_85,
p5_.id AS id_86,
p5_.code AS code_87,
p5_.name AS name_88,
p5_.description AS description_89,
p5_.currency AS currency_90,
p5_.prices_include_vat AS prices_include_vat_91,
p5_.is_default AS is_default_92,
p5_.position AS position_93,
p5_.status AS status_94,
p5_.created_at AS created_at_95,
p5_.updated_at AS updated_at_96,
p6_.id AS id_97,
p6_.code AS code_98,
p6_.name AS name_99,
p6_.description AS description_100,
p6_.currency AS currency_101,
p6_.prices_include_vat AS prices_include_vat_102,
p6_.is_default AS is_default_103,
p6_.position AS position_104,
p6_.status AS status_105,
p6_.created_at AS created_at_106,
p6_.updated_at AS updated_at_107,
v7_.id AS id_108,
v7_.code AS code_109,
v7_.name AS name_110,
v7_.rate AS rate_111,
v7_.nature AS nature_112,
v7_.reference AS reference_113,
v7_.is_default AS is_default_114,
v7_.status AS status_115,
v7_.position AS position_116,
v7_.created_at AS created_at_117,
v7_.updated_at AS updated_at_118,
w8_.id AS id_119,
w8_.code AS code_120,
w8_.name AS name_121,
w8_.address AS address_122,
w8_.is_default AS is_default_123,
w8_.created_at AS created_at_124,
w8_.updated_at AS updated_at_125,
o9_.id AS id_126,
o9_.sku AS sku_127,
o9_.name AS name_128,
o9_.variant_label AS variant_label_129,
o9_.quantity AS quantity_130,
o9_.unit_price AS unit_price_131,
o9_.vat_rate AS vat_rate_132,
o9_.discount AS discount_133,
o9_.line_total AS line_total_134,
o9_.vat_amount AS vat_amount_135,
o9_.unmatched AS unmatched_136,
o9_.position AS position_137,
o10_.id AS id_138,
o10_.code AS code_139,
o10_.description AS description_140,
o10_.amount AS amount_141,
o10_.position AS position_142,
o11_.id AS id_143,
o11_.type AS type_144,
o11_.from_status AS from_status_145,
o11_.to_status AS to_status_146,
o11_.message AS message_147,
o11_.actor AS actor_148,
o11_.created_at AS created_at_149,
s0_.company_id AS company_id_150,
s0_.customer_id AS customer_id_151,
s0_.connector_id AS connector_id_152,
s0_.price_list_id AS price_list_id_153,
s0_.shipping_vat_id AS shipping_vat_id_154,
s0_.warehouse_id AS warehouse_id_155,
c1_.company_id AS company_id_156,
c1_.price_list_id AS price_list_id_157,
p2_.company_id AS company_id_158,
c3_.company_id AS company_id_159,
c3_.warehouse_id AS warehouse_id_160,
c3_.price_list_id AS price_list_id_161,
w4_.company_id AS company_id_162,
p5_.company_id AS company_id_163,
p6_.company_id AS company_id_164,
v7_.company_id AS company_id_165,
w8_.company_id AS company_id_166,
o9_.order_id AS order_id_167,
o9_.product_id AS product_id_168,
o9_.vat_id AS vat_id_169,
o10_.order_id AS order_id_170,
o10_.coupon_id AS coupon_id_171,
o11_.order_id AS order_id_172
FROM
sales_order s0_
LEFT JOIN customer c1_ ON s0_.customer_id = c1_.id
LEFT JOIN price_list p2_ ON c1_.price_list_id = p2_.id
LEFT JOIN connector c3_ ON s0_.connector_id = c3_.id
LEFT JOIN warehouse w4_ ON c3_.warehouse_id = w4_.id
LEFT JOIN price_list p5_ ON c3_.price_list_id = p5_.id
LEFT JOIN price_list p6_ ON s0_.price_list_id = p6_.id
LEFT JOIN vat_rate v7_ ON s0_.shipping_vat_id = v7_.id
LEFT JOIN warehouse w8_ ON s0_.warehouse_id = w8_.id
LEFT JOIN order_line o9_ ON s0_.id = o9_.order_id
LEFT JOIN order_coupon o10_ ON s0_.id = o10_.order_id
LEFT JOIN order_event o11_ ON s0_.id = o11_.order_id
WHERE
s0_.company_id = ?
AND s0_.status IN (?, ?)
AND s0_.id IN (?)
ORDER BY
s0_.placed_at DESC,
o9_.position ASC,
o10_.position ASC,
o11_.created_at DESC
SELECT s0_.id AS id_0, s0_.number AS number_1, s0_.external_number AS external_number_2, s0_.status AS status_3, s0_.source AS source_4, s0_.external_id AS external_id_5, s0_.external_status AS external_status_6, s0_.currency AS currency_7, s0_.billing AS billing_8, s0_.shipping AS shipping_9, s0_.customer_note AS customer_note_10, s0_.internal_note AS internal_note_11, s0_.payment_method AS payment_method_12, s0_.payment_ref AS payment_ref_13, s0_.paid_at AS paid_at_14, s0_.shipping_method AS shipping_method_15, s0_.shipping_cost AS shipping_cost_16, s0_.tracking_number AS tracking_number_17, s0_.tracking_url AS tracking_url_18, s0_.carrier AS carrier_19, s0_.shipped_at AS shipped_at_20, s0_.delivered_at AS delivered_at_21, s0_.subtotal AS subtotal_22, s0_.discount_total AS discount_total_23, s0_.shipping_total AS shipping_total_24, s0_.vat_total AS vat_total_25, s0_.total AS total_26, s0_.stock_deducted AS stock_deducted_27, s0_.raw AS raw_28, s0_.placed_at AS placed_at_29, s0_.billing_status AS billing_status_30, s0_.invoiced_at AS invoiced_at_31, s0_.created_at AS created_at_32, s0_.updated_at AS updated_at_33, c1_.id AS id_34, c1_.code AS code_35, c1_.type AS type_36, c1_.first_name AS first_name_37, c1_.last_name AS last_name_38, c1_.company_name AS company_name_39, c1_.email AS email_40, c1_.phone AS phone_41, c1_.vat_number AS vat_number_42, c1_.tax_code AS tax_code_43, c1_.pec AS pec_44, c1_.sdi_code AS sdi_code_45, c1_.notes AS notes_46, c1_.status AS status_47, c1_.external_refs AS external_refs_48, c1_.created_at AS created_at_49, c1_.updated_at AS updated_at_50, p2_.id AS id_51, p2_.code AS code_52, p2_.name AS name_53, p2_.description AS description_54, p2_.currency AS currency_55, p2_.prices_include_vat AS prices_include_vat_56, p2_.is_default AS is_default_57, p2_.position AS position_58, p2_.status AS status_59, p2_.created_at AS created_at_60, p2_.updated_at AS updated_at_61, c3_.id AS id_62, c3_.type AS type_63, c3_.name AS name_64, c3_.status AS status_65, c3_.config AS config_66, c3_.credentials_cipher AS credentials_cipher_67, c3_.sync_stock AS sync_stock_68, c3_.sync_prices AS sync_prices_69, c3_.stock_reserve AS stock_reserve_70, c3_.stock_cap AS stock_cap_71, c3_.last_price_push_at AS last_price_push_at_72, c3_.last_sync_at AS last_sync_at_73, c3_.last_error AS last_error_74, c3_.last_import_at AS last_import_at_75, c3_.last_stock_push_at AS last_stock_push_at_76, c3_.created_at AS created_at_77, c3_.updated_at AS updated_at_78, w4_.id AS id_79, w4_.code AS code_80, w4_.name AS name_81, w4_.address AS address_82, w4_.is_default AS is_default_83, w4_.created_at AS created_at_84, w4_.updated_at AS updated_at_85, p5_.id AS id_86, p5_.code AS code_87, p5_.name AS name_88, p5_.description AS description_89, p5_.currency AS currency_90, p5_.prices_include_vat AS prices_include_vat_91, p5_.is_default AS is_default_92, p5_.position AS position_93, p5_.status AS status_94, p5_.created_at AS created_at_95, p5_.updated_at AS updated_at_96, p6_.id AS id_97, p6_.code AS code_98, p6_.name AS name_99, p6_.description AS description_100, p6_.currency AS currency_101, p6_.prices_include_vat AS prices_include_vat_102, p6_.is_default AS is_default_103, p6_.position AS position_104, p6_.status AS status_105, p6_.created_at AS created_at_106, p6_.updated_at AS updated_at_107, v7_.id AS id_108, v7_.code AS code_109, v7_.name AS name_110, v7_.rate AS rate_111, v7_.nature AS nature_112, v7_.reference AS reference_113, v7_.is_default AS is_default_114, v7_.status AS status_115, v7_.position AS position_116, v7_.created_at AS created_at_117, v7_.updated_at AS updated_at_118, w8_.id AS id_119, w8_.code AS code_120, w8_.name AS name_121, w8_.address AS address_122, w8_.is_default AS is_default_123, w8_.created_at AS created_at_124, w8_.updated_at AS updated_at_125, o9_.id AS id_126, o9_.sku AS sku_127, o9_.name AS name_128, o9_.variant_label AS variant_label_129, o9_.quantity AS quantity_130, o9_.unit_price AS unit_price_131, o9_.vat_rate AS vat_rate_132, o9_.discount AS discount_133, o9_.line_total AS line_total_134, o9_.vat_amount AS vat_amount_135, o9_.unmatched AS unmatched_136, o9_.position AS position_137, o10_.id AS id_138, o10_.code AS code_139, o10_.description AS description_140, o10_.amount AS amount_141, o10_.position AS position_142, o11_.id AS id_143, o11_.type AS type_144, o11_.from_status AS from_status_145, o11_.to_status AS to_status_146, o11_.message AS message_147, o11_.actor AS actor_148, o11_.created_at AS created_at_149, s0_.company_id AS company_id_150, s0_.customer_id AS customer_id_151, s0_.connector_id AS connector_id_152, s0_.price_list_id AS price_list_id_153, s0_.shipping_vat_id AS shipping_vat_id_154, s0_.warehouse_id AS warehouse_id_155, c1_.company_id AS company_id_156, c1_.price_list_id AS price_list_id_157, p2_.company_id AS company_id_158, c3_.company_id AS company_id_159, c3_.warehouse_id AS warehouse_id_160, c3_.price_list_id AS price_list_id_161, w4_.company_id AS company_id_162, p5_.company_id AS company_id_163, p6_.company_id AS company_id_164, v7_.company_id AS company_id_165, w8_.company_id AS company_id_166, o9_.order_id AS order_id_167, o9_.product_id AS product_id_168, o9_.vat_id AS vat_id_169, o10_.order_id AS order_id_170, o10_.coupon_id AS coupon_id_171, o11_.order_id AS order_id_172 FROM sales_order s0_ LEFT JOIN customer c1_ ON s0_.customer_id = c1_.id LEFT JOIN price_list p2_ ON c1_.price_list_id = p2_.id LEFT JOIN connector c3_ ON s0_.connector_id = c3_.id LEFT JOIN warehouse w4_ ON c3_.warehouse_id = w4_.id LEFT JOIN price_list p5_ ON c3_.price_list_id = p5_.id LEFT JOIN price_list p6_ ON s0_.price_list_id = p6_.id LEFT JOIN vat_rate v7_ ON s0_.shipping_vat_id = v7_.id LEFT JOIN warehouse w8_ ON s0_.warehouse_id = w8_.id LEFT JOIN order_line o9_ ON s0_.id = o9_.order_id LEFT JOIN order_coupon o10_ ON s0_.id = o10_.order_id LEFT JOIN order_event o11_ ON s0_.id = o11_.order_id WHERE s0_.company_id = '01a15e55-66ec-7e07-9e0f-c96e5abf35dc' AND s0_.status IN ('paid', 'processing') AND s0_.id IN ('01a15e55-fa98-7a44-83aa-0f9dbdf44b81') ORDER BY s0_.placed_at DESC, o9_.position ASC, o10_.position ASC, o11_.created_at DESC;
|