feat: correct stats for telecart dashboard
This commit is contained in:
@@ -30,6 +30,9 @@ class StatsHandler
|
||||
new RawExpression('SUM(orders.total) AS orders_total_amount'),
|
||||
])
|
||||
->from(db_table('order'), 'orders')
|
||||
->join('telecart_customers', function (JoinClause $join) {
|
||||
$join->on('orders.customer_id', '=', 'telecart_customers.oc_customer_id');
|
||||
})
|
||||
->join('telecart_order_meta', function (JoinClause $join) {
|
||||
$join->on('orders.order_id', '=', 'telecart_order_meta.oc_order_id')
|
||||
->whereRaw('orders.store_id = telecart_order_meta.oc_store_id');
|
||||
|
||||
Reference in New Issue
Block a user