Advertisement
Guest User

Untitled

a guest
May 24th, 2019
137
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 3.87 KB | None | 0 0
  1. [2019-05-24 07:54:57] local.DEBUG: array (
  2. 0 =>
  3. array (
  4. 'query' => 'WITH reservations AS (select "id", "payment_method", "created_by", "store_id", cancel_fee AS total_points, false AS is_confirmed, 0 AS delay_option_total_points, 0 AS web_cash_service_fee, CEIL(cancel_fee * point_service_fee / 100) AS point_service_fee from "reservations" where "payment_method" = ? and "cancel_fee" > ? and "cancelled_at" >= ? and "cancelled_at" < ? union all select "id", "payment_method", "created_by", "store_id", (total_points - delay_option_total_points) AS total_point, true AS is_confirmed, 0 AS delay_option_total_points, web_service_fee AS web_cash_service_fee, resv_point_fee AS point_service_fee from "reservations" where "confirm_start_at" >= ? and "confirm_start_at" < ? and "deleted_at" is null and "reservations"."deleted_at" is null union all select "reservations"."id", "reservations"."payment_method", "reservations"."created_by", "reservations"."store_id", 0 AS total_points, false AS is_confirmed, SUM(reservation_delay_options.total_price) AS delay_option_total_points, 0 AS web_cash_service_fee, SUM(reservation_delay_options.total_point_fee) AS point_service_fee from "reservations" left join "reservation_delay_options" on "reservations"."id" = "reservation_delay_options"."reservation_id" where "reservation_delay_options"."status" = ? and "reservation_delay_options"."payment_method" = ? and "reservation_delay_options"."approved_at" >= ? and "reservation_delay_options"."approved_at" < ? and "reservation_delay_options"."deleted_at" is null and "reservations"."deleted_at" is null group by "reservations"."id" union all select "id", \'point\' as payment_method, \'store\' as created_by, store_id as store_id, (CASE WHEN status = ? THEN ? ELSE amount END) as total_points, false as is_confirmed, 0 as delay_option_total_points, 0 AS web_cash_service_fee, (CASE WHEN status = ? THEN 0 ELSE service_amount END) as point_service_fee from "payment_codes" where "payment_codes"."created_by" = ? and "payment_codes"."status" in (?, ?, ?) and "created_at" >= ? and "created_at" < ?) select "stores"."id", "stores"."bank_code", "stores"."bank_name", "stores"."bank_branch_code", "stores"."bank_branch_name", "stores"."bank_account_code", "stores"."bank_account_name", (CASE
  5. WHEN stores.bank_account_type = ? THEN 1
  6. WHEN stores.bank_account_type = ? THEN 2
  7. WHEN stores.bank_account_type = ? THEN 4
  8. WHEN stores.bank_account_type = ? THEN 9
  9. END) AS bank_account_type,
  10. SUM(reservations.web_cash_service_fee)
  11. FILTER (WHERE reservations.payment_method = ?
  12. AND reservations.created_by IN (?, ?)
  13. AND reservations.is_confirmed
  14. ) AS total_web_cash_service_fee, SUM(reservations.total_points) AS total_points, SUM(reservations.delay_option_total_points) AS delay_option_total_points, SUM(reservations.point_service_fee) AS total_point_service_fee from "stores" left join "reservations" on "stores"."id" = "reservations"."store_id" where "stores"."bank_account_code" is not null and "stores"."deleted_at" is null group by "stores"."id"',
  15. 'bindings' =>
  16. array (
  17. 0 => 'point',
  18. 1 => 0,
  19. 2 => 1556654400,
  20. 3 => 1558382400,
  21. 4 => 1556654400,
  22. 5 => 1558382400,
  23. 6 => 'approved',
  24. 7 => 'point',
  25. 8 => 1556654400,
  26. 9 => 1558382400,
  27. 10 => 'approved_refund',
  28. 11 => -200,
  29. 12 => 'approved_refund',
  30. 13 => 'normal',
  31. 14 => 'complete',
  32. 15 => 'request_refund',
  33. 16 => 'approved_refund',
  34. 17 => 1556654400,
  35. 18 => 1558382400,
  36. 19 => 'normal',
  37. 20 => 'deposit',
  38. 21 => 'savings',
  39. 22 => 'other',
  40. 23 => 'cash',
  41. 24 => 'user',
  42. 25 => 'admin',
  43. ),
  44. 'time' => 80.24,
  45. ),
  46. )
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement