|
@@ -51,7 +51,8 @@ WHERE /*t.status='5' AND*/ t.pay_status='1' AND t7.cus_order_flag='0' AND cus_wa
|
|
|
|
|
|
```mysql
|
|
|
-- 海关电子订单、海关运单, 商品明细
|
|
|
-SELECT t.order_no, t2.goods_no, t1.real_price, t1.goods_nums, t1.real_price*t1.goods_nums AS total_pice
|
|
|
+SELECT t.order_no, t2.goods_no, t2.sell_price, t2.cost_price, t1.goods_nums,
|
|
|
+ t2.sell_price*t1.goods_nums AS sell_total_pice, t2.cost_price*t1.goods_nums AS cost_total_pice
|
|
|
FROM iwebshop_order t
|
|
|
LEFT OUTER JOIN iwebshop_order_goods t1 ON t.id=t1.order_id
|
|
|
LEFT OUTER JOIN iwebshop_goods t2 ON t1.goods_id=t2.id
|