feat(FIX-159): completed feature

This commit is contained in:
chattie
2026-08-22 17:35:09 +02:00
parent 06404fe770
commit f8e7257dc0
10 changed files with 56 additions and 8 deletions

View File

@@ -302,7 +302,7 @@ export class ReportingService {
const result = await this.pool.query<SummaryRow>(
`WITH filtered_orders AS (
SELECT o.id, o.user_id, o.state, o.source, o.store_id, o.terminal_id, o.created_at
SELECT o.id, o.user_id, o.state, o.source, o.store_id, o.terminal_id, o.created_at, o.shipping_cents
FROM orders_orders o
WHERE o.created_at >= $1
AND o.created_at < $2
@@ -360,7 +360,7 @@ export class ReportingService {
const query = `
WITH filtered_orders AS (
SELECT o.id, o.user_id, o.state, o.source, o.store_id, o.terminal_id, o.created_at
SELECT o.id, o.user_id, o.state, o.source, o.store_id, o.terminal_id, o.created_at, o.shipping_cents
FROM orders_orders o
WHERE o.created_at >= $1
AND o.created_at < $2
@@ -436,7 +436,7 @@ export class ReportingService {
ProductRowRaw & { total_count: string }
>(
`WITH filtered_orders AS (
SELECT o.id, o.user_id, o.state, o.source, o.store_id, o.terminal_id
SELECT o.id, o.user_id, o.state, o.source, o.store_id, o.terminal_id, o.shipping_cents
FROM orders_orders o
WHERE o.created_at >= $1
AND o.created_at < $2