add data export
This commit is contained in:
@@ -120,11 +120,14 @@
|
||||
COALESCE(SUM(o.`sale_amount`), 0) AS `saleAmount`,
|
||||
COALESCE(SUM(o.`paid_amount`), 0) AS `paidAmount`,
|
||||
COALESCE(SUM(o.`pending_paid_amount`), 0) AS `pendingPaidAmount`,
|
||||
COALESCE(SUM(o.`sale_amount` - o.`paid_amount`), 0) AS `unpaidAmount`,
|
||||
COALESCE(SUM(GREATEST(o.`sale_amount` - o.`paid_amount`, 0)), 0) AS `unpaidAmount`,
|
||||
COALESCE(SUM(o.`refunded_amount`), 0) AS `refundedAmount`,
|
||||
COALESCE(SUM(o.`paid_amount` - o.`refunded_amount`), 0) AS `netPaidAmount`
|
||||
FROM `gao_sales_order` o LEFT JOIN `gao_customer` c ON c.`id` = o.`customer_id`
|
||||
WHERE <include refid="queryWhere"/>
|
||||
<if test="(statusList == null or statusList.size() == 0) and status == null">
|
||||
AND o.`status` <> 'CANCELLED'
|
||||
</if>
|
||||
</select>
|
||||
<sql id="customerProductWhere">
|
||||
i.`deleted_at` IS NULL
|
||||
|
||||
Reference in New Issue
Block a user