|
@@ -2337,7 +2337,7 @@ class SaleReport extends Base
|
|
|
$count_row = Db::name('sale')
|
|
|
->alias('a')
|
|
|
->where($where)
|
|
|
- ->field(" a.good_num-th_num - IFNULL((select sum('receipt_quantity') from wsm_order_addr where orderCode=a.orderCode and is_del=0),0) not_addr_address_good_num,count(a.id) as count")
|
|
|
+ ->field(" a.good_num-th_num - IFNULL((select sum(receipt_quantity) from wsm_order_addr where orderCode=a.orderCode and is_del=0),0) not_addr_address_good_num,count(a.id) as count")
|
|
|
->having("not_addr_address_good_num>0")
|
|
|
->find();
|
|
|
$data = Db::name('sale')
|
|
@@ -2353,7 +2353,7 @@ class SaleReport extends Base
|
|
|
a.send_num,
|
|
|
a.wsend_num,
|
|
|
a.status,
|
|
|
- a.good_num-a.th_num - IFNULL((select sum('receipt_quantity') from wsm_order_addr where orderCode=a.orderCode and is_del=0),0) not_addr_address_good_num,
|
|
|
+ a.good_num-a.th_num - IFNULL((select sum(receipt_quantity) from wsm_order_addr where orderCode=a.orderCode and is_del=0),0) not_addr_address_good_num,
|
|
|
a.apply_name nickname,
|
|
|
a.apply_id,
|
|
|
a.addtime")
|
|
@@ -2404,7 +2404,7 @@ class SaleReport extends Base
|
|
|
a.good_code 商品成本编码,a.skuCode 商品上线编码,a.good_name 商品名称,
|
|
|
a.good_num 购买数量,a.send_num 已发货数量,a.wsend_num 未发货数量,a.status 订单状态,
|
|
|
a.apply_name 申请人名称,a.apply_id 申请人所属部门,
|
|
|
- a.good_num-a.th_num - IFNULL((select sum('receipt_quantity') from wsm_order_addr where orderCode=a.orderCode and is_del=0),0) 无地址数量,
|
|
|
+ a.good_num-a.th_num - IFNULL((select sum(receipt_quantity) from wsm_order_addr where orderCode=a.orderCode and is_del=0),0) 无地址数量,
|
|
|
'' 下单月份,
|
|
|
a.addtime")
|
|
|
->where($where)
|