Skip to content

Commit 9db4961

Browse files
committed
remove fields
1 parent 0978ba9 commit 9db4961

File tree

2 files changed

+0
-22
lines changed

2 files changed

+0
-22
lines changed

backend/app/Services/Domain/Report/Reports/PromoCodesReport.php

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -56,14 +56,6 @@ protected function getSqlQuery(Carbon $startDate, Carbon $endDate): string
5656
COALESCE(SUM(ot.total_gross), 0) as total_gross_sales,
5757
COALESCE(SUM(ot.original_total), 0) as total_before_discounts,
5858
COALESCE(SUM(ot.original_total - ot.discounted_total), 0) as total_discount_amount,
59-
CASE
60-
WHEN COUNT(ot.order_id) > 0 THEN ROUND(AVG(ot.original_total - ot.discounted_total)::numeric, 2)
61-
ELSE 0
62-
END as avg_discount_per_order,
63-
CASE
64-
WHEN COUNT(ot.order_id) > 0 THEN ROUND(AVG(ot.total_gross)::numeric, 2)
65-
ELSE 0
66-
END as avg_order_value,
6759
MIN(ot.created_at AT TIME ZONE 'UTC') as first_used_at,
6860
MAX(ot.created_at AT TIME ZONE 'UTC') as last_used_at,
6961
pc.discount as configured_discount,
@@ -103,8 +95,6 @@ protected function getSqlQuery(Carbon $startDate, Carbon $endDate): string
10395
total_gross_sales,
10496
total_before_discounts,
10597
total_discount_amount,
106-
avg_discount_per_order,
107-
avg_order_value,
10898
first_used_at,
10999
last_used_at,
110100
max_allowed_usages,

frontend/src/components/routes/event/Reports/PromoCodesReport/index.tsx

Lines changed: 0 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -59,18 +59,6 @@ const PromoCodesReport = () => {
5959
sortable: true,
6060
render: (value: string) => formatCurrency(value, event?.currency)
6161
},
62-
{
63-
key: 'avg_discount_per_order' as const,
64-
label: t`Avg Discount/Order`,
65-
sortable: true,
66-
render: (value: string) => formatCurrency(value, event?.currency)
67-
},
68-
{
69-
key: 'avg_order_value' as const,
70-
label: t`Avg Order Value`,
71-
sortable: true,
72-
render: (value: string) => formatCurrency(value, event?.currency)
73-
},
7462
{
7563
key: 'first_used_at' as const,
7664
label: t`First Used`,

0 commit comments

Comments
 (0)