|
@@ -398,7 +398,7 @@ class Good extends Base
|
|
|
$supplier = $userCommon->handle('sInfo',['code'=>$data['supplierNo']]);
|
|
|
$data['supplierName'] = $names['data'][$data['supplierNo']]??'';//isset($supplier['name'])?$supplier['name']:"";
|
|
|
$data['company'] = $names['data'][$data['companyNo']]??'';//isset($company['company'])?$company['company']:"";
|
|
|
- $data['tax_info']=GoodTax::with(['Tax','OutTax'])->where(['spuCode'=>$good_platform['spuCode']])->findOrEmpty();
|
|
|
+ $data['tax_info']=GoodTax::with(['Tax','OutTax',"CgdTax"])->where(['spuCode'=>$good_platform['spuCode']])->findOrEmpty();
|
|
|
$data['noble_name']=isset($data['noble_metal'])&&$data['noble_metal']!=0?$this->noble[$data['noble_metal']] :"";
|
|
|
$data['combind_list']=[];
|
|
|
$data['wsm_list']=[];
|
|
@@ -407,13 +407,8 @@ class Good extends Base
|
|
|
$data['combind_list'] = (new GoodCombind())->where(['spuCode'=>$good_platform['spuCode'],'is_del'=>0])->select()->toArray();
|
|
|
foreach ($data['combind_list'] as &$item){
|
|
|
$item['stock'] =bcmul($item['child_num'],$data['usable_stock']);
|
|
|
- $taxInfo=GoodTax::with(['tax'])->where(['spuCode'=>$item['childCode']])->findOrEmpty();
|
|
|
- $item['tax_id'] = $taxInfo['tax_id']??'';
|
|
|
- $item['tax_name'] = $taxInfo['cat_name']??'';
|
|
|
- $item['tax_short_name'] =$taxInfo['short_name']??'';
|
|
|
- $item['tax_code'] =$taxInfo['merge_code']??'';
|
|
|
- $item['tax']=$taxInfo['tax']??'';
|
|
|
- $item['inv_good_name']=$taxInfo['inv_good_name']??'';
|
|
|
+ $taxInfo=GoodTax::with(['Tax','OutTax','CgdTax'])->where(['spuCode'=>$item['childCode']])->findOrEmpty();
|
|
|
+ $item['tax_info'] = $taxInfo;
|
|
|
}
|
|
|
$data['wsm_list']=(new GoodStock())->withJoin(['wsminfo'] , 'left')
|
|
|
->where(['spuCode'=>$good_platform['spuCode'] , 'wsm_type'=>[2 , 5]])
|