wugg 1 year ago
parent
commit
717c1a0be0
1 changed files with 5 additions and 0 deletions
  1. 5 0
      app/command/Report.php

+ 5 - 0
app/command/Report.php

@@ -1082,6 +1082,11 @@ class Report extends Command
 				$value['一级类型']='会议分类';
 				$value['提成系数']=0.0018;
 			}
+			if($value['订单类型']=='库存'){
+				$value['采购单价'] = Db::name('cgd_info')->where(['goodNo'=>$value['goodNo'],'cgdSource'=>0])->order('id desc')->value('goodPrice',0);
+			}else{
+				$value['采购单价'] = Db::name('cgd_info')->where(['sequenceNo'=>$value['采购单编号']])->value('goodPrice',0);
+			}
 			$value['明细总提成'] = bcmul(bcmul($totalPrice ,$value['账期回款系数']),$value['提成系数'],4);
 			yield $value;
 		}