wugg há 2 anos atrás
pai
commit
df2d257a7a
2 ficheiros alterados com 3 adições e 3 exclusões
  1. 1 1
      app/admin/controller/Reorder.php
  2. 2 2
      app/command/NowReportHandle.php

+ 1 - 1
app/admin/controller/Reorder.php

@@ -492,7 +492,7 @@ class Reorder extends Base
                 $value['addive_time']=isset($addrlist['addive_time'])?$addrlist['addive_time']:"";
                 $value['customer_code']=isset($addrlist['customer_code']) ?$addrlist['customer_code']:"" ;
                 $value['receipt_quantity']=isset($addrlist['receipt_quantity']) ?$addrlist['receipt_quantity']:"" ;
-                $send = Db::name("order_out")->where(['addrid' => $addrlist['id'], 'orderCode' => $addrlist['orderCode']])->where("status",">=",2)->sum("send_num");
+                $send = Db::name("order_out")->where(['addrid' => $addrlist['id'], 'orderCode' => $addrlist['orderCode'],"is_del"=>0])->where("status",">=",2)->sum("send_num");
                 $value['addr_send'] = $send ?? 0;
                 $value['addr_wsend'] = $value['receipt_quantity'] - $value['addr_send'];
                 $customer = Db::name("customer_info")->where(['companyNo'=>$addrlist['customer_code']])->find();

+ 2 - 2
app/command/NowReportHandle.php

@@ -171,7 +171,7 @@ class NowReportHandle extends Command
             ->leftJoin('supplier ws', 'ws.supplierNo = ws.`code`')
             ->where('wgs.is_del', 0)
             ->where('wgb.is_stock', 1)
-            ->whereBetween('gs.addtime', [$start_date, $end_date])
+            ->whereBetween('wgs.addtime', [$start_date, $end_date])
             ->order('wgs.addtime', 'desc')
             ->cursor();
 
@@ -218,7 +218,7 @@ class NowReportHandle extends Command
 	wtd.addtime '退货单创建时间',
 	wb.company '公司名称',
 	thCode '退货单号',
-	if(wtdth_type=1,'售前','售后') '退货类型',
+	if(wtd.th_type=1,'售前','售后') '退货类型',
 	'已完成' as '流程进度',
   wtd.apply_id '业务部门',
   wtd.apply_name '业务人员',