|
@@ -334,6 +334,7 @@ class NowReportHandle extends Command
|
|
|
->leftJoin("warehouse_info wwi","wwi.wsm_code = wpo.wsm_code")
|
|
|
->leftJoin("supplier ws","ws.code=wpo.supplierNo")
|
|
|
->where('wpi.status',"in", [4,6])
|
|
|
+ ->where('wpo.order_type',"=",1)
|
|
|
->whereBetween('wpi.addtime', [$start, $end])
|
|
|
->field(" wpo.companyNo '业务公司',
|
|
|
bkcode '备库单号',
|
|
@@ -341,8 +342,8 @@ class NowReportHandle extends Command
|
|
|
wpo.skuCode '商品编号',
|
|
|
'' as '一级分类',
|
|
|
'' as '二级分类',
|
|
|
- cat_id as '三级分类',
|
|
|
- cat_id as '财务核算编号',
|
|
|
+ wgb.cat_id as '三级分类',
|
|
|
+ wgb.cat_id as '财务核算编号',
|
|
|
wpo.good_name as '商品名称',
|
|
|
wpi.send_num '入库数量',
|
|
|
round(wpi.send_num* good_price,2) '入库金额',
|
|
@@ -364,7 +365,7 @@ class NowReportHandle extends Command
|
|
|
$value['业务部门'] = Db::name("depart_user")->alias("a")->leftJoin("company_item ci","a.itemid=ci.id")
|
|
|
->where(["a.uid"=>$value['业务部门'],"a.status"=>1,"a.is_del"=>0])->value('ci.name','');
|
|
|
$cat =made($value['三级分类']);
|
|
|
- $value['财务核算编码'] =Db::name("cat")->where(["id"=>$value['三级分类']])->value("fund_code",'');
|
|
|
+ $value['财务核算编号'] =Db::name("cat")->where(["id"=>$value['三级分类']])->value("fund_code",'');
|
|
|
$value['一级分类']=isset($cat[0]['name'])?$cat[0]['name']:"";
|
|
|
$value['二级分类']=isset($cat[1]['name'])?$cat[1]['name']:"";
|
|
|
$value['三级分类']=isset($cat[2]['name'])?$cat[2]['name']:"";
|