|
@@ -406,6 +406,7 @@ class ExecByRelaComNoHandle extends Command
|
|
|
a.supplierName as '公司名称',
|
|
|
a.apply_id '业务部门名称' ,
|
|
|
a.apply_name as '业务人员',
|
|
|
+ if(a.pay_id>0,'是','否') 是否拆单,
|
|
|
a.order_type as '订单类型',
|
|
|
a.good_type as '商品类型',
|
|
|
woo.outCode '发货编号',
|
|
@@ -430,6 +431,7 @@ class ExecByRelaComNoHandle extends Command
|
|
|
`wpo`.`open_fee` AS `开模费`,
|
|
|
`wpo`.`teach_fee` AS `工艺费`,
|
|
|
`wpo`.`delivery_fee` AS `物流费`,
|
|
|
+ `wpo`.`diff_fee` AS `公差金额`,
|
|
|
`wpo`.`good_price` AS `成本合计`,
|
|
|
`wpo`.`total_fee` AS `采购货款`,
|
|
|
ifnull( `wgb`.`tax`, `wgz`.`tax` )/100 AS `采购税点`,
|
|
@@ -506,7 +508,7 @@ class ExecByRelaComNoHandle extends Command
|
|
|
->leftJoin("good_basic wgb", "wgb.spuCode=wpo.spuCode and wgb.is_del=0")
|
|
|
->leftJoin("warehouse_info wwi", "wwi.wsm_code = wpo.wsm_code")
|
|
|
->where([
|
|
|
- 'wpi.status' => [4, 6],
|
|
|
+ 'wpi.status' => 2,
|
|
|
'wpi.is_del' => 0,
|
|
|
'wpo.order_type' => 1,
|
|
|
'wpo.order_source' => 0,
|
|
@@ -524,8 +526,8 @@ class ExecByRelaComNoHandle extends Command
|
|
|
wgb.cat_id as '三级分类',
|
|
|
wgb.cat_id as '财务核算编号',
|
|
|
wpo.good_name as '商品名称',
|
|
|
- if(wpi.status=4,wpi.send_num,wpi.wsm_num) '入库数量',
|
|
|
- round( if(wpi.status=4,wpi.send_num,wpi.wsm_num) * good_price, 2 ) '入库金额',
|
|
|
+ wpi.send_num'入库数量',
|
|
|
+ round( wpi.send_num * good_price, 2 ) '入库金额',
|
|
|
wpi.updatetime '本次入库时间',
|
|
|
wgb.tax/100 '采购税率',
|
|
|
'' as '不含税入库金额',
|
|
@@ -637,6 +639,7 @@ class ExecByRelaComNoHandle extends Command
|
|
|
companyName '公司名称',
|
|
|
department '业务部门',
|
|
|
ownerName '业务人员',
|
|
|
+ if(cxCode='','否','是') '是否拆单',
|
|
|
'网络部采购单' '订单类型',
|
|
|
'' as '商品类型',
|
|
|
'' as '发货编号',
|
|
@@ -661,9 +664,10 @@ class ExecByRelaComNoHandle extends Command
|
|
|
openPrice AS `开模费`,
|
|
|
costPrice AS `工艺费`,
|
|
|
deliveryPrice AS `物流费`,
|
|
|
+ 0 AS `公差金额`,
|
|
|
goodPrice AS `成本合计`,
|
|
|
totalPrice AS `采购货款`,
|
|
|
- tax AS `采购税点`,
|
|
|
+ tax/100 AS `采购税点`,
|
|
|
supplierName AS `供应商名称`,
|
|
|
'否'as '是否库存品',
|
|
|
'包邮' as '发货方式',
|